stable: finalized GIS aesthetics and Syria/Jordan routing synchronization

This commit is contained in:
Hamza-Ayed
2026-03-28 04:12:01 +03:00
parent d6f3b41b53
commit 592af8ce5c
203 changed files with 9711 additions and 119 deletions
+37
View File
@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
class IntaleqMapWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(
initialCenter: LatLng(33.5138, 36.2765), // Damascus / دمشق
initialZoom: 13.0,
),
children: [
TileLayer(
// هذا هو الرابط الذي يجلب الخريطة من السيرفر الخاص بك!
urlTemplate: 'https://app.intaleqapp.com/martin/planet_osm_line/{z}/{x}/{y}.pbf',
userAgentPackageName: 'com.intaleq.app',
subdomains: const ['a', 'b', 'c'],
),
],
);
}
}
// ─────────────────────────────────────────────────────────
// Helper Class for API Interaction (Intelligence API)
// ─────────────────────────────────────────────────────────
class IntaleqApiService {
static const String baseUrl = 'https://app.intaleqapp.com/api';
static const String apiKey = 'intaleq_secret_2026';
Future<void> triggerDailyIntelligence() async {
// مثال لطلب معالجة البيانات من داخل تطبيق فلاتر (اختياري)
print('Triggering 3 AM process manually...');
}
}
@@ -0,0 +1,69 @@
import 'package:flutter/material.dart';
import 'package:maplibre_gl/maplibre_gl.dart';
// ─────────────────────────────────────────────────────────
// Intaleq Vector Map Widget (Professional Setup)
// Uses MapLibre GL for High Performance Vector Tiles (.pbf)
// ─────────────────────────────────────────────────────────
class IntaleqMapWidget extends StatefulWidget {
const IntaleqMapWidget({super.key});
@override
State<IntaleqMapWidget> createState() => _IntaleqMapWidgetState();
}
class _IntaleqMapWidgetState extends State<IntaleqMapWidget> {
MaplibreMapController? mapController;
void _onMapCreated(MaplibreMapController controller) {
mapController = controller;
}
// Example: Downloading an offline region for caching
Future<void> _downloadOfflineRegion() async {
final bounds = LatLngBounds(
southwest: const LatLng(33.4, 36.1), // Southwest corner of Damascus
northeast: const LatLng(33.6, 36.4), // Northeast corner of Damascus
);
// Mapbox/MapLibre has built-in offline caching for vector tiles!
// It caches the vectors very efficiently.
await downloadOfflineRegion(
OfflineRegionDefinition(
bounds: bounds,
mapStyleUrl: 'https://app.intaleqapp.com/style-mobile.json', // Your custom style linking to .pbf
minZoom: 10.0,
maxZoom: 16.0,
),
metadata: {
'name': 'Damascus Region',
},
);
print('✅ Offline region downloaded and cached successfully!');
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: MaplibreMap(
onMapCreated: _onMapCreated,
initialCameraPosition: const CameraPosition(
target: LatLng(33.5138, 36.2765), // Damascus / دمشق
zoom: 13.0,
),
// The style URL points to a JSON file on your server.
// This JSON defines colors, line widths, and the tile source (Martin .pbf URLs)
styleString: 'https://app.intaleqapp.com/style-mobile.json',
// Optimizations for smooth vector rendering
minMaxZoomPreference: const MinMaxZoomPreference(5, 18),
myLocationEnabled: true,
),
floatingActionButton: FloatingActionButton(
onPressed: _downloadOfflineRegion,
tooltip: 'Download Offline Map',
child: const Icon(Icons.download),
),
);
}
}
+376
View File
@@ -0,0 +1,376 @@
{
"version": 8,
"name": "Intaleq Mobile Style",
"metadata": {},
"center": [36.2765, 33.5138],
"zoom": 12,
"bearing": 0,
"pitch": 0,
"glyphs": "https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf",
"sprite": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite",
"sources": {
"local-osm-polygons": {
"type": "vector",
"tiles": [
"https://app.intaleqapp.com/martin/planet_osm_polygon/{z}/{x}/{y}.pbf"
],
"maxzoom": 14
},
"local-osm-lines": {
"type": "vector",
"tiles": [
"https://app.intaleqapp.com/martin/planet_osm_line/{z}/{x}/{y}.pbf"
],
"maxzoom": 14
},
"local-osm-points": {
"type": "vector",
"tiles": [
"https://app.intaleqapp.com/martin/planet_osm_point/{z}/{x}/{y}.pbf"
],
"maxzoom": 14
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "#f2efea"
}
},
{
"id": "water-layer",
"type": "fill",
"source": "local-osm-polygons",
"source-layer": "planet_osm_polygon",
"filter": [
"in",
"natural",
"water",
"lake",
"riverbank"
],
"paint": {
"fill-color": "#aadaff"
}
},
{
"id": "park-layer",
"type": "fill",
"source": "local-osm-polygons",
"source-layer": "planet_osm_polygon",
"filter": [
"in",
"leisure",
"park",
"garden",
"nature_reserve"
],
"paint": {
"fill-color": "#c8facc"
}
},
{
"id": "building-3d",
"type": "fill-extrusion",
"source": "local-osm-polygons",
"source-layer": "planet_osm_polygon",
"minzoom": 15,
"filter": [
"has",
"building"
],
"layout": {
"visibility": "visible"
},
"paint": {
"fill-extrusion-color": "#d9d0c9",
"fill-extrusion-height": 40,
"fill-extrusion-base": 0,
"fill-extrusion-opacity": 0.8
}
},
{
"id": "road-border-high",
"type": "line",
"source": "local-osm-lines",
"source-layer": "planet_osm_line",
"filter": [
"in",
"highway",
"primary",
"secondary",
"tertiary",
"motorway"
],
"paint": {
"line-color": "#ccc",
"line-width": [
"interpolate",
[
"exponential",
1.5
],
[
"zoom"
],
12,
3,
16,
12
]
}
},
{
"id": "road-layer-low",
"type": "line",
"source": "local-osm-lines",
"source-layer": "planet_osm_line",
"filter": [
"in",
"highway",
"residential",
"service",
"unclassified"
],
"paint": {
"line-color": "#ffffff",
"line-width": 1.5
}
},
{
"id": "road-layer-high",
"type": "line",
"source": "local-osm-lines",
"source-layer": "planet_osm_line",
"filter": [
"in",
"highway",
"primary",
"secondary",
"tertiary"
],
"paint": {
"line-color": "#fff",
"line-width": [
"interpolate",
[
"exponential",
1.5
],
[
"zoom"
],
12,
1.5,
16,
8
]
}
},
{
"id": "road-layer-motorway",
"type": "line",
"source": "local-osm-lines",
"source-layer": "planet_osm_line",
"filter": [
"==",
"highway",
"motorway"
],
"paint": {
"line-color": "#f7d499",
"line-width": [
"interpolate",
[
"exponential",
1.5
],
[
"zoom"
],
12,
2.5,
16,
10
]
}
},
{
"id": "route-line",
"type": "line",
"source": "local-osm-lines",
"source-layer": "planet_osm_line",
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#3b82f6",
"line-width": 6,
"line-opacity": 0.8
},
"filter": [
"==",
"id",
-1
]
},
{
"id": "road-labels",
"type": "symbol",
"source": "local-osm-lines",
"source-layer": "planet_osm_line",
"minzoom": 15,
"layout": {
"text-field": "{name}",
"text-font": [
"Noto Sans Regular"
],
"text-size": 11,
"symbol-placement": "line",
"text-letter-spacing": 0.05,
"text-padding": 15,
"text-allow-overlap": false,
"text-ignore-placement": false
},
"paint": {
"text-color": "#444",
"text-halo-color": "#fff",
"text-halo-width": 1.5
}
},
{
"id": "poi-icons",
"type": "symbol",
"source": "local-osm-points",
"source-layer": "planet_osm_point",
"minzoom": 13,
"layout": {
"visibility": "visible",
"icon-image": [
"coalesce",
[
"match",
[
"get",
"shop"
],
"supermarket",
"grocery-15",
"convenience",
"grocery-15",
"pharmacy",
"pharmacy-15",
"clothes",
"clothing_store-15",
""
],
[
"match",
[
"get",
"amenity"
],
"restaurant",
"restaurant-15",
"cafe",
"cafe-15",
"bank",
"bank-15",
"pharmacy",
"pharmacy-15",
"grave_yard",
"cemetery-15",
"school",
"school-15",
"university",
"college-15",
"place_of_worship",
"religious-christian-15",
"hospital",
"hospital-15",
"fuel",
"fuel-15",
""
],
[
"match",
[
"get",
"historic"
],
"monument",
"monument-15",
"ruins",
"attraction-15",
"archaeological_site",
"attraction-15",
""
],
[
"match",
[
"get",
"tourism"
],
"museum",
"museum-15",
"hotel",
"hotel-15",
"attraction",
"attraction-15",
""
],
[
"match",
[
"get",
"landuse"
],
"cemetery",
"cemetery-15",
""
],
"marker-15"
],
"icon-size": 1.1,
"icon-padding": 2,
"icon-allow-overlap": false
},
"paint": {
"icon-opacity": 1,
"icon-halo-color": "#ffffff",
"icon-halo-width": 1
}
},
{
"id": "place-labels",
"type": "symbol",
"source": "local-osm-points",
"source-layer": "planet_osm_point",
"minzoom": 14,
"layout": {
"text-field": "{name}",
"text-font": [
"Noto Sans Regular"
],
"text-size": 12,
"text-offset": [
0,
1.5
],
"text-anchor": "top",
"text-padding": 5,
"text-allow-overlap": false,
"visibility": "visible"
},
"paint": {
"text-color": "#111",
"text-halo-color": "#fff",
"text-halo-width": 1.5
}
}
]
}