feat: implement geometry snapping logic for manual road insertion and approved roads topology
This commit is contained in:
+245
-17
@@ -84,6 +84,23 @@
|
||||
"https://tiles.intaleqapp.com/places_iraq/{z}/{x}/{y}"
|
||||
],
|
||||
"maxzoom": 14
|
||||
},
|
||||
"terrain-source": {
|
||||
"type": "raster-dem",
|
||||
"tiles": [
|
||||
"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"
|
||||
],
|
||||
"encoding": "terrarium",
|
||||
"tileSize": 256,
|
||||
"maxzoom": 15
|
||||
},
|
||||
"jordan_contours": {
|
||||
"type": "vector",
|
||||
"tiles": [
|
||||
"https://tiles.intaleqapp.com/jordan_contours/{z}/{x}/{y}"
|
||||
],
|
||||
"minzoom": 10,
|
||||
"maxzoom": 16
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
@@ -94,6 +111,108 @@
|
||||
"background-color": "#F6F4F0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "hillshading",
|
||||
"type": "hillshade",
|
||||
"source": "terrain-source",
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"hillshade-illumination-direction": 135,
|
||||
"hillshade-illumination-anchor": "viewport",
|
||||
"hillshade-shadow-color": "#2c1c0a",
|
||||
"hillshade-highlight-color": "#ffffff",
|
||||
"hillshade-accent-color": "#000000",
|
||||
"hillshade-exaggeration": 0.4
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "admin-boundary-national",
|
||||
"type": "line",
|
||||
"source": "local-osm-lines",
|
||||
"source-layer": "planet_osm_line",
|
||||
"filter": [
|
||||
"all",
|
||||
["==", "boundary", "administrative"],
|
||||
["in", "admin_level", "2", 2, "3", 3]
|
||||
],
|
||||
"paint": {
|
||||
"line-color": "#1e293b",
|
||||
"line-width": 3,
|
||||
"line-dasharray": [6, 2, 2, 2]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "admin-boundary-governorate-poly",
|
||||
"type": "line",
|
||||
"source": "local-osm-polygons",
|
||||
"source-layer": "planet_osm_polygon",
|
||||
"minzoom": 5,
|
||||
"filter": [
|
||||
"all",
|
||||
["==", "boundary", "administrative"],
|
||||
["in", "admin_level", "4", 4, "5", 5]
|
||||
],
|
||||
"paint": {
|
||||
"line-color": "#4f46e5",
|
||||
"line-width": 2.2,
|
||||
"line-dasharray": [4, 2],
|
||||
"line-opacity": 0.9
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "admin-boundary-governorate",
|
||||
"type": "line",
|
||||
"source": "local-osm-lines",
|
||||
"source-layer": "planet_osm_line",
|
||||
"minzoom": 5,
|
||||
"filter": [
|
||||
"all",
|
||||
["==", "boundary", "administrative"],
|
||||
["in", "admin_level", "4", 4, "5", 5]
|
||||
],
|
||||
"paint": {
|
||||
"line-color": "#4f46e5",
|
||||
"line-width": 2.2,
|
||||
"line-dasharray": [4, 2]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "admin-boundary-district-poly",
|
||||
"type": "line",
|
||||
"source": "local-osm-polygons",
|
||||
"source-layer": "planet_osm_polygon",
|
||||
"minzoom": 9,
|
||||
"filter": [
|
||||
"all",
|
||||
["==", "boundary", "administrative"],
|
||||
["in", "admin_level", "6", 6, "7", 7, "8", 8, "9", 9, "10", 10]
|
||||
],
|
||||
"paint": {
|
||||
"line-color": "#64748b",
|
||||
"line-width": 1.5,
|
||||
"line-dasharray": [3, 2],
|
||||
"line-opacity": 0.85
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "admin-boundary-district",
|
||||
"type": "line",
|
||||
"source": "local-osm-lines",
|
||||
"source-layer": "planet_osm_line",
|
||||
"minzoom": 9,
|
||||
"filter": [
|
||||
"all",
|
||||
["==", "boundary", "administrative"],
|
||||
["in", "admin_level", "6", 6, "7", 7, "8", 8, "9", 9, "10", 10]
|
||||
],
|
||||
"paint": {
|
||||
"line-color": "#64748b",
|
||||
"line-width": 1.5,
|
||||
"line-dasharray": [3, 2]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "landuse-residential",
|
||||
"type": "fill",
|
||||
@@ -920,22 +1039,28 @@
|
||||
"line-join": "round"
|
||||
},
|
||||
"paint": {
|
||||
"line-color": "#B9C2CE",
|
||||
"line-color": "#D6DBE1",
|
||||
"line-width": [
|
||||
"interpolate",
|
||||
[
|
||||
"linear"
|
||||
"exponential",
|
||||
1.6
|
||||
],
|
||||
[
|
||||
"zoom"
|
||||
],
|
||||
12,
|
||||
2.2,
|
||||
12.5,
|
||||
1.6,
|
||||
15,
|
||||
4.5,
|
||||
16,
|
||||
10
|
||||
10,
|
||||
18,
|
||||
15
|
||||
],
|
||||
"line-opacity": 0.9
|
||||
}
|
||||
"line-opacity": 0.7
|
||||
},
|
||||
"minzoom": 12.5
|
||||
},
|
||||
{
|
||||
"id": "approved-road-core",
|
||||
@@ -951,17 +1076,23 @@
|
||||
"line-width": [
|
||||
"interpolate",
|
||||
[
|
||||
"linear"
|
||||
"exponential",
|
||||
1.6
|
||||
],
|
||||
[
|
||||
"zoom"
|
||||
],
|
||||
12,
|
||||
0.8,
|
||||
12.5,
|
||||
1.0,
|
||||
15,
|
||||
3.2,
|
||||
16,
|
||||
8
|
||||
8,
|
||||
18,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"minzoom": 12.5
|
||||
},
|
||||
{
|
||||
"id": "road-casing-tertiary",
|
||||
@@ -1258,12 +1389,60 @@
|
||||
"fill-outline-color": "#C8C0B2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "building-3d-osm",
|
||||
"type": "fill-extrusion",
|
||||
"source": "local-osm-polygons",
|
||||
"source-layer": "planet_osm_polygon",
|
||||
"minzoom": 13,
|
||||
"filter": [
|
||||
"has",
|
||||
"building"
|
||||
],
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
"paint": {
|
||||
"fill-extrusion-color": "#DDD8D0",
|
||||
"fill-extrusion-height": [
|
||||
"coalesce",
|
||||
[
|
||||
"to-number",
|
||||
[
|
||||
"get",
|
||||
"height"
|
||||
],
|
||||
null
|
||||
],
|
||||
[
|
||||
"*",
|
||||
[
|
||||
"coalesce",
|
||||
[
|
||||
"to-number",
|
||||
[
|
||||
"get",
|
||||
"building:levels"
|
||||
],
|
||||
null
|
||||
],
|
||||
3
|
||||
],
|
||||
3.5
|
||||
],
|
||||
12
|
||||
],
|
||||
"fill-extrusion-base": 0,
|
||||
"fill-extrusion-opacity": 0.85,
|
||||
"fill-extrusion-vertical-gradient": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "building-3d",
|
||||
"type": "fill-extrusion",
|
||||
"source": "overture_buildings",
|
||||
"source-layer": "overture_building",
|
||||
"minzoom": 16,
|
||||
"minzoom": 13,
|
||||
"layout": {
|
||||
"visibility": "visible"
|
||||
},
|
||||
@@ -1277,7 +1456,7 @@
|
||||
[
|
||||
"zoom"
|
||||
],
|
||||
14,
|
||||
13,
|
||||
[
|
||||
"*",
|
||||
[
|
||||
@@ -1333,10 +1512,10 @@
|
||||
[
|
||||
"zoom"
|
||||
],
|
||||
14,
|
||||
0.55,
|
||||
13,
|
||||
0.6,
|
||||
16,
|
||||
0.85
|
||||
0.9
|
||||
],
|
||||
"fill-extrusion-vertical-gradient": true
|
||||
}
|
||||
@@ -1747,6 +1926,55 @@
|
||||
"text-halo-width": 1.8
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "approved-road-labels",
|
||||
"type": "symbol",
|
||||
"source": "approved_roads",
|
||||
"source-layer": "approved_roads",
|
||||
"minzoom": 15,
|
||||
"layout": {
|
||||
"text-field": [
|
||||
"coalesce",
|
||||
[
|
||||
"get",
|
||||
"name:ar"
|
||||
],
|
||||
[
|
||||
"get",
|
||||
"name"
|
||||
],
|
||||
""
|
||||
],
|
||||
"text-font": [
|
||||
"Noto Sans Regular"
|
||||
],
|
||||
"text-size": [
|
||||
"interpolate",
|
||||
[
|
||||
"linear"
|
||||
],
|
||||
[
|
||||
"zoom"
|
||||
],
|
||||
15,
|
||||
10,
|
||||
18,
|
||||
13
|
||||
],
|
||||
"symbol-placement": "line",
|
||||
"text-letter-spacing": 0.05,
|
||||
"text-padding": 15,
|
||||
"symbol-spacing": 300,
|
||||
"text-max-angle": 30,
|
||||
"text-allow-overlap": false,
|
||||
"text-ignore-placement": false
|
||||
},
|
||||
"paint": {
|
||||
"text-color": "#4A5568",
|
||||
"text-halo-color": "rgba(255,255,255,0.92)",
|
||||
"text-halo-width": 1.8
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "road-labels-major",
|
||||
"type": "symbol",
|
||||
|
||||
Reference in New Issue
Block a user