2026-04-16-3 add secur ,billing ,documents ,

This commit is contained in:
Hamza-Ayed
2026-04-16 05:36:53 +03:00
parent 47a38d657e
commit 9f2a03a979
20 changed files with 882 additions and 256 deletions
+31
View File
@@ -0,0 +1,31 @@
{
"name": "@intaleq/maps-gl",
"version": "1.0.0",
"description": "Premium JavaScript SDK for Intaleq Map Platform",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts",
"dev": "tsup src/index.ts --format cjs,esm --watch --dts",
"lint": "eslint src/**"
},
"keywords": [
"maps",
"intaleq",
"jordan",
"syria",
"vector-tiles",
"maplibre"
],
"author": "Intaleq team",
"license": "MIT",
"peerDependencies": {
"maplibre-gl": "^5.1.1"
},
"devDependencies": {
"maplibre-gl": "^5.1.1",
"tsup": "^8.0.0",
"typescript": "^5.0.0"
}
}
+61
View File
@@ -0,0 +1,61 @@
import maplibregl from 'maplibre-gl';
export interface IntaleqMapOptions extends Omit<maplibregl.MapOptions, 'container'> {
container: string | HTMLElement;
apiKey: string;
styleType?: 'obsidian' | 'light' | 'hybrid';
}
/**
* Intaleq Maps JS SDK
* Optimized for Jordan & Syria mapping services.
*/
export class IntaleqMap extends maplibregl.Map {
private readonly intaleqApiKey: string;
constructor(options: IntaleqMapOptions) {
const { apiKey, styleType = 'obsidian', ...mapOptions } = options;
// Construct the Intaleq style URL
// In production, this points to our tile server with the API key
const styleUrl = `https://maps.intaleq.com/styles/${styleType}/style.json?key=${apiKey}`;
super({
...mapOptions,
style: styleUrl,
hash: mapOptions.hash ?? true,
center: mapOptions.center ?? [35.9239, 31.9522], // Default to Amman
zoom: mapOptions.zoom ?? 12,
transformRequest: (url: string) => {
// Automatically append API key to all tile and asset requests
if (url.includes('intaleq.com')) {
const separator = url.includes('?') ? '&' : '?';
return {
url: `${url}${separator}key=${apiKey}`
};
}
return { url };
}
});
this.intaleqApiKey = apiKey;
}
/**
* Helper to search for places using Intaleq Geocoding API
*/
async search(query: string) {
const response = await fetch(`https://map-saas.intaleq.com/v1/geocoding/search?q=${encodeURIComponent(query)}&key=${this.intaleqApiKey}`);
return response.json();
}
/**
* Helper to get routes using Intaleq Routing API
*/
async getRoute(start: [number, number], end: [number, number], profile: 'car' | 'bike' | 'foot' = 'car') {
const response = await fetch(`https://map-saas.intaleq.com/v1/routing/route?start=${start.join(',')}&end=${end.join(',')}&profile=${profile}&key=${this.intaleqApiKey}`);
return response.json();
}
}
export { maplibregl };