From 6ea213629c663d564dd68c3e28a320a4c051738e Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 5 Aug 2026 01:51:03 +0300 Subject: [PATCH] =?UTF-8?q?fix(apps):=20=D8=B3=D9=82=D9=88=D8=B7=20=D8=A3?= =?UTF-8?q?=D8=B5=D9=84=D9=8A=20=D8=B9=D9=86=D8=AF=20=D8=AA=D8=AD=D9=85?= =?UTF-8?q?=D9=8A=D9=84=20=D8=A7=D9=84=D8=AE=D8=B1=D9=8A=D8=B7=D8=A9=20?= =?UTF-8?q?=E2=80=94=20=D8=B3=D8=AA=D8=A7=D9=8A=D9=84=20map-saas=20=D8=A8?= =?UTF-8?q?=D9=84=D8=A7=20sprite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## العطل libc++abi: terminating due to uncaught exception of type std::domain_error بلا أي استثناء دارتي — سقوط أصلي بحت بعد «Using remote style URL» مباشرة. ## السبب فحص الستايل البعيد مباشرةً: /api/maps/style.json?theme=light → 68 طبقة، منها 12 طبقة symbol تستعمل icon-image، و **لا sprite معرَّف في الملف إطلاقاً**. MapLibre الأصلي يرمي std::domain_error عند طبقة أيقونات بلا sprite تحلّها. ⚠️ الستايل المرفق بالحزمة نفسها مصابٌ بالعيب ذاته (sprite غائب + 12 طبقة)، فلا الافتراضي ولا البعيد صالحان. ستايلها الليلي وحده سليم. ## العلاج التحوّل إلى assets/style.json و assets/style_dark.json المنقولين من سيرو الميداني: بهما sprite صحيح، وبلاطاتهما من tiles.intaleqapp.com نفسها، ويقلعان بلا انتظار شبكة — وهو ما يعنيه «الشكل حتمي من أول إقلاع» (docs/26 §1). نُسخ الملفان لتطبيق السائق أيضاً. ## الإصلاح الجذري (خادم، خارج هذا الكوميت) إضافة sprite لستايل map-saas البعيد أو إزالة طبقات الأيقونات منه. docs/23 §13 وُسّع بالقاعدة وسببها. Co-Authored-By: Claude Opus 5 --- apps/driver_new/assets/style.json | 2178 +++++++++++++++++ apps/driver_new/assets/style_dark.json | 2178 +++++++++++++++++ .../features/trip/view/widgets/ride_map.dart | 18 +- .../features/trip/view/widgets/ride_map.dart | 18 +- docs/23-flutter-conventions.md | 20 + 5 files changed, 4406 insertions(+), 6 deletions(-) create mode 100644 apps/driver_new/assets/style.json create mode 100644 apps/driver_new/assets/style_dark.json diff --git a/apps/driver_new/assets/style.json b/apps/driver_new/assets/style.json new file mode 100644 index 0000000..feed983 --- /dev/null +++ b/apps/driver_new/assets/style.json @@ -0,0 +1,2178 @@ +{ + "version": 8, + "name": "Siro Premium — Light v2.9", + "metadata": { + "brand": "Siro", + "version": "2.10.0-light", + "description": "Siro light theme — buildings at close zoom only, on-road labels, improved arrows" + }, + "center": [ + 36.276008, + 33.513685 + ], + "zoom": 15, + "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://tiles.intaleqapp.com/planet_osm_polygon/{z}/{x}/{y}" + ], + "maxzoom": 14, + "attribution": "© Siro | © OpenStreetMap contributors" + }, + "local-osm-lines": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/planet_osm_line/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "local-osm-points": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/planet_osm_point/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "places_egypt": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/places_egypt/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "places_syria": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/places_syria/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "places_jordan": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/places_jordan/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "overture_buildings": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/overture_building/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "overture_segments": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/overture_segment/{z}/{x}/{y}" + ], + "maxzoom": 14 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#EEF2F7" + } + }, + { + "id": "landuse-residential", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "residential" + ], + "paint": { + "fill-color": "#F0F4F8", + "fill-opacity": 1.0 + } + }, + { + "id": "landuse-commercial", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "commercial" + ], + "paint": { + "fill-color": "#FAF5EE", + "fill-opacity": 1.0 + } + }, + { + "id": "landuse-cemetery", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "cemetery" + ], + "paint": { + "fill-color": "#B8D4BA", + "fill-opacity": 1.0 + } + }, + { + "id": "landuse-military", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "military" + ], + "paint": { + "fill-color": "#E2D9CC", + "fill-opacity": 1.0 + } + }, + { + "id": "landuse-industrial", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "in", + "landuse", + "industrial", + "railway" + ], + "paint": { + "fill-color": "#E4E8EE", + "fill-opacity": 1 + } + }, + { + "id": "park-layer", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "any", + [ + "in", + "leisure", + "park", + "garden", + "nature_reserve", + "pitch", + "playground" + ], + [ + "in", + "landuse", + "grass", + "meadow", + "forest" + ], + [ + "in", + "natural", + "wood", + "scrub", + "heath" + ] + ], + "paint": { + "fill-color": [ + "match", + [ + "get", + "leisure" + ], + "pitch", + "#9ED4A0", + "playground", + "#B8E6B8", + "#C5E8C5" + ], + "fill-opacity": 0.85 + } + }, + { + "id": "park-outline", + "type": "line", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "in", + "leisure", + "park", + "garden", + "nature_reserve" + ], + "paint": { + "line-color": "#9ED4A0", + "line-width": 0.8, + "line-opacity": 0.6 + } + }, + { + "id": "water-polygon", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "any", + [ + "in", + "natural", + "water", + "lake", + "bay" + ], + [ + "==", + "waterway", + "riverbank" + ], + [ + "in", + "landuse", + "basin", + "reservoir" + ], + [ + "==", + "amenity", + "fountain" + ] + ], + "paint": { + "fill-color": "#9ECFE8", + "fill-opacity": 0.95 + } + }, + { + "id": "water-polygon-outline", + "type": "line", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "any", + [ + "in", + "natural", + "water", + "lake", + "bay" + ], + [ + "==", + "waterway", + "riverbank" + ], + [ + "in", + "landuse", + "basin", + "reservoir" + ] + ], + "paint": { + "line-color": "#6BB8D8", + "line-width": 0.8, + "line-opacity": 0.8 + } + }, + { + "id": "waterway-river", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "waterway", + "river", + "canal" + ], + [ + "!=", + "intermittent", + "yes" + ], + [ + "!=", + "seasonal", + "yes" + ], + [ + "!=", + "tunnel", + "yes" + ] + ], + "paint": { + "line-color": "#6BB8D8", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1.5, + 14, + 4, + 16, + 7 + ], + "line-opacity": 0.95 + } + }, + { + "id": "waterway-stream-drain", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "waterway", + "stream", + "drain", + "ditch" + ], + [ + "!=", + "intermittent", + "yes" + ], + [ + "!=", + "seasonal", + "yes" + ], + [ + "!=", + "tunnel", + "yes" + ] + ], + "minzoom": 13, + "paint": { + "line-color": "#7FBFD8", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 0.8, + 16, + 2.5 + ], + "line-opacity": 0.85 + } + }, + { + "id": "railway-area", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "railway" + ], + "paint": { + "fill-color": "#DDE2EA", + "fill-opacity": 0.9 + } + }, + { + "id": "railway-rail-casing", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "railway", + "rail", + "narrow_gauge", + "preserved" + ], + [ + "!=", + "service", + "yard" + ], + [ + "!=", + "service", + "siding" + ] + ], + "minzoom": 8, + "paint": { + "line-color": "#B0B8C5", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 2, + 12, + 4, + 16, + 8 + ] + } + }, + { + "id": "railway-rail-core", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "railway", + "rail", + "narrow_gauge", + "preserved" + ], + [ + "!=", + "service", + "yard" + ], + [ + "!=", + "service", + "siding" + ] + ], + "minzoom": 8, + "paint": { + "line-color": "#6B7A8E", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 2.5, + 16, + 5 + ], + "line-dasharray": [ + 6, + 4 + ] + } + }, + { + "id": "railway-subway-casing", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "railway", + "subway", + "light_rail", + "tram", + "monorail" + ], + "minzoom": 10, + "paint": { + "line-color": [ + "match", + [ + "get", + "railway" + ], + "subway", + "#CC2233", + "light_rail", + "#0066CC", + "tram", + "#8833BB", + "monorail", + "#008855", + "#BB3344" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 3, + 14, + 6, + 16, + 10 + ] + } + }, + { + "id": "railway-subway-core", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "railway", + "subway", + "light_rail", + "tram", + "monorail" + ], + "minzoom": 10, + "paint": { + "line-color": [ + "match", + [ + "get", + "railway" + ], + "subway", + "#FF3347", + "light_rail", + "#2288FF", + "tram", + "#AA44EE", + "monorail", + "#00BB66", + "#FF4455" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1.5, + 14, + 3.5, + 16, + 6 + ] + } + }, + { + "id": "road-casing-track-path", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "track", + "path", + "footway", + "cycleway", + "steps" + ], + "minzoom": 14, + "paint": { + "line-color": "#D4D8DF", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 16, + 4 + ], + "line-dasharray": [ + 4, + 3 + ] + } + }, + { + "id": "road-casing-minor", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "residential", + "service", + "unclassified", + "living_street", + "pedestrian" + ], + "paint": { + "line-color": "#D4D8DF", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1.5, + 16, + 10 + ], + "line-opacity": 0.7 + } + }, + { + "id": "road-core-minor", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "residential", + "service", + "unclassified", + "living_street", + "pedestrian" + ], + "paint": { + "line-color": "#FFFFFF", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 0.8, + 16, + 8 + ] + } + }, + { + "id": "road-casing-tertiary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "tertiary", + "tertiary_link" + ], + "paint": { + "line-color": "#C9CED8", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 2, + 16, + 14 + ], + "line-opacity": 0.75 + } + }, + { + "id": "road-core-tertiary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "tertiary", + "tertiary_link" + ], + "paint": { + "line-color": "#FFFFFF", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 1.2, + 16, + 11 + ] + } + }, + { + "id": "road-casing-secondary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "secondary", + "secondary_link" + ], + "paint": { + "line-color": "#C4CFDE", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 2.5, + 16, + 16 + ], + "line-opacity": 0.8 + } + }, + { + "id": "road-core-secondary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "secondary", + "secondary_link" + ], + "paint": { + "line-color": "#F8FBFF", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 1.8, + 16, + 13 + ] + } + }, + { + "id": "road-casing-primary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "primary", + "primary_link" + ], + "paint": { + "line-color": "#C8B868", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 3, + 16, + 18 + ], + "line-opacity": 0.7 + } + }, + { + "id": "road-core-primary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "primary", + "primary_link" + ], + "paint": { + "line-color": "#EDD870", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 2, + 16, + 14 + ] + } + }, + { + "id": "road-casing-motorway", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "motorway", + "motorway_link", + "trunk", + "trunk_link" + ], + "paint": { + "line-color": "#C8A84B", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 4, + 16, + 20 + ], + "line-opacity": 0.75 + } + }, + { + "id": "road-core-motorway", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "motorway", + "motorway_link", + "trunk", + "trunk_link" + ], + "paint": { + "line-color": "#F0C040", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 2.5, + 16, + 16 + ] + } + }, + { + "id": "road-direction-arrows", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "minzoom": 15, + "filter": [ + "all", + [ + "in", + "highway", + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "residential", + "unclassified", + "living_street" + ], + [ + "==", + "oneway", + "yes" + ] + ], + "layout": { + "symbol-placement": "line", + "symbol-spacing": 120, + "text-field": "→", + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 16, + 17, + 22, + 19, + 28 + ], + "text-keep-upright": false, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-padding": 0, + "text-letter-spacing": -0.1 + }, + "paint": { + "text-color": "rgba(80,96,120,0.55)", + "text-halo-color": "rgba(255,255,255,0.25)", + "text-halo-width": 1 + } + }, + { + "id": "building-fill-flat", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "has", + "building" + ], + "minzoom": 15, + "maxzoom": 16, + "paint": { + "fill-color": "#DDD8D0", + "fill-opacity": 0.85, + "fill-outline-color": "#C4BEB4" + } + }, + { + "id": "building-3d", + "type": "fill-extrusion", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "minzoom": 16, + "filter": [ + "has", + "building" + ], + "paint": { + "fill-extrusion-color": "#DDD8D0", + "fill-extrusion-height": [ + "coalesce", + [ + "to-number", + [ + "get", + "height" + ] + ], + [ + "*", + [ + "to-number", + [ + "get", + "building:levels" + ], + 2 + ], + 3.5 + ], + 7 + ], + "fill-extrusion-base": [ + "coalesce", + [ + "to-number", + [ + "get", + "min_height" + ] + ], + 0 + ], + "fill-extrusion-opacity": 0.8, + "fill-extrusion-vertical-gradient": true + } + }, + { + "id": "building-3d-overture", + "type": "fill-extrusion", + "source": "overture_buildings", + "source-layer": "overture_building", + "minzoom": 16, + "paint": { + "fill-extrusion-color": [ + "match", + [ + "get", + "subtype" + ], + "commercial", + "#D8D0C0", + "retail", + "#E0D0B8", + "industrial", + "#C8D0DC", + "religious", + "#C8D4EC", + "education", + "#D4E0C4", + "medical", + "#E8D4D4", + "#DDD8D0" + ], + "fill-extrusion-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + [ + "coalesce", + [ + "to-number", + [ + "get", + "height" + ] + ], + [ + "*", + [ + "coalesce", + [ + "to-number", + [ + "get", + "num_floors" + ] + ], + 3 + ], + 3.5 + ], + 9 + ], + 18, + [ + "coalesce", + [ + "to-number", + [ + "get", + "height" + ] + ], + [ + "*", + [ + "coalesce", + [ + "to-number", + [ + "get", + "num_floors" + ] + ], + 3 + ], + 3.5 + ], + 12 + ] + ], + "fill-extrusion-base": [ + "coalesce", + [ + "to-number", + [ + "get", + "min_height" + ] + ], + 0 + ], + "fill-extrusion-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 0.6, + 17, + 0.88 + ], + "fill-extrusion-vertical-gradient": true + } + }, + { + "id": "overture-building-footprint", + "type": "fill", + "source": "overture_buildings", + "source-layer": "overture_building", + "minzoom": 15, + "maxzoom": 16, + "paint": { + "fill-color": "#DDD8D0", + "fill-opacity": 0.82, + "fill-outline-color": "#C4BEB4" + } + }, + { + "id": "railway-label", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "railway", + "rail", + "subway", + "light_rail", + "tram" + ], + "minzoom": 13, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "symbol-placement": "line", + "text-padding": 6, + "text-allow-overlap": false + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "railway" + ], + "subway", + "#CC2233", + "light_rail", + "#0055BB", + "tram", + "#7722AA", + "#4A5568" + ], + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "waterway-label", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "waterway", + "river", + "canal" + ], + [ + "!=", + "intermittent", + "yes" + ], + [ + "has", + "name" + ] + ], + "minzoom": 12, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "symbol-placement": "line", + "text-letter-spacing": 0.1 + }, + "paint": { + "text-color": "#2E86AB", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "building-number-polygon", + "type": "symbol", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "minzoom": 17, + "filter": [ + "has", + "addr:housenumber" + ], + "layout": { + "text-field": "{addr:housenumber}", + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#5A5048", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 1.5 + } + }, + { + "id": "building-number-point", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 17, + "filter": [ + "has", + "addr:housenumber" + ], + "layout": { + "text-field": "{addr:housenumber}", + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#5A5048", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 1.5 + } + }, + { + "id": "overture-building-names", + "type": "symbol", + "source": "overture_buildings", + "source-layer": "overture_building", + "minzoom": 17, + "filter": [ + "has", + "names" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "names" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-anchor": "center", + "text-allow-overlap": false, + "text-max-width": 8 + }, + "paint": { + "text-color": "#5A5048", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 1.5 + } + }, + { + "id": "road-labels-minor", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "residential", + "service", + "unclassified", + "living_street" + ], + "minzoom": 16, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 10, + 18, + 13 + ], + "symbol-placement": "line", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-keep-upright": true, + "text-max-angle": 25, + "symbol-spacing": 300, + "text-letter-spacing": 0.04, + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#4A5568", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 1.8 + } + }, + { + "id": "road-labels-major", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "primary", + "secondary", + "tertiary", + "motorway", + "trunk" + ], + "minzoom": 12, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 10, + 14, + 13, + 18, + 16 + ], + "symbol-placement": "line", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-keep-upright": true, + "text-max-angle": 22, + "symbol-spacing": 350, + "text-letter-spacing": 0.05, + "text-padding": 12, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#1A2332", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2.5 + } + }, + { + "id": "overture-street-names", + "type": "symbol", + "source": "overture_segments", + "source-layer": "overture_segment", + "minzoom": 14, + "filter": [ + "has", + "names" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "names" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 9, + 16, + 12, + 18, + 14 + ], + "symbol-placement": "line", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-keep-upright": true, + "text-max-angle": 28, + "symbol-spacing": 280, + "text-letter-spacing": 0.04, + "text-padding": 15, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#4A5568", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "poi-hospital", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 13, + "filter": [ + "==", + "amenity", + "hospital" + ], + "layout": { + "icon-image": "hospital", + "icon-size": 1.0, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#C0392B", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "poi-pharmacy", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 15, + "filter": [ + "==", + "amenity", + "pharmacy" + ], + "layout": { + "icon-image": "pharmacy", + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#1A7A3C", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "poi-place-of-worship", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 14, + "filter": [ + "==", + "amenity", + "place_of_worship" + ], + "layout": { + "icon-image": "tourist", + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#1A6B3A", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "poi-school", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 14, + "filter": [ + "in", + "amenity", + "school", + "university", + "college" + ], + "layout": { + "icon-image": "college", + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#5A4A8A", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "poi-restaurant-cafe", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 16, + "filter": [ + "in", + "amenity", + "restaurant", + "cafe", + "fast_food" + ], + "layout": { + "icon-image": [ + "match", + [ + "get", + "amenity" + ], + "cafe", + "cafe", + "restaurant" + ], + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top" + }, + "paint": { + "text-color": "#3D4A5C", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 1.5 + } + }, + { + "id": "poi-transit-station", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 12, + "filter": [ + "any", + [ + "==", + "railway", + "station" + ], + [ + "==", + "railway", + "halt" + ], + [ + "==", + "railway", + "tram_stop" + ], + [ + "==", + "station", + "subway" + ], + [ + "==", + "amenity", + "bus_station" + ] + ], + "layout": { + "icon-image": "rail", + "icon-size": 1, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.4 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#CC2233", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "place-labels-area", + "type": "symbol", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "minzoom": 10, + "filter": [ + "has", + "name" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 10, + 14, + 13 + ], + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#34495E", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "place-labels-point", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 10, + "filter": [ + "any", + [ + "in", + "place", + "city", + "town", + "village", + "suburb", + "neighbourhood", + "hamlet", + "locality", + "quarter" + ], + [ + "in", + "natural", + "peak", + "spring" + ] + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "place" + ], + "city", + 16, + "town", + 14, + 11 + ], + 14, + [ + "match", + [ + "get", + "place" + ], + "city", + 20, + "town", + 16, + 13 + ], + 17, + 14 + ], + "text-letter-spacing": [ + "match", + [ + "get", + "place" + ], + "city", + 0.08, + "town", + 0.05, + 0.02 + ], + "text-anchor": "center", + "text-padding": 10, + "text-allow-overlap": false + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "place" + ], + "city", + "#1A2740", + "town", + "#2C3E50", + "suburb", + "#34495E", + "neighbourhood", + "#34495E", + "#34495E" + ], + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": [ + "match", + [ + "get", + "place" + ], + "city", + 3, + "town", + 2.5, + 2 + ] + } + }, + { + "id": "places-egypt-labels", + "type": "symbol", + "source": "places_egypt", + "source-layer": "places_egypt", + "minzoom": 12, + "filter": [ + "!in", + "category", + "street" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 9, + 16, + 13 + ], + "text-offset": [ + 0, + 1.5 + ], + "text-anchor": "top", + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#2D3748", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "places-syria-labels", + "type": "symbol", + "source": "places_syria", + "source-layer": "places_syria", + "minzoom": 10, + "filter": [ + "!in", + "category", + "street" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 9, + 16, + 13 + ], + "text-offset": [ + 0, + 1.5 + ], + "text-anchor": "top", + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#2D3748", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + }, + { + "id": "places-jordan-labels", + "type": "symbol", + "source": "places_jordan", + "source-layer": "places_jordan", + "minzoom": 10, + "filter": [ + "!in", + "category", + "street" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 9, + 16, + 13 + ], + "text-offset": [ + 0, + 1.5 + ], + "text-anchor": "top", + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#2D3748", + "text-halo-color": "rgba(255,255,255,0.93)", + "text-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/apps/driver_new/assets/style_dark.json b/apps/driver_new/assets/style_dark.json new file mode 100644 index 0000000..182c721 --- /dev/null +++ b/apps/driver_new/assets/style_dark.json @@ -0,0 +1,2178 @@ +{ + "version": 8, + "name": "Siro Premium — Dark v2.9", + "metadata": { + "brand": "Siro", + "version": "2.10.0-dark", + "description": "Siro dark theme — buildings at close zoom only, on-road labels, improved arrows" + }, + "center": [ + 36.276008, + 33.513685 + ], + "zoom": 15, + "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://tiles.intaleqapp.com/planet_osm_polygon/{z}/{x}/{y}" + ], + "maxzoom": 14, + "attribution": "© Siro | © OpenStreetMap contributors" + }, + "local-osm-lines": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/planet_osm_line/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "local-osm-points": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/planet_osm_point/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "places_egypt": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/places_egypt/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "places_syria": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/places_syria/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "places_jordan": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/places_jordan/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "overture_buildings": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/overture_building/{z}/{x}/{y}" + ], + "maxzoom": 14 + }, + "overture_segments": { + "type": "vector", + "tiles": [ + "https://tiles.intaleqapp.com/overture_segment/{z}/{x}/{y}" + ], + "maxzoom": 14 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#141920" + } + }, + { + "id": "landuse-residential", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "residential" + ], + "paint": { + "fill-color": "#1A2130", + "fill-opacity": 0.9 + } + }, + { + "id": "landuse-commercial", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "commercial" + ], + "paint": { + "fill-color": "#1E1C18", + "fill-opacity": 0.9 + } + }, + { + "id": "landuse-cemetery", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "cemetery" + ], + "paint": { + "fill-color": "#1A2E1A", + "fill-opacity": 0.9 + } + }, + { + "id": "landuse-military", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "military" + ], + "paint": { + "fill-color": "#28241C", + "fill-opacity": 0.9 + } + }, + { + "id": "landuse-industrial", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "in", + "landuse", + "industrial", + "railway" + ], + "paint": { + "fill-color": "#1C2028", + "fill-opacity": 1 + } + }, + { + "id": "park-layer", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "any", + [ + "in", + "leisure", + "park", + "garden", + "nature_reserve", + "pitch", + "playground" + ], + [ + "in", + "landuse", + "grass", + "meadow", + "forest" + ], + [ + "in", + "natural", + "wood", + "scrub", + "heath" + ] + ], + "paint": { + "fill-color": [ + "match", + [ + "get", + "leisure" + ], + "pitch", + "#1A3020", + "playground", + "#1C2A1C", + "#172217" + ], + "fill-opacity": 0.85 + } + }, + { + "id": "park-outline", + "type": "line", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "in", + "leisure", + "park", + "garden", + "nature_reserve" + ], + "paint": { + "line-color": "#1A3020", + "line-width": 0.8, + "line-opacity": 0.6 + } + }, + { + "id": "water-polygon", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "any", + [ + "in", + "natural", + "water", + "lake", + "bay" + ], + [ + "==", + "waterway", + "riverbank" + ], + [ + "in", + "landuse", + "basin", + "reservoir" + ], + [ + "==", + "amenity", + "fountain" + ] + ], + "paint": { + "fill-color": "#0D2A40", + "fill-opacity": 0.95 + } + }, + { + "id": "water-polygon-outline", + "type": "line", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "any", + [ + "in", + "natural", + "water", + "lake", + "bay" + ], + [ + "==", + "waterway", + "riverbank" + ], + [ + "in", + "landuse", + "basin", + "reservoir" + ] + ], + "paint": { + "line-color": "#1A4A6A", + "line-width": 0.8, + "line-opacity": 0.8 + } + }, + { + "id": "waterway-river", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "waterway", + "river", + "canal" + ], + [ + "!=", + "intermittent", + "yes" + ], + [ + "!=", + "seasonal", + "yes" + ], + [ + "!=", + "tunnel", + "yes" + ] + ], + "paint": { + "line-color": "#1A4A6A", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1.5, + 14, + 4, + 16, + 7 + ], + "line-opacity": 0.95 + } + }, + { + "id": "waterway-stream-drain", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "waterway", + "stream", + "drain", + "ditch" + ], + [ + "!=", + "intermittent", + "yes" + ], + [ + "!=", + "seasonal", + "yes" + ], + [ + "!=", + "tunnel", + "yes" + ] + ], + "minzoom": 13, + "paint": { + "line-color": "#153A52", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 0.8, + 16, + 2.5 + ], + "line-opacity": 0.85 + } + }, + { + "id": "railway-area", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "==", + "landuse", + "railway" + ], + "paint": { + "fill-color": "#202830", + "fill-opacity": 0.9 + } + }, + { + "id": "railway-rail-casing", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "railway", + "rail", + "narrow_gauge", + "preserved" + ], + [ + "!=", + "service", + "yard" + ], + [ + "!=", + "service", + "siding" + ] + ], + "minzoom": 8, + "paint": { + "line-color": "#3A4050", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 2, + 12, + 4, + 16, + 8 + ] + } + }, + { + "id": "railway-rail-core", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "railway", + "rail", + "narrow_gauge", + "preserved" + ], + [ + "!=", + "service", + "yard" + ], + [ + "!=", + "service", + "siding" + ] + ], + "minzoom": 8, + "paint": { + "line-color": "#4A5568", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 1, + 12, + 2.5, + 16, + 5 + ], + "line-dasharray": [ + 6, + 4 + ] + } + }, + { + "id": "railway-subway-casing", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "railway", + "subway", + "light_rail", + "tram", + "monorail" + ], + "minzoom": 10, + "paint": { + "line-color": [ + "match", + [ + "get", + "railway" + ], + "subway", + "#AA1122", + "light_rail", + "#0055AA", + "tram", + "#7722AA", + "monorail", + "#007744", + "#BB3344" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 3, + 14, + 6, + 16, + 10 + ] + } + }, + { + "id": "railway-subway-core", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "railway", + "subway", + "light_rail", + "tram", + "monorail" + ], + "minzoom": 10, + "paint": { + "line-color": [ + "match", + [ + "get", + "railway" + ], + "subway", + "#FF4455", + "light_rail", + "#33AAFF", + "tram", + "#CC55FF", + "monorail", + "#00DD88", + "#FF4455" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 1.5, + 14, + 3.5, + 16, + 6 + ] + } + }, + { + "id": "road-casing-track-path", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "track", + "path", + "footway", + "cycleway", + "steps" + ], + "minzoom": 14, + "paint": { + "line-color": "#252C38", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 1, + 16, + 4 + ], + "line-dasharray": [ + 4, + 3 + ] + } + }, + { + "id": "road-casing-minor", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "residential", + "service", + "unclassified", + "living_street", + "pedestrian" + ], + "paint": { + "line-color": "#252C38", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 1.5, + 16, + 10 + ], + "line-opacity": 0.7 + } + }, + { + "id": "road-core-minor", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "residential", + "service", + "unclassified", + "living_street", + "pedestrian" + ], + "paint": { + "line-color": "#2E3848", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 0.8, + 16, + 8 + ] + } + }, + { + "id": "road-casing-tertiary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "tertiary", + "tertiary_link" + ], + "paint": { + "line-color": "#2A3040", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 2, + 16, + 14 + ], + "line-opacity": 0.75 + } + }, + { + "id": "road-core-tertiary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "tertiary", + "tertiary_link" + ], + "paint": { + "line-color": "#38465A", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 1.2, + 16, + 11 + ] + } + }, + { + "id": "road-casing-secondary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "secondary", + "secondary_link" + ], + "paint": { + "line-color": "#3A3010", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 2.5, + 16, + 16 + ], + "line-opacity": 0.8 + } + }, + { + "id": "road-core-secondary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "secondary", + "secondary_link" + ], + "paint": { + "line-color": "#4A3E18", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 1.8, + 16, + 13 + ] + } + }, + { + "id": "road-casing-primary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "primary", + "primary_link" + ], + "paint": { + "line-color": "#5A4A10", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 3, + 16, + 18 + ], + "line-opacity": 0.7 + } + }, + { + "id": "road-core-primary", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "primary", + "primary_link" + ], + "paint": { + "line-color": "#7A6418", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 2, + 16, + 14 + ] + } + }, + { + "id": "road-casing-motorway", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "motorway", + "motorway_link", + "trunk", + "trunk_link" + ], + "paint": { + "line-color": "#6A5010", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 4, + 16, + 20 + ], + "line-opacity": 0.75 + } + }, + { + "id": "road-core-motorway", + "type": "line", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "motorway", + "motorway_link", + "trunk", + "trunk_link" + ], + "paint": { + "line-color": "#8A6A18", + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 9, + 2.5, + 16, + 16 + ] + } + }, + { + "id": "road-direction-arrows", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "minzoom": 15, + "filter": [ + "all", + [ + "in", + "highway", + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "residential", + "unclassified", + "living_street" + ], + [ + "==", + "oneway", + "yes" + ] + ], + "layout": { + "symbol-placement": "line", + "symbol-spacing": 120, + "text-field": "→", + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 16, + 17, + 22, + 19, + 28 + ], + "text-keep-upright": false, + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-allow-overlap": true, + "text-ignore-placement": true, + "text-padding": 0, + "text-letter-spacing": -0.1 + }, + "paint": { + "text-color": "rgba(160,180,210,0.5)", + "text-halo-color": "rgba(0,0,0,0.3)", + "text-halo-width": 1 + } + }, + { + "id": "building-fill-flat", + "type": "fill", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "filter": [ + "has", + "building" + ], + "minzoom": 15, + "maxzoom": 16, + "paint": { + "fill-color": "#252C38", + "fill-opacity": 0.85, + "fill-outline-color": "#1E2530" + } + }, + { + "id": "building-3d", + "type": "fill-extrusion", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "minzoom": 16, + "filter": [ + "has", + "building" + ], + "paint": { + "fill-extrusion-color": "#252C38", + "fill-extrusion-height": [ + "coalesce", + [ + "to-number", + [ + "get", + "height" + ] + ], + [ + "*", + [ + "to-number", + [ + "get", + "building:levels" + ], + 2 + ], + 3.5 + ], + 7 + ], + "fill-extrusion-base": [ + "coalesce", + [ + "to-number", + [ + "get", + "min_height" + ] + ], + 0 + ], + "fill-extrusion-opacity": 0.8, + "fill-extrusion-vertical-gradient": true + } + }, + { + "id": "building-3d-overture", + "type": "fill-extrusion", + "source": "overture_buildings", + "source-layer": "overture_building", + "minzoom": 16, + "paint": { + "fill-extrusion-color": [ + "match", + [ + "get", + "subtype" + ], + "commercial", + "#2A3A50", + "retail", + "#2E3A4A", + "industrial", + "#1E2A38", + "religious", + "#24203A", + "education", + "#1E3024", + "medical", + "#3A2020", + "#2A3245" + ], + "fill-extrusion-height": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + [ + "coalesce", + [ + "to-number", + [ + "get", + "height" + ] + ], + [ + "*", + [ + "coalesce", + [ + "to-number", + [ + "get", + "num_floors" + ] + ], + 3 + ], + 3.5 + ], + 9 + ], + 18, + [ + "coalesce", + [ + "to-number", + [ + "get", + "height" + ] + ], + [ + "*", + [ + "coalesce", + [ + "to-number", + [ + "get", + "num_floors" + ] + ], + 3 + ], + 3.5 + ], + 12 + ] + ], + "fill-extrusion-base": [ + "coalesce", + [ + "to-number", + [ + "get", + "min_height" + ] + ], + 0 + ], + "fill-extrusion-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 0.6, + 17, + 0.88 + ], + "fill-extrusion-vertical-gradient": true + } + }, + { + "id": "overture-building-footprint", + "type": "fill", + "source": "overture_buildings", + "source-layer": "overture_building", + "minzoom": 15, + "maxzoom": 16, + "paint": { + "fill-color": "#252C38", + "fill-opacity": 0.82, + "fill-outline-color": "#1E2530" + } + }, + { + "id": "railway-label", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "railway", + "rail", + "subway", + "light_rail", + "tram" + ], + "minzoom": 13, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "symbol-placement": "line", + "text-padding": 6, + "text-allow-overlap": false + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "railway" + ], + "subway", + "#FF5566", + "light_rail", + "#0055BB", + "tram", + "#7722AA", + "#4A5568" + ], + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "waterway-label", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "all", + [ + "in", + "waterway", + "river", + "canal" + ], + [ + "!=", + "intermittent", + "yes" + ], + [ + "has", + "name" + ] + ], + "minzoom": 12, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "symbol-placement": "line", + "text-letter-spacing": 0.1 + }, + "paint": { + "text-color": "#4AA8D8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "building-number-polygon", + "type": "symbol", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "minzoom": 17, + "filter": [ + "has", + "addr:housenumber" + ], + "layout": { + "text-field": "{addr:housenumber}", + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#8898A8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 1.5 + } + }, + { + "id": "building-number-point", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 17, + "filter": [ + "has", + "addr:housenumber" + ], + "layout": { + "text-field": "{addr:housenumber}", + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#8898A8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 1.5 + } + }, + { + "id": "overture-building-names", + "type": "symbol", + "source": "overture_buildings", + "source-layer": "overture_building", + "minzoom": 17, + "filter": [ + "has", + "names" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "names" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-anchor": "center", + "text-allow-overlap": false, + "text-max-width": 8 + }, + "paint": { + "text-color": "#8898A8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 1.5 + } + }, + { + "id": "road-labels-minor", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "residential", + "service", + "unclassified", + "living_street" + ], + "minzoom": 16, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 10, + 18, + 13 + ], + "symbol-placement": "line", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-keep-upright": true, + "text-max-angle": 25, + "symbol-spacing": 300, + "text-letter-spacing": 0.04, + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#8BA0B8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 1.8 + } + }, + { + "id": "road-labels-major", + "type": "symbol", + "source": "local-osm-lines", + "source-layer": "planet_osm_line", + "filter": [ + "in", + "highway", + "primary", + "secondary", + "tertiary", + "motorway", + "trunk" + ], + "minzoom": 12, + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 10, + 14, + 13, + 18, + 16 + ], + "symbol-placement": "line", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-keep-upright": true, + "text-max-angle": 22, + "symbol-spacing": 350, + "text-letter-spacing": 0.05, + "text-padding": 12, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#C8D8E8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2.5 + } + }, + { + "id": "overture-street-names", + "type": "symbol", + "source": "overture_segments", + "source-layer": "overture_segment", + "minzoom": 14, + "filter": [ + "has", + "names" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "names" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + 9, + 16, + 12, + 18, + 14 + ], + "symbol-placement": "line", + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-keep-upright": true, + "text-max-angle": 28, + "symbol-spacing": 280, + "text-letter-spacing": 0.04, + "text-padding": 15, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#8BA0B8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "poi-hospital", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 13, + "filter": [ + "==", + "amenity", + "hospital" + ], + "layout": { + "icon-image": "hospital", + "icon-size": 1.0, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#FF6B6B", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "poi-pharmacy", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 15, + "filter": [ + "==", + "amenity", + "pharmacy" + ], + "layout": { + "icon-image": "pharmacy", + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#4ADB80", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "poi-place-of-worship", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 14, + "filter": [ + "==", + "amenity", + "place_of_worship" + ], + "layout": { + "icon-image": "tourist", + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#4ACA78", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "poi-school", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 14, + "filter": [ + "in", + "amenity", + "school", + "university", + "college" + ], + "layout": { + "icon-image": "college", + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#A888E8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "poi-restaurant-cafe", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 16, + "filter": [ + "in", + "amenity", + "restaurant", + "cafe", + "fast_food" + ], + "layout": { + "icon-image": [ + "match", + [ + "get", + "amenity" + ], + "cafe", + "cafe", + "restaurant" + ], + "icon-size": 0.8, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 10, + "text-offset": [ + 0, + 1.2 + ], + "text-anchor": "top" + }, + "paint": { + "text-color": "#A0B8D0", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 1.5 + } + }, + { + "id": "poi-transit-station", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 12, + "filter": [ + "any", + [ + "==", + "railway", + "station" + ], + [ + "==", + "railway", + "halt" + ], + [ + "==", + "railway", + "tram_stop" + ], + [ + "==", + "station", + "subway" + ], + [ + "==", + "amenity", + "bus_station" + ] + ], + "layout": { + "icon-image": "rail", + "icon-size": 1, + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": 11, + "text-offset": [ + 0, + 1.4 + ], + "text-anchor": "top", + "text-allow-overlap": false + }, + "paint": { + "text-color": "#FF5566", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "place-labels-area", + "type": "symbol", + "source": "local-osm-polygons", + "source-layer": "planet_osm_polygon", + "minzoom": 10, + "filter": [ + "has", + "name" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 10, + 14, + 13 + ], + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#8AA0B8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "place-labels-point", + "type": "symbol", + "source": "local-osm-points", + "source-layer": "planet_osm_point", + "minzoom": 10, + "filter": [ + "any", + [ + "in", + "place", + "city", + "town", + "village", + "suburb", + "neighbourhood", + "hamlet", + "locality", + "quarter" + ], + [ + "in", + "natural", + "peak", + "spring" + ] + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name:ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "place" + ], + "city", + 16, + "town", + 14, + 11 + ], + 14, + [ + "match", + [ + "get", + "place" + ], + "city", + 20, + "town", + 16, + 13 + ], + 17, + 14 + ], + "text-letter-spacing": [ + "match", + [ + "get", + "place" + ], + "city", + 0.08, + "town", + 0.05, + 0.02 + ], + "text-anchor": "center", + "text-padding": 10, + "text-allow-overlap": false + }, + "paint": { + "text-color": [ + "match", + [ + "get", + "place" + ], + "city", + "#D0E0F0", + "town", + "#B8CDE0", + "suburb", + "#8AA0B8", + "neighbourhood", + "#8AA0B8", + "#8AA0B8" + ], + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": [ + "match", + [ + "get", + "place" + ], + "city", + 3, + "town", + 2.5, + 2 + ] + } + }, + { + "id": "places-egypt-labels", + "type": "symbol", + "source": "places_egypt", + "source-layer": "places_egypt", + "minzoom": 12, + "filter": [ + "!in", + "category", + "street" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 9, + 16, + 13 + ], + "text-offset": [ + 0, + 1.5 + ], + "text-anchor": "top", + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#A8C0D8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "places-syria-labels", + "type": "symbol", + "source": "places_syria", + "source-layer": "places_syria", + "minzoom": 10, + "filter": [ + "!in", + "category", + "street" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 9, + 16, + 13 + ], + "text-offset": [ + 0, + 1.5 + ], + "text-anchor": "top", + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#A8C0D8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + }, + { + "id": "places-jordan-labels", + "type": "symbol", + "source": "places_jordan", + "source-layer": "places_jordan", + "minzoom": 10, + "filter": [ + "!in", + "category", + "street" + ], + "layout": { + "text-field": [ + "coalesce", + [ + "get", + "name_ar" + ], + [ + "get", + "name" + ], + "" + ], + "text-font": [ + "Noto Sans Bold" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 12, + 9, + 16, + 13 + ], + "text-offset": [ + 0, + 1.5 + ], + "text-anchor": "top", + "text-padding": 8, + "text-allow-overlap": false + }, + "paint": { + "text-color": "#A8C0D8", + "text-halo-color": "rgba(20,25,32,0.92)", + "text-halo-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/apps/driver_new/lib/features/trip/view/widgets/ride_map.dart b/apps/driver_new/lib/features/trip/view/widgets/ride_map.dart index 75c2420..24752cc 100644 --- a/apps/driver_new/lib/features/trip/view/widgets/ride_map.dart +++ b/apps/driver_new/lib/features/trip/view/widgets/ride_map.dart @@ -83,6 +83,10 @@ class _RideMapState extends State { static const _fallback = im.LatLng(31.9539, 35.9106); // عمّان + /// الستايلان مرفقان في `assets/` — منقولان من سيرو الميداني. + static const _lightStyleAsset = 'assets/style.json'; + static const _darkStyleAsset = 'assets/style_dark.json'; + @override void didUpdateWidget(RideMap old) { super.didUpdateWidget(old); @@ -200,9 +204,17 @@ class _RideMapState extends State { // الخريطة تبدّل ستايلها مع الثيم — خريطة نهارية في وضع ليلي تكسر // الغرض (docs/26 §2). وتبديله يهدم مديري التعليقات، فيُصفَّر العَلَم. - final styleUrl = isDark - ? im.IntaleqStyles.obsidian(AppConfig.mapApiKey) - : im.IntaleqStyles.light(AppConfig.mapApiKey); + // + // ⚠️ **ستايل محلّي لا بعيد.** ستايل map-saas البعيد + // (`/api/maps/style.json?theme=light`) فيه **12 طبقة `symbol` تستعمل + // `icon-image` بلا `sprite` معرَّف** — وMapLibre الأصلي يرمي عندها + // `std::domain_error` فيُسقط التطبيق قبل أن يظهر إطار واحد + // (مثبت 2026-08-05). الستايلان المرفقان في `assets/` سليمان: بهما + // `sprite` وبلاطاتهما من `tiles.intaleqapp.com` نفسها. + // + // ومعها نكسب الإقلاع بلا انتظار شبكة — وهو ما يعنيه «الشكل حتمي من أول + // إقلاع» (docs/26 §1). + final styleUrl = isDark ? _darkStyleAsset : _lightStyleAsset; if (_styleUrl != null && _styleUrl != styleUrl) _styleReady = false; _styleUrl = styleUrl; diff --git a/apps/rider_new/lib/features/trip/view/widgets/ride_map.dart b/apps/rider_new/lib/features/trip/view/widgets/ride_map.dart index 75c2420..24752cc 100644 --- a/apps/rider_new/lib/features/trip/view/widgets/ride_map.dart +++ b/apps/rider_new/lib/features/trip/view/widgets/ride_map.dart @@ -83,6 +83,10 @@ class _RideMapState extends State { static const _fallback = im.LatLng(31.9539, 35.9106); // عمّان + /// الستايلان مرفقان في `assets/` — منقولان من سيرو الميداني. + static const _lightStyleAsset = 'assets/style.json'; + static const _darkStyleAsset = 'assets/style_dark.json'; + @override void didUpdateWidget(RideMap old) { super.didUpdateWidget(old); @@ -200,9 +204,17 @@ class _RideMapState extends State { // الخريطة تبدّل ستايلها مع الثيم — خريطة نهارية في وضع ليلي تكسر // الغرض (docs/26 §2). وتبديله يهدم مديري التعليقات، فيُصفَّر العَلَم. - final styleUrl = isDark - ? im.IntaleqStyles.obsidian(AppConfig.mapApiKey) - : im.IntaleqStyles.light(AppConfig.mapApiKey); + // + // ⚠️ **ستايل محلّي لا بعيد.** ستايل map-saas البعيد + // (`/api/maps/style.json?theme=light`) فيه **12 طبقة `symbol` تستعمل + // `icon-image` بلا `sprite` معرَّف** — وMapLibre الأصلي يرمي عندها + // `std::domain_error` فيُسقط التطبيق قبل أن يظهر إطار واحد + // (مثبت 2026-08-05). الستايلان المرفقان في `assets/` سليمان: بهما + // `sprite` وبلاطاتهما من `tiles.intaleqapp.com` نفسها. + // + // ومعها نكسب الإقلاع بلا انتظار شبكة — وهو ما يعنيه «الشكل حتمي من أول + // إقلاع» (docs/26 §1). + final styleUrl = isDark ? _darkStyleAsset : _lightStyleAsset; if (_styleUrl != null && _styleUrl != styleUrl) _styleReady = false; _styleUrl = styleUrl; diff --git a/docs/23-flutter-conventions.md b/docs/23-flutter-conventions.md index bff3d00..69905d8 100644 --- a/docs/23-flutter-conventions.md +++ b/docs/23-flutter-conventions.md @@ -248,4 +248,24 @@ MapLibre يُنشئ «مديري التعليقات» عند تحميل الست ثلاثة نداءات منصّة. حارس `_syncing` إلزامي وإلا تتكدّس النداءات وتلتهم الإطارات. +### الستايل محلّي لا بعيد + +**ممنوع تمرير `IntaleqStyles.light()`/`obsidian()` (الستايل البعيد).** + +ستايل map-saas البعيد `/api/maps/style.json?theme=light` فيه **12 طبقة +`symbol` تستعمل `icon-image` بلا `sprite` معرَّف**، وMapLibre الأصلي يرمي +عندها `std::domain_error` فيُسقط التطبيق قبل ظهور إطار واحد. مثبت بفحص +الستايل مباشرةً 2026-08-05. + +⚠️ الستايل المرفق **بالحزمة نفسها** (`packages/intaleq_maps/assets/style.json`) +مصابٌ بالعيب ذاته — sprite غائب و12 طبقة أيقونات. الوضع الليلي المرفق بها +سليم. فلا يُعتمد على افتراضات الحزمة أيضاً. + +**المعتمد**: `assets/style.json` و`assets/style_dark.json` المنقولان من سيرو +الميداني — بهما `sprite` صحيح، وبلاطاتهما من `tiles.intaleqapp.com` نفسها، +ويقلعان بلا انتظار شبكة (docs/26 §1). + +**الإصلاح الجذري على الخادم** (لا يخصّ التطبيق): إضافة `sprite` لستايل +map-saas البعيد، أو إزالة طبقات الأيقونات منه. + المرجع العملي: `apps/rider_new/lib/features/trip/view/widgets/ride_map.dart`.