From 566ec47a738deb174300e4c14a526f419f3364f6 Mon Sep 17 00:00:00 2001 From: richard <383235743@qq.com> Date: Tue, 13 Jan 2026 15:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E5=92=8CEC?= =?UTF-8?q?S=E6=A1=86=E6=9E=B6=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 25 + .vscode/settings.json | 3 + assets/config/style - 副本.json | 2066 +++ assets/config/style.json | 2066 +++ assets/osm_style.json | 76 + assets/pmtiles_style.json | 10925 ++++++++++++++++ assets/style - 副本.json | 33 + assets/style.json | 26 + devtools_options.yaml | 3 + lib/ecs/component.dart | 90 + lib/ecs/entity.dart | 39 + lib/ecs/system.dart | 389 + lib/screens/chat_screen.dart | 48 +- lib/screens/map_screen.dart | 613 + lib/utils/map_styles.dart | 174 + lib/utils/style_dropdown.dart | 35 + linux/flutter/generated_plugin_registrant.cc | 8 + linux/flutter/generated_plugins.cmake | 3 + macos/Flutter/GeneratedPluginRegistrant.swift | 4 + pubspec.lock | 474 +- pubspec.yaml | 24 +- web/index.html | 5 + .../flutter/generated_plugin_registrant.cc | 6 + windows/flutter/generated_plugins.cmake | 3 + 24 files changed, 17072 insertions(+), 66 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 assets/config/style - 副本.json create mode 100644 assets/config/style.json create mode 100644 assets/osm_style.json create mode 100644 assets/pmtiles_style.json create mode 100644 assets/style - 副本.json create mode 100644 assets/style.json create mode 100644 devtools_options.yaml create mode 100644 lib/ecs/component.dart create mode 100644 lib/ecs/entity.dart create mode 100644 lib/ecs/system.dart create mode 100644 lib/screens/map_screen.dart create mode 100644 lib/utils/map_styles.dart create mode 100644 lib/utils/style_dropdown.dart diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..47ea578 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "llm_chat", + "request": "launch", + "type": "dart" + }, + { + "name": "llm_chat (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "llm_chat (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9ddf6b2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.ignoreCMakeListsMissing": true +} \ No newline at end of file diff --git a/assets/config/style - 副本.json b/assets/config/style - 副本.json new file mode 100644 index 0000000..fc9536a --- /dev/null +++ b/assets/config/style - 副本.json @@ -0,0 +1,2066 @@ +{ + "id": "43f36e14-e3f5-43c1-84c0-50a9c80dc5c7", + "name": "MapLibre", + "zoom": 0.8619833357855968, + "pitch": 0, + "center": [ + 17.65431710431244, + 32.954120326746775 + ], + "glyphs": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#D8F2FF" + }, + "filter": [ + "all" + ], + "layout": { + "visibility": "visible" + }, + "maxzoom": 24 + }, + { + "id": "coastline", + "type": "line", + "paint": { + "line-blur": 0.5, + "line-color": "#198EC8", + "line-width": { + "stops": [ + [ + 0, + 2 + ], + [ + 6, + 6 + ], + [ + 14, + 9 + ], + [ + 22, + 18 + ] + ] + } + }, + "filter": [ + "all" + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "minzoom": 0, + "source-layer": "countries" + }, + { + "id": "countries-fill", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "ADM0_A3" + ], + [ + "ARM", + "ATG", + "AUS", + "BTN", + "CAN", + "COG", + "CZE", + "GHA", + "GIN", + "HTI", + "ISL", + "JOR", + "KHM", + "KOR", + "LVA", + "MLT", + "MNE", + "MOZ", + "PER", + "SAH", + "SGP", + "SLV", + "SOM", + "TJK", + "TUV", + "UKR", + "WSM" + ], + "#D6C7FF", + [ + "AZE", + "BGD", + "CHL", + "CMR", + "CSI", + "DEU", + "DJI", + "GUY", + "HUN", + "IOA", + "JAM", + "LBN", + "LBY", + "LSO", + "MDG", + "MKD", + "MNG", + "MRT", + "NIU", + "NZL", + "PCN", + "PYF", + "SAU", + "SHN", + "STP", + "TTO", + "UGA", + "UZB", + "ZMB" + ], + "#EBCA8A", + [ + "AGO", + "ASM", + "ATF", + "BDI", + "BFA", + "BGR", + "BLZ", + "BRA", + "CHN", + "CRI", + "ESP", + "HKG", + "HRV", + "IDN", + "IRN", + "ISR", + "KNA", + "LBR", + "LCA", + "MAC", + "MUS", + "NOR", + "PLW", + "POL", + "PRI", + "SDN", + "TUN", + "UMI", + "USA", + "USG", + "VIR", + "VUT" + ], + "#C1E599", + [ + "ARE", + "ARG", + "BHS", + "CIV", + "CLP", + "DMA", + "ETH", + "GAB", + "GRD", + "HMD", + "IND", + "IOT", + "IRL", + "IRQ", + "ITA", + "KOS", + "LUX", + "MEX", + "NAM", + "NER", + "PHL", + "PRT", + "RUS", + "SEN", + "SUR", + "TZA", + "VAT" + ], + "#E7E58F", + [ + "AUT", + "BEL", + "BHR", + "BMU", + "BRB", + "CYN", + "DZA", + "EST", + "FLK", + "GMB", + "GUM", + "HND", + "JEY", + "KGZ", + "LIE", + "MAF", + "MDA", + "NGA", + "NRU", + "SLB", + "SOL", + "SRB", + "SWZ", + "THA", + "TUR", + "VEN", + "VGB" + ], + "#98DDA1", + [ + "AIA", + "BIH", + "BLM", + "BRN", + "CAF", + "CHE", + "COM", + "CPV", + "CUB", + "ECU", + "ESB", + "FSM", + "GAZ", + "GBR", + "GEO", + "KEN", + "LTU", + "MAR", + "MCO", + "MDV", + "NFK", + "NPL", + "PNG", + "PRY", + "QAT", + "SLE", + "SPM", + "SYC", + "TCA", + "TKM", + "TLS", + "VNM", + "WEB", + "WSB", + "YEM", + "ZWE" + ], + "#83D5F4", + [ + "ABW", + "ALB", + "AND", + "ATC", + "BOL", + "COD", + "CUW", + "CYM", + "CYP", + "EGY", + "FJI", + "GGY", + "IMN", + "KAB", + "KAZ", + "KWT", + "LAO", + "MLI", + "MNP", + "MSR", + "MYS", + "NIC", + "NLD", + "PAK", + "PAN", + "PRK", + "ROU", + "SGS", + "SVN", + "SWE", + "TGO", + "TWN", + "VCT", + "ZAF" + ], + "#B1BBF9", + [ + "ATA", + "GRL" + ], + "#FFFFFF", + "#EAB38F" + ] + }, + "filter": [ + "all" + ], + "layout": { + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "source-layer": "countries" + }, + { + "id": "countries-boundary", + "type": "line", + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-width": { + "stops": [ + [ + 1, + 1 + ], + [ + 6, + 2 + ], + [ + 14, + 6 + ], + [ + 22, + 12 + ] + ] + }, + "line-opacity": { + "stops": [ + [ + 3, + 0.5 + ], + [ + 6, + 1 + ] + ] + } + }, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "source-layer": "countries" + }, + { + "id": "geolines", + "type": "line", + "paint": { + "line-color": "#1077B0", + "line-opacity": 1, + "line-dasharray": [ + 3, + 3 + ] + }, + "filter": [ + "all", + [ + "!=", + "name", + "International Date Line" + ] + ], + "layout": { + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "source-layer": "geolines" + }, + { + "id": "geolines-label", + "type": "symbol", + "paint": { + "text-color": "#1077B0", + "text-halo-blur": 1, + "text-halo-color": "rgba(255, 255, 255, 1)", + "text-halo-width": 1 + }, + "filter": [ + "all", + [ + "!=", + "name", + "International Date Line" + ] + ], + "layout": { + "text-font": [ + "Open Sans Semibold" + ], + "text-size": { + "stops": [ + [ + 2, + 12 + ], + [ + 6, + 16 + ] + ] + }, + "text-field": "{name}", + "visibility": "visible", + "symbol-placement": "line" + }, + "source": "maplibre", + "maxzoom": 24, + "minzoom": 1, + "source-layer": "geolines" + }, + { + "id": "countries-label", + "type": "symbol", + "paint": { + "text-color": "rgba(8, 37, 77, 1)", + "text-halo-blur": { + "stops": [ + [ + 2, + 0.2 + ], + [ + 6, + 0 + ] + ] + }, + "text-halo-color": "rgba(255, 255, 255, 1)", + "text-halo-width": { + "stops": [ + [ + 2, + 1 + ], + [ + 6, + 1.6 + ] + ] + } + }, + "filter": [ + "all" + ], + "layout": { + "text-font": [ + "Open Sans Semibold" + ], + "text-size": { + "stops": [ + [ + 2, + 10 + ], + [ + 4, + 12 + ], + [ + 6, + 16 + ] + ] + }, + "text-field": { + "stops": [ + [ + 2, + "{ABBREV}" + ], + [ + 4, + "{NAME}" + ] + ] + }, + "visibility": "visible", + "text-max-width": 10, + "text-transform": { + "stops": [ + [ + 0, + "uppercase" + ], + [ + 2, + "none" + ] + ] + } + }, + "source": "maplibre", + "maxzoom": 24, + "minzoom": 2, + "source-layer": "centroids" + }, + { + "id": "crimea-fill", + "type": "fill", + "source": "crimea", + "paint": { + "fill-color": "#D6C7FF" + } + } + ], + "bearing": 0, + "sources": { + "maplibre": { + "url": "http://127.0.0.1:5555/world_cities", + "type": "vector" + }, + "crimea": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 34.00905273547181, + 46.55925987559425 + ], + [ + 33.64325260204026, + 46.34533545368038 + ], + [ + 33.628682598560204, + 46.12569762665683 + ], + [ + 33.64292861730951, + 46.10476396128129 + ], + [ + 33.648473474905984, + 46.09033047763651 + ], + [ + 33.63876482059936, + 46.077976784785335 + ], + [ + 33.62782672238245, + 46.06747935719011 + ], + [ + 33.62911357645072, + 46.05708111413949 + ], + [ + 33.642686868727424, + 46.02192963417187 + ], + [ + 33.6429723910654, + 46.01521185644708 + ], + [ + 33.636224138774026, + 46.006705833212465 + ], + [ + 33.63052626465907, + 45.99692992186792 + ], + [ + 33.63193836679693, + 45.988472992911284 + ], + [ + 33.64276684834442, + 45.984575360297384 + ], + [ + 33.646928693041986, + 45.97981936210982 + ], + [ + 33.638745893564305, + 45.96829769147004 + ], + [ + 33.61958133326394, + 45.951176418494185 + ], + [ + 33.63181380398527, + 45.9445404758078 + ], + [ + 33.638921676216, + 45.94737012930554 + ], + [ + 33.64561542516918, + 45.95403251372139 + ], + [ + 33.65666403976448, + 45.95687114427736 + ], + [ + 33.6825817382811, + 45.95878100879199 + ], + [ + 33.738791807037614, + 45.94836945227263 + ], + [ + 33.758180142697, + 45.94072970008301 + ], + [ + 33.77735917288169, + 45.92923970233858 + ], + [ + 33.75927796793485, + 45.92241179584471 + ], + [ + 33.72529865009221, + 45.91587363154565 + ], + [ + 33.70875012326826, + 45.91008760988058 + ], + [ + 33.69378857293381, + 45.91480850795665 + ], + [ + 33.69092650243843, + 45.89657370898402 + ], + [ + 33.693592356906805, + 45.87271465766318 + ], + [ + 33.69226765972388, + 45.86041392418218 + ], + [ + 33.6704813511748, + 45.8584273836251 + ], + [ + 33.65936345808916, + 45.85944682601249 + ], + [ + 33.653870582376726, + 45.86425922279372 + ], + [ + 33.65107345584843, + 45.87089907254003 + ], + [ + 33.63067378180233, + 45.88040685247182 + ], + [ + 33.61945300059696, + 45.88147266102649 + ], + [ + 33.60987421595539, + 45.88048951126686 + ], + [ + 33.59906957603934, + 45.877610457390375 + ], + [ + 33.57828877687868, + 45.86810261756233 + ], + [ + 33.55357394560386, + 45.84700625141778 + ], + [ + 33.530220674480375, + 45.84221983655459 + ], + [ + 33.5192297395441, + 45.84121682367507 + ], + [ + 33.50832088442496, + 45.84313067048083 + ], + [ + 33.48901101848409, + 45.85268298292175 + ], + [ + 33.482152996405716, + 45.854578171799005 + ], + [ + 33.46719955896293, + 45.849912739405056 + ], + [ + 33.42447496599681, + 45.83075886348303 + ], + [ + 33.40940172404095, + 45.82691953557702 + ], + [ + 33.37918350072067, + 45.802867525073566 + ], + [ + 33.37362145339398, + 45.79619281922518 + ], + [ + 33.33805543634864, + 45.78577808972071 + ], + [ + 33.26498872665803, + 45.75410774187094 + ], + [ + 33.22887541283427, + 45.75131270772724 + ], + [ + 33.19548267281132, + 45.7644887297206 + ], + [ + 33.1789202379222, + 45.78010311364778 + ], + [ + 33.1688456078636, + 45.78470227904205 + ], + [ + 33.161012432811674, + 45.77921593899549 + ], + [ + 33.15951585299757, + 45.76864464913777 + ], + [ + 33.165962301438725, + 45.762685940125465 + ], + [ + 33.1750888126426, + 45.759218220695715 + ], + [ + 33.181464829753, + 45.75490447884948 + ], + [ + 33.17613930782352, + 45.7437961960276 + ], + [ + 33.16369168844906, + 45.735912015025065 + ], + [ + 32.93692665480876, + 45.662114646778264 + ], + [ + 32.86839112407645, + 45.63044340698664 + ], + [ + 32.83803944575723, + 45.60834075026611 + ], + [ + 32.82702772424804, + 45.59576101516498 + ], + [ + 32.82433467080986, + 45.58705137380335 + ], + [ + 32.82563941622885, + 45.579605763895614 + ], + [ + 32.82993674258438, + 45.56978311819469 + ], + [ + 32.82851940940563, + 45.56227808675749 + ], + [ + 32.813310142795274, + 45.55930933158257 + ], + [ + 32.80213583657516, + 45.560145780074464 + ], + [ + 32.78258622159436, + 45.565158335073846 + ], + [ + 32.77333922465823, + 45.56689313356526 + ], + [ + 32.758306734735356, + 45.565030173463356 + ], + [ + 32.750177256846115, + 45.55943726334968 + ], + [ + 32.74340732630185, + 45.55261895849793 + ], + [ + 32.73524549539499, + 45.54598788110354 + ], + [ + 32.72031700779701, + 45.53735927760957 + ], + [ + 32.70536040418847, + 45.53169142131733 + ], + [ + 32.68589438933773, + 45.52663379187257 + ], + [ + 32.66370583186284, + 45.52563107058867 + ], + [ + 32.64312077736798, + 45.52188979044979 + ], + [ + 32.525284074162556, + 45.45838108691365 + ], + [ + 32.49490411219156, + 45.43524910229854 + ], + [ + 32.48107654411925, + 45.408986638827514 + ], + [ + 32.48514589713025, + 45.39458067125969 + ], + [ + 32.51256939517424, + 45.34060655033625 + ], + [ + 32.535915460470335, + 45.33777248012882 + ], + [ + 32.57027153843481, + 45.32510892683359 + ], + [ + 32.590830644991826, + 45.32038723212662 + ], + [ + 32.66380378113439, + 45.320421746458976 + ], + [ + 32.67760722618917, + 45.32609231279554 + ], + [ + 32.71316246802607, + 45.353283572618125 + ], + [ + 32.72817188836078, + 45.36074681043402 + ], + [ + 32.750518060251466, + 45.36371725645313 + ], + [ + 32.89973931692998, + 45.35412322462227 + ], + [ + 32.941197846443885, + 45.34245505845169 + ], + [ + 32.97701667405008, + 45.32596743563991 + ], + [ + 33.04296090827762, + 45.2853982930032 + ], + [ + 33.05274355585479, + 45.28154273654923 + ], + [ + 33.06850284417635, + 45.27703461892352 + ], + [ + 33.07825272648239, + 45.272210805127315 + ], + [ + 33.089426322403455, + 45.25656353201492 + ], + [ + 33.09897492343546, + 45.247820101667884 + ], + [ + 33.12384611720435, + 45.238235755071685 + ], + [ + 33.15767197859745, + 45.20755227709648 + ], + [ + 33.172959979330074, + 45.19681657531794 + ], + [ + 33.21837666514142, + 45.187878368659824 + ], + [ + 33.24017433636709, + 45.180191106261134 + ], + [ + 33.248571989896675, + 45.16588271012458 + ], + [ + 33.259649216030766, + 45.155918961282026 + ], + [ + 33.28309785485047, + 45.16064860772312 + ], + [ + 33.31767999550894, + 45.17535522412791 + ], + [ + 33.35458473323109, + 45.18598673360148 + ], + [ + 33.39725661527919, + 45.18973663076909 + ], + [ + 33.41344561756824, + 45.18490731877088 + ], + [ + 33.468468576977216, + 45.149132412229676 + ], + [ + 33.537128652906205, + 45.11719769268973 + ], + [ + 33.56161328289443, + 45.094099022711475 + ], + [ + 33.57837628774928, + 45.053145935448015 + ], + [ + 33.58247744978442, + 45.027377243150454 + ], + [ + 33.5851414316958, + 45.01816461606674 + ], + [ + 33.6031021265521, + 44.993103583251695 + ], + [ + 33.605922209331794, + 44.986905272229734 + ], + [ + 33.60843524291815, + 44.97039962759274 + ], + [ + 33.61943161357851, + 44.93184946652454 + ], + [ + 33.619484500808824, + 44.90819321920554 + ], + [ + 33.61549738593425, + 44.88894092276257 + ], + [ + 33.608561183117274, + 44.871288478948514 + ], + [ + 33.59889474705494, + 44.859790298912856 + ], + [ + 33.55904244709464, + 44.850057575124595 + ], + [ + 33.54667558363471, + 44.83724531175508 + ], + [ + 33.53701832136994, + 44.81871953508235 + ], + [ + 33.5303157846202, + 44.798338017069625 + ], + [ + 33.5249116915937, + 44.78918633101301 + ], + [ + 33.51669091675143, + 44.784809980590666 + ], + [ + 33.524785531609865, + 44.77183212449111 + ], + [ + 33.5302902535075, + 44.75724515985675 + ], + [ + 33.53710734694323, + 44.73034290771247 + ], + [ + 33.54650992495621, + 44.70989226909535 + ], + [ + 33.5481286806762, + 44.699106546699085 + ], + [ + 33.543995566510915, + 44.68230506537358 + ], + [ + 33.53580273994743, + 44.6726082589706 + ], + [ + 33.52337411931097, + 44.661863083605255 + ], + [ + 33.515320778874354, + 44.6491266698327 + ], + [ + 33.516377841582795, + 44.63464990118433 + ], + [ + 33.52466971637648, + 44.62863961572572 + ], + [ + 33.557474298027785, + 44.62473000923737 + ], + [ + 33.5710648827386, + 44.620853511273225 + ], + [ + 33.55105839203679, + 44.61506440493406 + ], + [ + 33.499905706797676, + 44.61452599304897 + ], + [ + 33.48451102966331, + 44.60992438254493 + ], + [ + 33.47658499621011, + 44.60714391514574 + ], + [ + 33.46705078205747, + 44.60616254193252 + ], + [ + 33.44476599234898, + 44.607062134677875 + ], + [ + 33.4353466482458, + 44.60509936890821 + ], + [ + 33.413591053005575, + 44.593500212748125 + ], + [ + 33.40543527945235, + 44.59055535193136 + ], + [ + 33.37510958624222, + 44.58564691897425 + ], + [ + 33.37074452434078, + 44.58851022190515 + ], + [ + 33.372237834990756, + 44.576810695127364 + ], + [ + 33.37913003799301, + 44.56412673079859 + ], + [ + 33.48759131590526, + 44.51024086451031 + ], + [ + 33.50011215135888, + 44.50041002882833 + ], + [ + 33.517917009115365, + 44.49074142372788 + ], + [ + 33.53836387802215, + 44.49164280212756 + ], + [ + 33.56041892763031, + 44.4966411022441 + ], + [ + 33.57822378538677, + 44.497542389459795 + ], + [ + 33.59062975079095, + 44.48975808594983 + ], + [ + 33.619577003408466, + 44.46229988129974 + ], + [ + 33.62635433636015, + 44.45336293328907 + ], + [ + 33.63175322871038, + 44.434828756313124 + ], + [ + 33.645537634715026, + 44.42498521035591 + ], + [ + 33.721007257593925, + 44.39946630464436 + ], + [ + 33.74168386660085, + 44.39560878121904 + ], + [ + 33.80727466517129, + 44.39454176175843 + ], + [ + 33.81841706002561, + 44.39552670349164 + ], + [ + 33.83909366903248, + 44.40143600575672 + ], + [ + 33.85149963444792, + 44.40143600575945 + ], + [ + 33.91467816197718, + 44.38387049706651 + ], + [ + 33.938111652185, + 44.38083293528811 + ], + [ + 33.957065210440874, + 44.38272116790142 + ], + [ + 34.06614966692763, + 44.42019923628979 + ], + [ + 34.088893936836286, + 44.42200415824283 + ], + [ + 34.10279321289039, + 44.42487551014821 + ], + [ + 34.135933345669, + 44.44163597968952 + ], + [ + 34.14696087047267, + 44.44959070749778 + ], + [ + 34.16058918507403, + 44.466287285335795 + ], + [ + 34.170123399227776, + 44.48186111741296 + ], + [ + 34.182759104731986, + 44.49267838558103 + ], + [ + 34.22923417224524, + 44.49949719774551 + ], + [ + 34.24301857824986, + 44.50744404277697 + ], + [ + 34.263903954150294, + 44.53186886058606 + ], + [ + 34.26631622520165, + 44.53555362837611 + ], + [ + 34.26631622520165, + 44.54153064468656 + ], + [ + 34.27033667695244, + 44.545378535987936 + ], + [ + 34.2757355693048, + 44.54644280144541 + ], + [ + 34.285384653508004, + 44.54562413743594 + ], + [ + 34.299973149863405, + 44.54554227040174 + ], + [ + 34.32260254971496, + 44.543577427039224 + ], + [ + 34.3308731933177, + 44.54546040325087 + ], + [ + 34.340292537420794, + 44.55798473830754 + ], + [ + 34.38042135640006, + 44.631830317636684 + ], + [ + 34.41495238900856, + 44.673669777529994 + ], + [ + 34.424193090575585, + 44.68239452736094 + ], + [ + 34.42959198292681, + 44.68884644523774 + ], + [ + 34.469399167794535, + 44.730194532749294 + ], + [ + 34.47376422969597, + 44.73011292571252 + ], + [ + 34.47376422969597, + 44.72635887754967 + ], + [ + 34.475142670296464, + 44.723502373339585 + ], + [ + 34.499724861011515, + 44.74292382044041 + ], + [ + 34.532800295801195, + 44.752620844929055 + ], + [ + 34.61217550038418, + 44.76534519537847 + ], + [ + 34.65065696715081, + 44.777088262503725 + ], + [ + 34.72084256772871, + 44.811080759265764 + ], + [ + 34.756796893391225, + 44.82094054159748 + ], + [ + 34.82646979041766, + 44.81208604604609 + ], + [ + 34.84289620758207, + 44.816893835303176 + ], + [ + 34.856910353686715, + 44.82373813182468 + ], + [ + 34.889648317948144, + 44.817871641692506 + ], + [ + 34.90733830566026, + 44.820886440346584 + ], + [ + 34.922960632465504, + 44.83050015059965 + ], + [ + 34.92950822531711, + 44.83652826953224 + ], + [ + 34.94179932067178, + 44.84019370922482 + ], + [ + 34.95282684547897, + 44.841415470643284 + ], + [ + 34.98567967978991, + 44.840275160795755 + ], + [ + 35.0053224583441, + 44.83538786296728 + ], + [ + 35.017958163849414, + 44.82219008824552 + ], + [ + 35.02703289780189, + 44.80890779582285 + ], + [ + 35.037933245998005, + 44.79869792240089 + ], + [ + 35.08073333784134, + 44.793525442788905 + ], + [ + 35.1080207326404, + 44.824553365795765 + ], + [ + 35.130368105574235, + 44.86879838545747 + ], + [ + 35.15485200090768, + 44.90071251697748 + ], + [ + 35.17111229780758, + 44.90746386008772 + ], + [ + 35.21522068940149, + 44.91421441031795 + ], + [ + 35.233163085981715, + 44.925728224907715 + ], + [ + 35.25636688416236, + 44.95896657181197 + ], + [ + 35.27300098099195, + 44.96690119386028 + ], + [ + 35.29748487632534, + 44.95605693543271 + ], + [ + 35.30496087491386, + 44.96121482614441 + ], + [ + 35.315240372954605, + 44.965711070514175 + ], + [ + 35.31935217217088, + 44.96941359539801 + ], + [ + 35.36757236298112, + 44.94362319076086 + ], + [ + 35.36103086422793, + 44.97364475976596 + ], + [ + 35.362152264014156, + 44.98593980935419 + ], + [ + 35.374674561627444, + 44.997835734117416 + ], + [ + 35.389439658813274, + 45.00180049366759 + ], + [ + 35.42270785247763, + 45.00087540764923 + ], + [ + 35.43504325012745, + 45.00470780964241 + ], + [ + 35.43504325012745, + 45.011446929213974 + ], + [ + 35.40631957913584, + 45.02015821022701 + ], + [ + 35.40089948016896, + 45.025046135473445 + ], + [ + 35.39790908073891, + 45.03482073400548 + ], + [ + 35.40052568024015, + 45.042216617888045 + ], + [ + 35.40631957913584, + 45.051328088783805 + ], + [ + 35.40744097892215, + 45.06294640963205 + ], + [ + 35.41734667704213, + 45.0708666385693 + ], + [ + 35.469304867139925, + 45.10068964922732 + ], + [ + 35.5070260597534, + 45.113341616151644 + ], + [ + 35.54758335202416, + 45.12019982412133 + ], + [ + 35.59019654390909, + 45.11993606213795 + ], + [ + 35.63411803553862, + 45.11439677872579 + ], + [ + 35.70669729572677, + 45.09480210570922 + ], + [ + 35.771782422456766, + 45.06572995732262 + ], + [ + 35.78430472007, + 45.057941041321754 + ], + [ + 35.81250040352472, + 45.031852200991295 + ], + [ + 35.81941570220667, + 45.021152336906454 + ], + [ + 35.82763930064016, + 44.99895365027004 + ], + [ + 35.848198296721705, + 44.99208088455586 + ], + [ + 35.916977483614176, + 45.00172895661731 + ], + [ + 35.99360646900681, + 44.997896355361604 + ], + [ + 36.00893226608571, + 45.00926125333629 + ], + [ + 36.02539976723364, + 45.03288661039673 + ], + [ + 36.047827762958946, + 45.048074065419456 + ], + [ + 36.078666257082034, + 45.03883000769565 + ], + [ + 36.079137312377895, + 45.046610970582435 + ], + [ + 36.135020401727616, + 45.02125162210126 + ], + [ + 36.2241716847341, + 45.00751061631556 + ], + [ + 36.24398308095806, + 45.011474706353084 + ], + [ + 36.24828178013877, + 45.01649549321965 + ], + [ + 36.25332807917695, + 45.03247980324494 + ], + [ + 36.25743987839326, + 45.03842324279259 + ], + [ + 36.267158676549116, + 45.043573724415154 + ], + [ + 36.2783726744118, + 45.04555455542638 + ], + [ + 36.36740852558336, + 45.04833265291825 + ], + [ + 36.44029951169139, + 45.06787222615526 + ], + [ + 36.45375630913995, + 45.07631970334319 + ], + [ + 36.455251508854985, + 45.09202341204062 + ], + [ + 36.44142091149291, + 45.10709638287736 + ], + [ + 36.41432041665814, + 45.12872568311289 + ], + [ + 36.40852651776157, + 45.149160473330085 + ], + [ + 36.409997342308856, + 45.171615955386955 + ], + [ + 36.418312796420764, + 45.23001671705953 + ], + [ + 36.42672329481775, + 45.25186253492981 + ], + [ + 36.43756477765089, + 45.27227491599612 + ], + [ + 36.4497132753354, + 45.28542626329343 + ], + [ + 36.45905827355429, + 45.28753019598713 + ], + [ + 36.4814862692796, + 45.28845064200263 + ], + [ + 36.4909554290368, + 45.29213135137758 + ], + [ + 36.49637552800283, + 45.300940007322055 + ], + [ + 36.49394582846682, + 45.305015191082816 + ], + [ + 36.48871262946426, + 45.30935296803605 + ], + [ + 36.48460083024801, + 45.315924724862185 + ], + [ + 36.489647129296515, + 45.336413860372005 + ], + [ + 36.502169426909745, + 45.34731734941451 + ], + [ + 36.52104632331191, + 45.35033842661815 + ], + [ + 36.544281237819945, + 45.34731734942025 + ], + [ + 36.57455903204905, + 45.33601971904315 + ], + [ + 36.585399229982954, + 45.333917585593355 + ], + [ + 36.59810088537549, + 45.334837278577254 + ], + [ + 36.630808379142394, + 45.34048649352954 + ], + [ + 36.637536777859964, + 45.3511265071989 + ], + [ + 36.63099527910589, + 45.3741073632589 + ], + [ + 36.61359545390113, + 45.40895280985421 + ], + [ + 36.59845655678569, + 45.421547717459106 + ], + [ + 36.58331765967199, + 45.42731944465129 + ], + [ + 36.566309762912795, + 45.42548305000767 + ], + [ + 36.54836736633254, + 45.41210180010589 + ], + [ + 36.53285466928139, + 45.4090840212946 + ], + [ + 36.51565987255873, + 45.41957994832251 + ], + [ + 36.49117597722616, + 45.44279525429408 + ], + [ + 36.47043008117939, + 45.4458112314303 + ], + [ + 36.411182792482634, + 45.43610707766504 + ], + [ + 36.391371396258705, + 45.43991025572652 + ], + [ + 36.35959840231365, + 45.45407156049933 + ], + [ + 36.33960010612526, + 45.45695583486963 + ], + [ + 36.33025510790637, + 45.454464879327446 + ], + [ + 36.32053630976225, + 45.44856480887407 + ], + [ + 36.31156511147125, + 45.4438443081136 + ], + [ + 36.29885591389362, + 45.442795254299995 + ], + [ + 36.3072664122906, + 45.46115087970253 + ], + [ + 36.30016421364425, + 45.47320989503609 + ], + [ + 36.283717016779036, + 45.476355300848866 + ], + [ + 36.267082919949445, + 45.46704963343626 + ], + [ + 36.25213092279836, + 45.46115087970253 + ], + [ + 36.13681364478941, + 45.46219959214511 + ], + [ + 36.11700224855986, + 45.45721803432335 + ], + [ + 36.097003952371466, + 45.441483909606006 + ], + [ + 36.06952965760803, + 45.43046741078453 + ], + [ + 36.0655449627526, + 45.42553028973455 + ], + [ + 36.05134056545904, + 45.39535242162091 + ], + [ + 36.022557970944945, + 45.368441166003805 + ], + [ + 35.986486277818386, + 45.362926059418186 + ], + [ + 35.94723728529826, + 45.372380198658874 + ], + [ + 35.87220216002379, + 45.404075760536614 + ], + [ + 35.85388596351393, + 45.413916621802144 + ], + [ + 35.84715756479628, + 45.426379251448395 + ], + [ + 35.8524047739447, + 45.44386497541683 + ], + [ + 35.85950697259193, + 45.45933624762881 + ], + [ + 35.857824872912545, + 45.469953901705 + ], + [ + 35.83278027768503, + 45.47087138287168 + ], + [ + 35.8167068807486, + 45.46392436820739 + ], + [ + 35.80362388324218, + 45.44963442058864 + ], + [ + 35.79469305616038, + 45.42980210462429 + ], + [ + 35.791889556694684, + 45.41209230278156 + ], + [ + 35.772265060435046, + 45.39214572935421 + ], + [ + 35.767405661361295, + 45.38873311015669 + ], + [ + 35.75189296431793, + 45.386632934388984 + ], + [ + 35.7481549650407, + 45.379938103368545 + ], + [ + 35.746846665290036, + 45.369960021421576 + ], + [ + 35.74423006578874, + 45.36076812520648 + ], + [ + 35.71619507113218, + 45.34040932557082 + ], + [ + 35.69451467527287, + 45.32989869277279 + ], + [ + 35.51720627467216, + 45.29506847418358 + ], + [ + 35.48038698168983, + 45.2979608697527 + ], + [ + 35.33194061536096, + 45.371562726652314 + ], + [ + 35.04491375777232, + 45.669545248704424 + ], + [ + 35.00230056589345, + 45.7290693869553 + ], + [ + 34.70631294999043, + 46.024929846739866 + ], + [ + 34.35868883309806, + 46.106725558140795 + ], + [ + 34.00905273547181, + 46.55925987559425 + ] + ] + ] + } + } + } + }, + "version": 8, + "metadata": { + "maptiler:copyright": "This style was generated on MapTiler Cloud. Usage is governed by the license terms in https://github.com/maplibre/demotiles/blob/gh-pages/LICENSE", + "openmaptiles:version": "3.x" + } +} \ No newline at end of file diff --git a/assets/config/style.json b/assets/config/style.json new file mode 100644 index 0000000..591f8db --- /dev/null +++ b/assets/config/style.json @@ -0,0 +1,2066 @@ +{ + "id": "43f36e14-e3f5-43c1-84c0-50a9c80dc5c7", + "name": "MapLibre", + "zoom": 0.8619833357855968, + "pitch": 0, + "center": [ + 17.65431710431244, + 32.954120326746775 + ], + "glyphs": "http://192.168.0.101:5666/font/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#D8F2FF" + }, + "filter": [ + "all" + ], + "layout": { + "visibility": "visible" + }, + "maxzoom": 24 + }, + { + "id": "coastline", + "type": "line", + "paint": { + "line-blur": 0.5, + "line-color": "#198EC8", + "line-width": { + "stops": [ + [ + 0, + 2 + ], + [ + 6, + 6 + ], + [ + 14, + 9 + ], + [ + 22, + 18 + ] + ] + } + }, + "filter": [ + "all" + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "minzoom": 0, + "source-layer": "countries" + }, + { + "id": "countries-fill", + "type": "fill", + "paint": { + "fill-color": [ + "match", + [ + "get", + "ADM0_A3" + ], + [ + "ARM", + "ATG", + "AUS", + "BTN", + "CAN", + "COG", + "CZE", + "GHA", + "GIN", + "HTI", + "ISL", + "JOR", + "KHM", + "KOR", + "LVA", + "MLT", + "MNE", + "MOZ", + "PER", + "SAH", + "SGP", + "SLV", + "SOM", + "TJK", + "TUV", + "UKR", + "WSM" + ], + "#D6C7FF", + [ + "AZE", + "BGD", + "CHL", + "CMR", + "CSI", + "DEU", + "DJI", + "GUY", + "HUN", + "IOA", + "JAM", + "LBN", + "LBY", + "LSO", + "MDG", + "MKD", + "MNG", + "MRT", + "NIU", + "NZL", + "PCN", + "PYF", + "SAU", + "SHN", + "STP", + "TTO", + "UGA", + "UZB", + "ZMB" + ], + "#EBCA8A", + [ + "AGO", + "ASM", + "ATF", + "BDI", + "BFA", + "BGR", + "BLZ", + "BRA", + "CHN", + "CRI", + "ESP", + "HKG", + "HRV", + "IDN", + "IRN", + "ISR", + "KNA", + "LBR", + "LCA", + "MAC", + "MUS", + "NOR", + "PLW", + "POL", + "PRI", + "SDN", + "TUN", + "UMI", + "USA", + "USG", + "VIR", + "VUT" + ], + "#C1E599", + [ + "ARE", + "ARG", + "BHS", + "CIV", + "CLP", + "DMA", + "ETH", + "GAB", + "GRD", + "HMD", + "IND", + "IOT", + "IRL", + "IRQ", + "ITA", + "KOS", + "LUX", + "MEX", + "NAM", + "NER", + "PHL", + "PRT", + "RUS", + "SEN", + "SUR", + "TZA", + "VAT" + ], + "#E7E58F", + [ + "AUT", + "BEL", + "BHR", + "BMU", + "BRB", + "CYN", + "DZA", + "EST", + "FLK", + "GMB", + "GUM", + "HND", + "JEY", + "KGZ", + "LIE", + "MAF", + "MDA", + "NGA", + "NRU", + "SLB", + "SOL", + "SRB", + "SWZ", + "THA", + "TUR", + "VEN", + "VGB" + ], + "#98DDA1", + [ + "AIA", + "BIH", + "BLM", + "BRN", + "CAF", + "CHE", + "COM", + "CPV", + "CUB", + "ECU", + "ESB", + "FSM", + "GAZ", + "GBR", + "GEO", + "KEN", + "LTU", + "MAR", + "MCO", + "MDV", + "NFK", + "NPL", + "PNG", + "PRY", + "QAT", + "SLE", + "SPM", + "SYC", + "TCA", + "TKM", + "TLS", + "VNM", + "WEB", + "WSB", + "YEM", + "ZWE" + ], + "#83D5F4", + [ + "ABW", + "ALB", + "AND", + "ATC", + "BOL", + "COD", + "CUW", + "CYM", + "CYP", + "EGY", + "FJI", + "GGY", + "IMN", + "KAB", + "KAZ", + "KWT", + "LAO", + "MLI", + "MNP", + "MSR", + "MYS", + "NIC", + "NLD", + "PAK", + "PAN", + "PRK", + "ROU", + "SGS", + "SVN", + "SWE", + "TGO", + "TWN", + "VCT", + "ZAF" + ], + "#B1BBF9", + [ + "ATA", + "GRL" + ], + "#FFFFFF", + "#EAB38F" + ] + }, + "filter": [ + "all" + ], + "layout": { + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "source-layer": "countries" + }, + { + "id": "countries-boundary", + "type": "line", + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-width": { + "stops": [ + [ + 1, + 1 + ], + [ + 6, + 2 + ], + [ + 14, + 6 + ], + [ + 22, + 12 + ] + ] + }, + "line-opacity": { + "stops": [ + [ + 3, + 0.5 + ], + [ + 6, + 1 + ] + ] + } + }, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "source-layer": "countries" + }, + { + "id": "geolines", + "type": "line", + "paint": { + "line-color": "#1077B0", + "line-opacity": 1, + "line-dasharray": [ + 3, + 3 + ] + }, + "filter": [ + "all", + [ + "!=", + "name", + "International Date Line" + ] + ], + "layout": { + "visibility": "visible" + }, + "source": "maplibre", + "maxzoom": 24, + "source-layer": "geolines" + }, + { + "id": "geolines-label", + "type": "symbol", + "paint": { + "text-color": "#1077B0", + "text-halo-blur": 1, + "text-halo-color": "rgba(255, 255, 255, 1)", + "text-halo-width": 1 + }, + "filter": [ + "all", + [ + "!=", + "name", + "International Date Line" + ] + ], + "layout": { + "text-font": [ + "Open Sans Semibold" + ], + "text-size": { + "stops": [ + [ + 2, + 12 + ], + [ + 6, + 16 + ] + ] + }, + "text-field": "{name}", + "visibility": "visible", + "symbol-placement": "line" + }, + "source": "maplibre", + "maxzoom": 24, + "minzoom": 1, + "source-layer": "geolines" + }, + { + "id": "countries-label", + "type": "symbol", + "paint": { + "text-color": "rgba(8, 37, 77, 1)", + "text-halo-blur": { + "stops": [ + [ + 2, + 0.2 + ], + [ + 6, + 0 + ] + ] + }, + "text-halo-color": "rgba(255, 255, 255, 1)", + "text-halo-width": { + "stops": [ + [ + 2, + 1 + ], + [ + 6, + 1.6 + ] + ] + } + }, + "filter": [ + "all" + ], + "layout": { + "text-font": [ + "Open Sans Semibold" + ], + "text-size": { + "stops": [ + [ + 2, + 10 + ], + [ + 4, + 12 + ], + [ + 6, + 16 + ] + ] + }, + "text-field": { + "stops": [ + [ + 2, + "{ABBREV}" + ], + [ + 4, + "{NAME}" + ] + ] + }, + "visibility": "visible", + "text-max-width": 10, + "text-transform": { + "stops": [ + [ + 0, + "uppercase" + ], + [ + 2, + "none" + ] + ] + } + }, + "source": "maplibre", + "maxzoom": 24, + "minzoom": 2, + "source-layer": "centroids" + }, + { + "id": "crimea-fill", + "type": "fill", + "source": "crimea", + "paint": { + "fill-color": "#D6C7FF" + } + } + ], + "bearing": 0, + "sources": { + "maplibre": { + "url": "http://192.168.0.101:5555/world_cities", + "type": "vector" + }, + "crimea": { + "type": "geojson", + "data": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 34.00905273547181, + 46.55925987559425 + ], + [ + 33.64325260204026, + 46.34533545368038 + ], + [ + 33.628682598560204, + 46.12569762665683 + ], + [ + 33.64292861730951, + 46.10476396128129 + ], + [ + 33.648473474905984, + 46.09033047763651 + ], + [ + 33.63876482059936, + 46.077976784785335 + ], + [ + 33.62782672238245, + 46.06747935719011 + ], + [ + 33.62911357645072, + 46.05708111413949 + ], + [ + 33.642686868727424, + 46.02192963417187 + ], + [ + 33.6429723910654, + 46.01521185644708 + ], + [ + 33.636224138774026, + 46.006705833212465 + ], + [ + 33.63052626465907, + 45.99692992186792 + ], + [ + 33.63193836679693, + 45.988472992911284 + ], + [ + 33.64276684834442, + 45.984575360297384 + ], + [ + 33.646928693041986, + 45.97981936210982 + ], + [ + 33.638745893564305, + 45.96829769147004 + ], + [ + 33.61958133326394, + 45.951176418494185 + ], + [ + 33.63181380398527, + 45.9445404758078 + ], + [ + 33.638921676216, + 45.94737012930554 + ], + [ + 33.64561542516918, + 45.95403251372139 + ], + [ + 33.65666403976448, + 45.95687114427736 + ], + [ + 33.6825817382811, + 45.95878100879199 + ], + [ + 33.738791807037614, + 45.94836945227263 + ], + [ + 33.758180142697, + 45.94072970008301 + ], + [ + 33.77735917288169, + 45.92923970233858 + ], + [ + 33.75927796793485, + 45.92241179584471 + ], + [ + 33.72529865009221, + 45.91587363154565 + ], + [ + 33.70875012326826, + 45.91008760988058 + ], + [ + 33.69378857293381, + 45.91480850795665 + ], + [ + 33.69092650243843, + 45.89657370898402 + ], + [ + 33.693592356906805, + 45.87271465766318 + ], + [ + 33.69226765972388, + 45.86041392418218 + ], + [ + 33.6704813511748, + 45.8584273836251 + ], + [ + 33.65936345808916, + 45.85944682601249 + ], + [ + 33.653870582376726, + 45.86425922279372 + ], + [ + 33.65107345584843, + 45.87089907254003 + ], + [ + 33.63067378180233, + 45.88040685247182 + ], + [ + 33.61945300059696, + 45.88147266102649 + ], + [ + 33.60987421595539, + 45.88048951126686 + ], + [ + 33.59906957603934, + 45.877610457390375 + ], + [ + 33.57828877687868, + 45.86810261756233 + ], + [ + 33.55357394560386, + 45.84700625141778 + ], + [ + 33.530220674480375, + 45.84221983655459 + ], + [ + 33.5192297395441, + 45.84121682367507 + ], + [ + 33.50832088442496, + 45.84313067048083 + ], + [ + 33.48901101848409, + 45.85268298292175 + ], + [ + 33.482152996405716, + 45.854578171799005 + ], + [ + 33.46719955896293, + 45.849912739405056 + ], + [ + 33.42447496599681, + 45.83075886348303 + ], + [ + 33.40940172404095, + 45.82691953557702 + ], + [ + 33.37918350072067, + 45.802867525073566 + ], + [ + 33.37362145339398, + 45.79619281922518 + ], + [ + 33.33805543634864, + 45.78577808972071 + ], + [ + 33.26498872665803, + 45.75410774187094 + ], + [ + 33.22887541283427, + 45.75131270772724 + ], + [ + 33.19548267281132, + 45.7644887297206 + ], + [ + 33.1789202379222, + 45.78010311364778 + ], + [ + 33.1688456078636, + 45.78470227904205 + ], + [ + 33.161012432811674, + 45.77921593899549 + ], + [ + 33.15951585299757, + 45.76864464913777 + ], + [ + 33.165962301438725, + 45.762685940125465 + ], + [ + 33.1750888126426, + 45.759218220695715 + ], + [ + 33.181464829753, + 45.75490447884948 + ], + [ + 33.17613930782352, + 45.7437961960276 + ], + [ + 33.16369168844906, + 45.735912015025065 + ], + [ + 32.93692665480876, + 45.662114646778264 + ], + [ + 32.86839112407645, + 45.63044340698664 + ], + [ + 32.83803944575723, + 45.60834075026611 + ], + [ + 32.82702772424804, + 45.59576101516498 + ], + [ + 32.82433467080986, + 45.58705137380335 + ], + [ + 32.82563941622885, + 45.579605763895614 + ], + [ + 32.82993674258438, + 45.56978311819469 + ], + [ + 32.82851940940563, + 45.56227808675749 + ], + [ + 32.813310142795274, + 45.55930933158257 + ], + [ + 32.80213583657516, + 45.560145780074464 + ], + [ + 32.78258622159436, + 45.565158335073846 + ], + [ + 32.77333922465823, + 45.56689313356526 + ], + [ + 32.758306734735356, + 45.565030173463356 + ], + [ + 32.750177256846115, + 45.55943726334968 + ], + [ + 32.74340732630185, + 45.55261895849793 + ], + [ + 32.73524549539499, + 45.54598788110354 + ], + [ + 32.72031700779701, + 45.53735927760957 + ], + [ + 32.70536040418847, + 45.53169142131733 + ], + [ + 32.68589438933773, + 45.52663379187257 + ], + [ + 32.66370583186284, + 45.52563107058867 + ], + [ + 32.64312077736798, + 45.52188979044979 + ], + [ + 32.525284074162556, + 45.45838108691365 + ], + [ + 32.49490411219156, + 45.43524910229854 + ], + [ + 32.48107654411925, + 45.408986638827514 + ], + [ + 32.48514589713025, + 45.39458067125969 + ], + [ + 32.51256939517424, + 45.34060655033625 + ], + [ + 32.535915460470335, + 45.33777248012882 + ], + [ + 32.57027153843481, + 45.32510892683359 + ], + [ + 32.590830644991826, + 45.32038723212662 + ], + [ + 32.66380378113439, + 45.320421746458976 + ], + [ + 32.67760722618917, + 45.32609231279554 + ], + [ + 32.71316246802607, + 45.353283572618125 + ], + [ + 32.72817188836078, + 45.36074681043402 + ], + [ + 32.750518060251466, + 45.36371725645313 + ], + [ + 32.89973931692998, + 45.35412322462227 + ], + [ + 32.941197846443885, + 45.34245505845169 + ], + [ + 32.97701667405008, + 45.32596743563991 + ], + [ + 33.04296090827762, + 45.2853982930032 + ], + [ + 33.05274355585479, + 45.28154273654923 + ], + [ + 33.06850284417635, + 45.27703461892352 + ], + [ + 33.07825272648239, + 45.272210805127315 + ], + [ + 33.089426322403455, + 45.25656353201492 + ], + [ + 33.09897492343546, + 45.247820101667884 + ], + [ + 33.12384611720435, + 45.238235755071685 + ], + [ + 33.15767197859745, + 45.20755227709648 + ], + [ + 33.172959979330074, + 45.19681657531794 + ], + [ + 33.21837666514142, + 45.187878368659824 + ], + [ + 33.24017433636709, + 45.180191106261134 + ], + [ + 33.248571989896675, + 45.16588271012458 + ], + [ + 33.259649216030766, + 45.155918961282026 + ], + [ + 33.28309785485047, + 45.16064860772312 + ], + [ + 33.31767999550894, + 45.17535522412791 + ], + [ + 33.35458473323109, + 45.18598673360148 + ], + [ + 33.39725661527919, + 45.18973663076909 + ], + [ + 33.41344561756824, + 45.18490731877088 + ], + [ + 33.468468576977216, + 45.149132412229676 + ], + [ + 33.537128652906205, + 45.11719769268973 + ], + [ + 33.56161328289443, + 45.094099022711475 + ], + [ + 33.57837628774928, + 45.053145935448015 + ], + [ + 33.58247744978442, + 45.027377243150454 + ], + [ + 33.5851414316958, + 45.01816461606674 + ], + [ + 33.6031021265521, + 44.993103583251695 + ], + [ + 33.605922209331794, + 44.986905272229734 + ], + [ + 33.60843524291815, + 44.97039962759274 + ], + [ + 33.61943161357851, + 44.93184946652454 + ], + [ + 33.619484500808824, + 44.90819321920554 + ], + [ + 33.61549738593425, + 44.88894092276257 + ], + [ + 33.608561183117274, + 44.871288478948514 + ], + [ + 33.59889474705494, + 44.859790298912856 + ], + [ + 33.55904244709464, + 44.850057575124595 + ], + [ + 33.54667558363471, + 44.83724531175508 + ], + [ + 33.53701832136994, + 44.81871953508235 + ], + [ + 33.5303157846202, + 44.798338017069625 + ], + [ + 33.5249116915937, + 44.78918633101301 + ], + [ + 33.51669091675143, + 44.784809980590666 + ], + [ + 33.524785531609865, + 44.77183212449111 + ], + [ + 33.5302902535075, + 44.75724515985675 + ], + [ + 33.53710734694323, + 44.73034290771247 + ], + [ + 33.54650992495621, + 44.70989226909535 + ], + [ + 33.5481286806762, + 44.699106546699085 + ], + [ + 33.543995566510915, + 44.68230506537358 + ], + [ + 33.53580273994743, + 44.6726082589706 + ], + [ + 33.52337411931097, + 44.661863083605255 + ], + [ + 33.515320778874354, + 44.6491266698327 + ], + [ + 33.516377841582795, + 44.63464990118433 + ], + [ + 33.52466971637648, + 44.62863961572572 + ], + [ + 33.557474298027785, + 44.62473000923737 + ], + [ + 33.5710648827386, + 44.620853511273225 + ], + [ + 33.55105839203679, + 44.61506440493406 + ], + [ + 33.499905706797676, + 44.61452599304897 + ], + [ + 33.48451102966331, + 44.60992438254493 + ], + [ + 33.47658499621011, + 44.60714391514574 + ], + [ + 33.46705078205747, + 44.60616254193252 + ], + [ + 33.44476599234898, + 44.607062134677875 + ], + [ + 33.4353466482458, + 44.60509936890821 + ], + [ + 33.413591053005575, + 44.593500212748125 + ], + [ + 33.40543527945235, + 44.59055535193136 + ], + [ + 33.37510958624222, + 44.58564691897425 + ], + [ + 33.37074452434078, + 44.58851022190515 + ], + [ + 33.372237834990756, + 44.576810695127364 + ], + [ + 33.37913003799301, + 44.56412673079859 + ], + [ + 33.48759131590526, + 44.51024086451031 + ], + [ + 33.50011215135888, + 44.50041002882833 + ], + [ + 33.517917009115365, + 44.49074142372788 + ], + [ + 33.53836387802215, + 44.49164280212756 + ], + [ + 33.56041892763031, + 44.4966411022441 + ], + [ + 33.57822378538677, + 44.497542389459795 + ], + [ + 33.59062975079095, + 44.48975808594983 + ], + [ + 33.619577003408466, + 44.46229988129974 + ], + [ + 33.62635433636015, + 44.45336293328907 + ], + [ + 33.63175322871038, + 44.434828756313124 + ], + [ + 33.645537634715026, + 44.42498521035591 + ], + [ + 33.721007257593925, + 44.39946630464436 + ], + [ + 33.74168386660085, + 44.39560878121904 + ], + [ + 33.80727466517129, + 44.39454176175843 + ], + [ + 33.81841706002561, + 44.39552670349164 + ], + [ + 33.83909366903248, + 44.40143600575672 + ], + [ + 33.85149963444792, + 44.40143600575945 + ], + [ + 33.91467816197718, + 44.38387049706651 + ], + [ + 33.938111652185, + 44.38083293528811 + ], + [ + 33.957065210440874, + 44.38272116790142 + ], + [ + 34.06614966692763, + 44.42019923628979 + ], + [ + 34.088893936836286, + 44.42200415824283 + ], + [ + 34.10279321289039, + 44.42487551014821 + ], + [ + 34.135933345669, + 44.44163597968952 + ], + [ + 34.14696087047267, + 44.44959070749778 + ], + [ + 34.16058918507403, + 44.466287285335795 + ], + [ + 34.170123399227776, + 44.48186111741296 + ], + [ + 34.182759104731986, + 44.49267838558103 + ], + [ + 34.22923417224524, + 44.49949719774551 + ], + [ + 34.24301857824986, + 44.50744404277697 + ], + [ + 34.263903954150294, + 44.53186886058606 + ], + [ + 34.26631622520165, + 44.53555362837611 + ], + [ + 34.26631622520165, + 44.54153064468656 + ], + [ + 34.27033667695244, + 44.545378535987936 + ], + [ + 34.2757355693048, + 44.54644280144541 + ], + [ + 34.285384653508004, + 44.54562413743594 + ], + [ + 34.299973149863405, + 44.54554227040174 + ], + [ + 34.32260254971496, + 44.543577427039224 + ], + [ + 34.3308731933177, + 44.54546040325087 + ], + [ + 34.340292537420794, + 44.55798473830754 + ], + [ + 34.38042135640006, + 44.631830317636684 + ], + [ + 34.41495238900856, + 44.673669777529994 + ], + [ + 34.424193090575585, + 44.68239452736094 + ], + [ + 34.42959198292681, + 44.68884644523774 + ], + [ + 34.469399167794535, + 44.730194532749294 + ], + [ + 34.47376422969597, + 44.73011292571252 + ], + [ + 34.47376422969597, + 44.72635887754967 + ], + [ + 34.475142670296464, + 44.723502373339585 + ], + [ + 34.499724861011515, + 44.74292382044041 + ], + [ + 34.532800295801195, + 44.752620844929055 + ], + [ + 34.61217550038418, + 44.76534519537847 + ], + [ + 34.65065696715081, + 44.777088262503725 + ], + [ + 34.72084256772871, + 44.811080759265764 + ], + [ + 34.756796893391225, + 44.82094054159748 + ], + [ + 34.82646979041766, + 44.81208604604609 + ], + [ + 34.84289620758207, + 44.816893835303176 + ], + [ + 34.856910353686715, + 44.82373813182468 + ], + [ + 34.889648317948144, + 44.817871641692506 + ], + [ + 34.90733830566026, + 44.820886440346584 + ], + [ + 34.922960632465504, + 44.83050015059965 + ], + [ + 34.92950822531711, + 44.83652826953224 + ], + [ + 34.94179932067178, + 44.84019370922482 + ], + [ + 34.95282684547897, + 44.841415470643284 + ], + [ + 34.98567967978991, + 44.840275160795755 + ], + [ + 35.0053224583441, + 44.83538786296728 + ], + [ + 35.017958163849414, + 44.82219008824552 + ], + [ + 35.02703289780189, + 44.80890779582285 + ], + [ + 35.037933245998005, + 44.79869792240089 + ], + [ + 35.08073333784134, + 44.793525442788905 + ], + [ + 35.1080207326404, + 44.824553365795765 + ], + [ + 35.130368105574235, + 44.86879838545747 + ], + [ + 35.15485200090768, + 44.90071251697748 + ], + [ + 35.17111229780758, + 44.90746386008772 + ], + [ + 35.21522068940149, + 44.91421441031795 + ], + [ + 35.233163085981715, + 44.925728224907715 + ], + [ + 35.25636688416236, + 44.95896657181197 + ], + [ + 35.27300098099195, + 44.96690119386028 + ], + [ + 35.29748487632534, + 44.95605693543271 + ], + [ + 35.30496087491386, + 44.96121482614441 + ], + [ + 35.315240372954605, + 44.965711070514175 + ], + [ + 35.31935217217088, + 44.96941359539801 + ], + [ + 35.36757236298112, + 44.94362319076086 + ], + [ + 35.36103086422793, + 44.97364475976596 + ], + [ + 35.362152264014156, + 44.98593980935419 + ], + [ + 35.374674561627444, + 44.997835734117416 + ], + [ + 35.389439658813274, + 45.00180049366759 + ], + [ + 35.42270785247763, + 45.00087540764923 + ], + [ + 35.43504325012745, + 45.00470780964241 + ], + [ + 35.43504325012745, + 45.011446929213974 + ], + [ + 35.40631957913584, + 45.02015821022701 + ], + [ + 35.40089948016896, + 45.025046135473445 + ], + [ + 35.39790908073891, + 45.03482073400548 + ], + [ + 35.40052568024015, + 45.042216617888045 + ], + [ + 35.40631957913584, + 45.051328088783805 + ], + [ + 35.40744097892215, + 45.06294640963205 + ], + [ + 35.41734667704213, + 45.0708666385693 + ], + [ + 35.469304867139925, + 45.10068964922732 + ], + [ + 35.5070260597534, + 45.113341616151644 + ], + [ + 35.54758335202416, + 45.12019982412133 + ], + [ + 35.59019654390909, + 45.11993606213795 + ], + [ + 35.63411803553862, + 45.11439677872579 + ], + [ + 35.70669729572677, + 45.09480210570922 + ], + [ + 35.771782422456766, + 45.06572995732262 + ], + [ + 35.78430472007, + 45.057941041321754 + ], + [ + 35.81250040352472, + 45.031852200991295 + ], + [ + 35.81941570220667, + 45.021152336906454 + ], + [ + 35.82763930064016, + 44.99895365027004 + ], + [ + 35.848198296721705, + 44.99208088455586 + ], + [ + 35.916977483614176, + 45.00172895661731 + ], + [ + 35.99360646900681, + 44.997896355361604 + ], + [ + 36.00893226608571, + 45.00926125333629 + ], + [ + 36.02539976723364, + 45.03288661039673 + ], + [ + 36.047827762958946, + 45.048074065419456 + ], + [ + 36.078666257082034, + 45.03883000769565 + ], + [ + 36.079137312377895, + 45.046610970582435 + ], + [ + 36.135020401727616, + 45.02125162210126 + ], + [ + 36.2241716847341, + 45.00751061631556 + ], + [ + 36.24398308095806, + 45.011474706353084 + ], + [ + 36.24828178013877, + 45.01649549321965 + ], + [ + 36.25332807917695, + 45.03247980324494 + ], + [ + 36.25743987839326, + 45.03842324279259 + ], + [ + 36.267158676549116, + 45.043573724415154 + ], + [ + 36.2783726744118, + 45.04555455542638 + ], + [ + 36.36740852558336, + 45.04833265291825 + ], + [ + 36.44029951169139, + 45.06787222615526 + ], + [ + 36.45375630913995, + 45.07631970334319 + ], + [ + 36.455251508854985, + 45.09202341204062 + ], + [ + 36.44142091149291, + 45.10709638287736 + ], + [ + 36.41432041665814, + 45.12872568311289 + ], + [ + 36.40852651776157, + 45.149160473330085 + ], + [ + 36.409997342308856, + 45.171615955386955 + ], + [ + 36.418312796420764, + 45.23001671705953 + ], + [ + 36.42672329481775, + 45.25186253492981 + ], + [ + 36.43756477765089, + 45.27227491599612 + ], + [ + 36.4497132753354, + 45.28542626329343 + ], + [ + 36.45905827355429, + 45.28753019598713 + ], + [ + 36.4814862692796, + 45.28845064200263 + ], + [ + 36.4909554290368, + 45.29213135137758 + ], + [ + 36.49637552800283, + 45.300940007322055 + ], + [ + 36.49394582846682, + 45.305015191082816 + ], + [ + 36.48871262946426, + 45.30935296803605 + ], + [ + 36.48460083024801, + 45.315924724862185 + ], + [ + 36.489647129296515, + 45.336413860372005 + ], + [ + 36.502169426909745, + 45.34731734941451 + ], + [ + 36.52104632331191, + 45.35033842661815 + ], + [ + 36.544281237819945, + 45.34731734942025 + ], + [ + 36.57455903204905, + 45.33601971904315 + ], + [ + 36.585399229982954, + 45.333917585593355 + ], + [ + 36.59810088537549, + 45.334837278577254 + ], + [ + 36.630808379142394, + 45.34048649352954 + ], + [ + 36.637536777859964, + 45.3511265071989 + ], + [ + 36.63099527910589, + 45.3741073632589 + ], + [ + 36.61359545390113, + 45.40895280985421 + ], + [ + 36.59845655678569, + 45.421547717459106 + ], + [ + 36.58331765967199, + 45.42731944465129 + ], + [ + 36.566309762912795, + 45.42548305000767 + ], + [ + 36.54836736633254, + 45.41210180010589 + ], + [ + 36.53285466928139, + 45.4090840212946 + ], + [ + 36.51565987255873, + 45.41957994832251 + ], + [ + 36.49117597722616, + 45.44279525429408 + ], + [ + 36.47043008117939, + 45.4458112314303 + ], + [ + 36.411182792482634, + 45.43610707766504 + ], + [ + 36.391371396258705, + 45.43991025572652 + ], + [ + 36.35959840231365, + 45.45407156049933 + ], + [ + 36.33960010612526, + 45.45695583486963 + ], + [ + 36.33025510790637, + 45.454464879327446 + ], + [ + 36.32053630976225, + 45.44856480887407 + ], + [ + 36.31156511147125, + 45.4438443081136 + ], + [ + 36.29885591389362, + 45.442795254299995 + ], + [ + 36.3072664122906, + 45.46115087970253 + ], + [ + 36.30016421364425, + 45.47320989503609 + ], + [ + 36.283717016779036, + 45.476355300848866 + ], + [ + 36.267082919949445, + 45.46704963343626 + ], + [ + 36.25213092279836, + 45.46115087970253 + ], + [ + 36.13681364478941, + 45.46219959214511 + ], + [ + 36.11700224855986, + 45.45721803432335 + ], + [ + 36.097003952371466, + 45.441483909606006 + ], + [ + 36.06952965760803, + 45.43046741078453 + ], + [ + 36.0655449627526, + 45.42553028973455 + ], + [ + 36.05134056545904, + 45.39535242162091 + ], + [ + 36.022557970944945, + 45.368441166003805 + ], + [ + 35.986486277818386, + 45.362926059418186 + ], + [ + 35.94723728529826, + 45.372380198658874 + ], + [ + 35.87220216002379, + 45.404075760536614 + ], + [ + 35.85388596351393, + 45.413916621802144 + ], + [ + 35.84715756479628, + 45.426379251448395 + ], + [ + 35.8524047739447, + 45.44386497541683 + ], + [ + 35.85950697259193, + 45.45933624762881 + ], + [ + 35.857824872912545, + 45.469953901705 + ], + [ + 35.83278027768503, + 45.47087138287168 + ], + [ + 35.8167068807486, + 45.46392436820739 + ], + [ + 35.80362388324218, + 45.44963442058864 + ], + [ + 35.79469305616038, + 45.42980210462429 + ], + [ + 35.791889556694684, + 45.41209230278156 + ], + [ + 35.772265060435046, + 45.39214572935421 + ], + [ + 35.767405661361295, + 45.38873311015669 + ], + [ + 35.75189296431793, + 45.386632934388984 + ], + [ + 35.7481549650407, + 45.379938103368545 + ], + [ + 35.746846665290036, + 45.369960021421576 + ], + [ + 35.74423006578874, + 45.36076812520648 + ], + [ + 35.71619507113218, + 45.34040932557082 + ], + [ + 35.69451467527287, + 45.32989869277279 + ], + [ + 35.51720627467216, + 45.29506847418358 + ], + [ + 35.48038698168983, + 45.2979608697527 + ], + [ + 35.33194061536096, + 45.371562726652314 + ], + [ + 35.04491375777232, + 45.669545248704424 + ], + [ + 35.00230056589345, + 45.7290693869553 + ], + [ + 34.70631294999043, + 46.024929846739866 + ], + [ + 34.35868883309806, + 46.106725558140795 + ], + [ + 34.00905273547181, + 46.55925987559425 + ] + ] + ] + } + } + } + }, + "version": 8, + "metadata": { + "maptiler:copyright": "This style was generated on MapTiler Cloud. Usage is governed by the license terms in https://github.com/maplibre/demotiles/blob/gh-pages/LICENSE", + "openmaptiles:version": "3.x" + } +} \ No newline at end of file diff --git a/assets/osm_style.json b/assets/osm_style.json new file mode 100644 index 0000000..793aa28 --- /dev/null +++ b/assets/osm_style.json @@ -0,0 +1,76 @@ +{ + "version": 8, + "projection": { + "type": "globe" + }, + "name": "My Martin Map", + "sources": { + "worlddom_source": { + "type": "raster", + "tiles": [ + "http://localhost:5656/dom_source/{z}/{x}/{y}" + ], + "tileSize": 256, + "attribution": "Custom Satellite Data" + }, + "hillshadeSource": { + "type": "raster-dem", + "url": "http://localhost:5656/dem_terrain/{z}/{x}/{y}", + "tileSize": 256 + }, + "elevation_source": { + "type": "raster-dem", + "tiles": [ + "http://localhost:5656/dem_terrain/{z}/{x}/{y}" + ], + "tileSize": 256, + "encoding": "terrarium" + } + }, + "layers": [ + { + "id": "hillshade_layer", + "type": "hillshade", + "source": "elevation_source", + "layout": { + "visibility": "visible" + }, + "paint": { + "hillshade-shadow-color": "#473B24", + "hillshade-highlight-color": "#FFFFE0", + "hillshade-illumination-direction": 335, + "hillshade-exaggeration": 0.5 + } + }, + + { + "id": "satellite_layer", + "type": "raster", + "source": "worlddom_source", + "minzoom": 0, + "maxzoom": 11 + } + ], + "terrain": { + "source": "elevation_source", + "exaggeration": 0.01 + }, + "sky": { + "atmosphere-blend": [ + "interpolate", + ["linear"], + ["zoom"], + 0, 1, + 5, 1, + 7, 0 + ] + }, + "light": { + "anchor": "map", + "position": [1.5, 60, 45] + } +} + + + + diff --git a/assets/pmtiles_style.json b/assets/pmtiles_style.json new file mode 100644 index 0000000..b5163e8 --- /dev/null +++ b/assets/pmtiles_style.json @@ -0,0 +1,10925 @@ +{ + "version": 8, + "sources": { + "protomaps": { + "type": "vector", + "attribution": "Protomaps © OpenStreetMap", + "url": "pmtiles://https://demo-bucket.protomaps.com/v4.pmtiles" + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#cccccc" + } + }, + { + "id": "earth", + "type": "fill", + "filter": [ + "==", + "$type", + "Polygon" + ], + "source": "protomaps", + "source-layer": "earth", + "paint": { + "fill-color": "#e2dfda" + } + }, + { + "id": "landcover", + "type": "fill", + "source": "protomaps", + "source-layer": "landcover", + "paint": { + "fill-color": [ + "match", + [ + "get", + "kind" + ], + "grassland", + "rgba(210, 239, 207, 1)", + "barren", + "rgba(255, 243, 215, 1)", + "urban_area", + "rgba(230, 230, 230, 1)", + "farmland", + "rgba(216, 239, 210, 1)", + "glacier", + "rgba(255, 255, 255, 1)", + "scrub", + "rgba(234, 239, 210, 1)", + "rgba(196, 231, 210, 1)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 1, + 7, + 0 + ] + } + }, + { + "id": "landuse_park", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course", + "wood", + "nature_reserve", + "forest", + "scrub", + "grassland", + "grass", + "military", + "naval_base", + "airfield" + ], + "paint": { + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + 0, + 11, + 1 + ], + "fill-color": [ + "case", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course" + ] + ] + ], + "#9cd3b4", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "wood", + "nature_reserve", + "forest" + ] + ] + ], + "#a0d9a0", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "scrub", + "grassland", + "grass" + ] + ] + ], + "#99d2bb", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "glacier" + ] + ] + ], + "#e7e7e7", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "sand" + ] + ] + ], + "#e2e0d7", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "military", + "naval_base", + "airfield" + ] + ] + ], + "#c6dcdc", + "#e2dfda" + ] + } + }, + { + "id": "landuse_urban_green", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "allotments", + "village_green", + "playground" + ], + "paint": { + "fill-color": "#9cd3b4", + "fill-opacity": 0.7 + } + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "==", + "kind", + "hospital" + ], + "paint": { + "fill-color": "#e4dad9" + } + }, + { + "id": "landuse_industrial", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "==", + "kind", + "industrial" + ], + "paint": { + "fill-color": "#d1dde1" + } + }, + { + "id": "landuse_school", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "school", + "university", + "college" + ], + "paint": { + "fill-color": "#e4ded7" + } + }, + { + "id": "landuse_beach", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "beach" + ], + "paint": { + "fill-color": "#e8e4d0" + } + }, + { + "id": "landuse_zoo", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "zoo" + ], + "paint": { + "fill-color": "#c6dcdc" + } + }, + { + "id": "landuse_aerodrome", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "aerodrome" + ], + "paint": { + "fill-color": "#dadbdf" + } + }, + { + "id": "roads_runway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "==", + "kind_detail", + "runway" + ], + "paint": { + "line-color": "#e9e9ed", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 10, + 0, + 12, + 4, + 18, + 30 + ] + } + }, + { + "id": "roads_taxiway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "==", + "kind_detail", + "taxiway" + ], + "paint": { + "line-color": "#e9e9ed", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 15, + 6 + ] + } + }, + { + "id": "landuse_runway", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + [ + "in", + "kind", + "runway", + "taxiway" + ] + ], + "paint": { + "fill-color": "#e9e9ed" + } + }, + { + "id": "water", + "type": "fill", + "filter": [ + "==", + "$type", + "Polygon" + ], + "source": "protomaps", + "source-layer": "water", + "paint": { + "fill-color": "#80deea" + } + }, + { + "id": "water_stream", + "type": "line", + "source": "protomaps", + "source-layer": "water", + "minzoom": 14, + "filter": [ + "in", + "kind", + "stream" + ], + "paint": { + "line-color": "#80deea", + "line-width": 0.5 + } + }, + { + "id": "water_river", + "type": "line", + "source": "protomaps", + "source-layer": "water", + "minzoom": 9, + "filter": [ + "in", + "kind", + "river" + ], + "paint": { + "line-color": "#80deea", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 9, + 0, + 9.5, + 1, + 18, + 12 + ] + } + }, + { + "id": "landuse_pedestrian", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "in", + "kind", + "pedestrian", + "dam" + ], + "paint": { + "fill-color": "#e3e0d4" + } + }, + { + "id": "landuse_pier", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "==", + "kind", + "pier" + ], + "paint": { + "fill-color": "#e0e0e0" + } + }, + { + "id": "roads_tunnels_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "in", + "kind", + "other", + "path" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "==", + "kind", + "minor_road" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [ + 3, + 2 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "has", + "is_link" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [ + 3, + 2 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [ + 3, + 2 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "highway" + ], + [ + "!has", + "is_link" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [ + 6, + 0.5 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_tunnels_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "in", + "kind", + "other", + "path" + ] + ], + "paint": { + "line-color": "#d5d5d5", + "line-dasharray": [ + 4.5, + 0.5 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "==", + "kind", + "minor_road" + ] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "has", + "is_link" + ] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_tunnel" + ], + [ + "==", + [ + "get", + "kind" + ], + "highway" + ], + [ + "!", + [ + "has", + "is_link" + ] + ] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "buildings", + "type": "fill", + "source": "protomaps", + "source-layer": "buildings", + "filter": [ + "in", + "kind", + "building", + "building_part" + ], + "paint": { + "fill-color": "#cccccc", + "fill-opacity": 0.5 + } + }, + { + "id": "roads_pier", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "==", + "kind_detail", + "pier" + ], + "paint": { + "line-color": "#e0e0e0", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 12, + 0, + 12.5, + 0.5, + 20, + 16 + ] + } + }, + { + "id": "roads_minor_service_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "minor_road" + ], + [ + "==", + "kind_detail", + "service" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 18, + 8 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "minor_road" + ], + [ + "!=", + "kind_detail", + "service" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "has", + "is_link" + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1.5 + ] + } + }, + { + "id": "roads_major_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_highway_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "highway" + ], + [ + "!has", + "is_link" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "in", + "kind", + "other", + "path" + ], + [ + "!=", + "kind_detail", + "pier" + ] + ], + "paint": { + "line-color": "#ebebeb", + "line-dasharray": [ + 3, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "has", + "is_link" + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_minor_service", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "minor_road" + ], + [ + "==", + "kind_detail", + "service" + ] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 18, + 8 + ] + } + }, + { + "id": "roads_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "minor_road" + ], + [ + "!=", + "kind_detail", + "service" + ] + ], + "paint": { + "line-color": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + "#ebebeb", + 16, + "#ffffff" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_major_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_highway_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "highway" + ], + [ + "!has", + "is_link" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 1 + ] + } + }, + { + "id": "roads_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "!has", + "is_tunnel" + ], + [ + "!has", + "is_bridge" + ], + [ + "==", + "kind", + "highway" + ], + [ + "!has", + "is_link" + ] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "roads_rail", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "==", + "kind", + "rail" + ], + "paint": { + "line-dasharray": [ + 0.3, + 0.75 + ], + "line-opacity": 0.5, + "line-color": "#a7b1b3", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 6, + 0.15, + 18, + 9 + ] + } + }, + { + "id": "boundaries_country", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [ + "<=", + "kind_detail", + 2 + ], + "paint": { + "line-color": "#adadad", + "line-width": 0.7, + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 2 + ] + ], + 4, + [ + "literal", + [ + 2, + 1 + ] + ] + ] + } + }, + { + "id": "boundaries", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [ + ">", + "kind_detail", + 2 + ], + "paint": { + "line-color": "#adadad", + "line-width": 0.4, + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 2 + ] + ], + 4, + [ + "literal", + [ + 2, + 1 + ] + ] + ] + } + }, + { + "id": "roads_bridges_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "in", + "kind", + "other", + "path" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "has", + "is_link" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 12, + 0, + 12.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "==", + "kind", + "minor_road" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_bridges_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 0.5, + 18, + 10 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 9, + 0, + 9.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "in", + "kind", + "other", + "path" + ] + ], + "paint": { + "line-color": "#ebebeb", + "line-dasharray": [ + 2, + 1 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "==", + "kind", + "minor_road" + ] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "has", + "is_link" + ] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "==", + "kind", + "major_road" + ] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "==", + "kind", + "highway" + ], + [ + "!has", + "is_link" + ] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_bridges_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [ + "has", + "is_bridge" + ], + [ + "==", + "kind", + "highway" + ], + [ + "!has", + "is_link" + ] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + [ + "exponential", + 1.6 + ], + [ + "zoom" + ], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "address_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "buildings", + "minzoom": 18, + "filter": [ + "==", + "kind", + "address" + ], + "layout": { + "symbol-placement": "point", + "text-font": [ + "Noto Sans Italic" + ], + "text-field": [ + "get", + "addr_housenumber" + ], + "text-size": 12 + }, + "paint": { + "text-color": "#91888b", + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "water_waterway_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "water", + "minzoom": 13, + "filter": [ + "in", + "kind", + "river", + "stream" + ], + "layout": { + "symbol-placement": "line", + "text-font": [ + "Noto Sans Italic" + ], + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-size": 12, + "text-letter-spacing": 0.2 + }, + "paint": { + "text-color": "#728dd4", + "text-halo-color": "#80deea", + "text-halo-width": 1 + } + }, + { + "id": "roads_labels_minor", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 15, + "filter": [ + "in", + "kind", + "minor_road", + "other", + "path" + ], + "layout": { + "symbol-sort-key": [ + "get", + "min_zoom" + ], + "symbol-placement": "line", + "text-font": [ + "Noto Sans Regular" + ], + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-size": 12 + }, + "paint": { + "text-color": "#91888b", + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "water_label_ocean", + "type": "symbol", + "source": "protomaps", + "source-layer": "water", + "filter": [ + "in", + "kind", + "sea", + "ocean", + "bay", + "strait", + "fjord" + ], + "layout": { + "text-font": [ + "Noto Sans Italic" + ], + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 10, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#728dd4", + "text-halo-width": 1, + "text-halo-color": "#80deea" + } + }, + { + "id": "water_label_lakes", + "type": "symbol", + "source": "protomaps", + "source-layer": "water", + "filter": [ + "in", + "kind", + "lake", + "water" + ], + "layout": { + "text-font": [ + "Noto Sans Italic" + ], + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 10, + 6, + 12, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": { + "text-color": "#728dd4", + "text-halo-color": "#80deea", + "text-halo-width": 1 + } + }, + { + "id": "roads_labels_major", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 11, + "filter": [ + "in", + "kind", + "highway", + "major_road" + ], + "layout": { + "symbol-sort-key": [ + "get", + "min_zoom" + ], + "symbol-placement": "line", + "text-font": [ + "Noto Sans Regular" + ], + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-size": 12 + }, + "paint": { + "text-color": "#938a8d", + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "pois", + "type": "symbol", + "source": "protomaps", + "source-layer": "pois", + "filter": [ + "all", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "beach", + "forest", + "marina", + "park", + "peak", + "zoo", + "garden", + "bench", + "aerodrome", + "station", + "bus_stop", + "ferry_terminal", + "stadium", + "university", + "library", + "school", + "animal", + "toilets", + "drinking_water" + ] + ] + ], + [ + ">=", + [ + "zoom" + ], + [ + "+", + [ + "get", + "min_zoom" + ], + 0 + ] + ] + ], + "layout": { + "icon-image": [ + "match", + [ + "get", + "kind" + ], + "station", + "train_station", + [ + "get", + "kind" + ] + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-justify": "auto", + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 17, + 10, + 19, + 16 + ], + "text-max-width": 8, + "text-offset": [ + 1.1, + 0 + ], + "text-variable-anchor": [ + "left", + "right" + ] + }, + "paint": { + "text-color": [ + "case", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "beach", + "forest", + "marina", + "park", + "peak", + "zoo", + "garden", + "bench" + ] + ] + ], + "#20834D", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "aerodrome", + "station", + "bus_stop", + "ferry_terminal" + ] + ] + ], + "#315BCF", + [ + "in", + [ + "get", + "kind" + ], + [ + "literal", + [ + "stadium", + "university", + "library", + "school", + "animal", + "toilets", + "drinking_water" + ] + ] + ], + "#6A5B8F", + "#e2dfda" + ], + "text-halo-color": "#e2dfda", + "text-halo-width": 1 + } + }, + { + "id": "places_subplace", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": [ + "==", + "kind", + "neighbourhood" + ], + "layout": { + "symbol-sort-key": [ + "get", + "min_zoom" + ], + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-max-width": 7, + "text-letter-spacing": 0.1, + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 2, + 8, + 4, + 12, + 18, + 15, + 20 + ], + "text-size": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 11, + 8, + 14, + 14, + 18, + 24 + ], + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#8f8f8f", + "text-halo-color": "#e0e0e0", + "text-halo-width": 1 + } + }, + { + "id": "places_locality", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": [ + "==", + "kind", + "locality" + ], + "layout": { + "icon-image": [ + "step", + [ + "zoom" + ], + "townspot", + 8, + "" + ], + "icon-size": 0.7, + "text-field": [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ], + "text-font": [ + "case", + [ + "<=", + [ + "get", + "min_zoom" + ], + 5 + ], + [ + "literal", + [ + "Noto Sans Medium" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ], + "text-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 3, + 8, + 7, + 12, + 11 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 13 + ], + 8, + [ + ">=", + [ + "get", + "population_rank" + ], + 13 + ], + 13, + 0 + ], + 4, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 13 + ], + 10, + [ + ">=", + [ + "get", + "population_rank" + ], + 13 + ], + 15, + 0 + ], + 6, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 12 + ], + 11, + [ + ">=", + [ + "get", + "population_rank" + ], + 12 + ], + 17, + 0 + ], + 8, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 11 + ], + 11, + [ + ">=", + [ + "get", + "population_rank" + ], + 11 + ], + 18, + 0 + ], + 10, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 9 + ], + 12, + [ + ">=", + [ + "get", + "population_rank" + ], + 9 + ], + 20, + 0 + ], + 15, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 8 + ], + 12, + [ + ">=", + [ + "get", + "population_rank" + ], + 8 + ], + 22, + 0 + ] + ], + "icon-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + 0, + 8, + 4, + 10, + 8, + 12, + 6, + 22, + 2 + ], + "text-justify": "auto", + "text-anchor": [ + "step", + [ + "zoom" + ], + "left", + 8, + "center" + ], + "text-radial-offset": 0.4 + }, + "paint": { + "text-color": "#5c5c5c", + "text-halo-color": "#e0e0e0", + "text-halo-width": 1 + } + }, + { + "id": "places_region", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": [ + "==", + "kind", + "region" + ], + "layout": { + "symbol-sort-key": [ + "get", + "min_zoom" + ], + "text-field": [ + "step", + [ + "zoom" + ], + [ + "get", + "name:short" + ], + 6, + [ + "case", + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "has", + "script" + ], + [ + "case", + [ + "any", + [ + "is-supported-script", + [ + "get", + "name" + ] + ], + [ + "has", + "pgf:name" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {}, + "\n", + {}, + [ + "case", + [ + "all", + [ + "!", + [ + "has", + "name:en" + ] + ], + [ + "has", + "name:en" + ], + [ + "!", + [ + "has", + "script" + ] + ] + ], + "", + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "get", + "name:en" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {} + ] + ], + [ + "all", + [ + "any", + [ + "has", + "name" + ], + [ + "has", + "pgf:name" + ] + ], + [ + "any", + [ + "has", + "name2" + ], + [ + "has", + "pgf:name2" + ] + ], + [ + "!", + [ + "any", + [ + "has", + "name3" + ], + [ + "has", + "pgf:name3" + ] + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "has", + "script2" + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ], + [ + "case", + [ + "all", + [ + "has", + "script" + ], + [ + "has", + "script2" + ], + [ + "has", + "script3" + ] + ], + [ + "format", + [ + "get", + "name:en" + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "case", + [ + "!", + [ + "has", + "script" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "!", + [ + "has", + "script2" + ] + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script3" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ], + [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "pgf:name3" + ], + [ + "get", + "name3" + ] + ], + {}, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name" + ], + [ + "get", + "name" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + }, + "\n", + {}, + [ + "coalesce", + [ + "get", + "pgf:name2" + ], + [ + "get", + "name2" + ] + ], + { + "text-font": [ + "case", + [ + "==", + [ + "get", + "script2" + ], + "Devanagari" + ], + [ + "literal", + [ + "Noto Sans Devanagari Regular v1" + ] + ], + [ + "literal", + [ + "Noto Sans Regular" + ] + ] + ] + } + ] + ] + ] + ] + ], + "text-font": [ + "Noto Sans Regular" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 11, + 7, + 16 + ], + "text-radial-offset": 0.2, + "text-anchor": "center", + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#b3b3b3", + "text-halo-color": "#e0e0e0", + "text-halo-width": 1 + } + }, + { + "id": "places_country", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": [ + "==", + "kind", + "country" + ], + "layout": { + "symbol-sort-key": [ + "get", + "min_zoom" + ], + "text-field": [ + "format", + [ + "coalesce", + [ + "get", + "name:en" + ], + [ + "get", + "name:en" + ] + ], + {} + ], + "text-font": [ + "Noto Sans Medium" + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 10 + ], + 8, + [ + ">=", + [ + "get", + "population_rank" + ], + 10 + ], + 12, + 0 + ], + 6, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 8 + ], + 10, + [ + ">=", + [ + "get", + "population_rank" + ], + 8 + ], + 18, + 0 + ], + 8, + [ + "case", + [ + "<", + [ + "get", + "population_rank" + ], + 7 + ], + 11, + [ + ">=", + [ + "get", + "population_rank" + ], + 7 + ], + 20, + 0 + ] + ], + "icon-padding": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 0, + 2, + 14, + 2, + 16, + 20, + 17, + 2, + 22, + 2 + ], + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#a3a3a3", + "text-halo-color": "#e2dfda", + "text-halo-width": 1 + } + } + ], + "sprite": "https://protomaps.github.io/basemaps-assets/sprites/v4/light", + "glyphs": "https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf" +} \ No newline at end of file diff --git a/assets/style - 副本.json b/assets/style - 副本.json new file mode 100644 index 0000000..74ed021 --- /dev/null +++ b/assets/style - 副本.json @@ -0,0 +1,33 @@ +{ + "version": 8, + "projection": { + "type": "globe" + }, + "sources": { + "satellite": { + "tiles": ["https://tiles.maps.eox.at/wmts/1.0.0/s2cloudless-2020_3857/default/g/{z}/{y}/{x}.jpg"], + "type": "raster" + } + }, + "layers": [ + { + "id": "Satellite", + "type": "raster", + "source": "satellite" + } + ], + "sky": { + "atmosphere-blend": [ + "interpolate", + ["linear"], + ["zoom"], + 0, 1, + 5, 1, + 7, 0 + ] + }, + "light": { + "anchor": "map", + "position": [1.5, 60, 45] + } +} \ No newline at end of file diff --git a/assets/style.json b/assets/style.json new file mode 100644 index 0000000..2631432 --- /dev/null +++ b/assets/style.json @@ -0,0 +1,26 @@ +{ + "version": 8, + + "sources": { + "my-mbtiles-source": { + "type": "vector", + "tiles": [ + "http://localhost:5656/osm_vector/{z}/{x}/{y}.pbf" + ], + "minzoom": 0, + "maxzoom": 14 + } + }, + "layers": [ + { + "id": "my-layer", + "type": "line", + "source": "my-mbtiles-source", + "source-layer": "your_layer_name_in_mbtiles", + "paint": { + "line-color": "#ff0000", + "line-width": 2 + } + } + ] +} \ No newline at end of file diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/lib/ecs/component.dart b/lib/ecs/component.dart new file mode 100644 index 0000000..29e2eef --- /dev/null +++ b/lib/ecs/component.dart @@ -0,0 +1,90 @@ +import 'package:flutter/material.dart'; +import 'package:maplibre_gl/maplibre_gl.dart'; +import 'entity.dart'; + +/// 组件基类 - 代表实体的属性 +abstract class Component { + final String id; + Entity? entity; + + Component({String? id}) : id = id ?? "${DateTime.now().millisecondsSinceEpoch}"; +} + +/// 标绘组件 - 用于在地图上绘制图形 +class PlotComponent extends Component { + final String plotType; + final List coordinates; + final Color color; + final double strokeWidth; + + PlotComponent({ + super.id, + required this.plotType, + required this.coordinates, + this.color = Colors.red, + this.strokeWidth = 2.0, + }); +} + +/// 图标组件 - 用于在地图上显示图标 +class IconComponent extends Component { + final String iconPath; + LatLng position; + final double size; + + IconComponent({ + super.id, + required this.iconPath, + required this.position, + this.size = 30.0, + }); +} + +/// 拖尾组件 - 用于显示移动实体的轨迹 +class TrailComponent extends Component { + final List trailPoints; + final Color trailColor; + final double maxLength; + + TrailComponent({ + super.id, + List? trailPoints, + this.trailColor = Colors.blue, + this.maxLength = 20.0, + }) : trailPoints = trailPoints ?? []; + + void addPoint(LatLng point) { + trailPoints.add(point); + if (trailPoints.length > maxLength) { + trailPoints.removeAt(0); + } + } +} + +/// 音频组件 - 用于播放与实体相关的音频 +class AudioComponent extends Component { + final String audioPath; + final bool loop; + final double volume; + + AudioComponent({ + super.id, + required this.audioPath, + this.loop = false, + this.volume = 1.0, + }); +} + +/// 移动组件 - 用于控制实体的移动 +class MovementComponent extends Component { + LatLng position; + LatLng? target; + double speed; + + MovementComponent({ + super.id, + required this.position, + this.target, + this.speed = 1.0, + }); +} \ No newline at end of file diff --git a/lib/ecs/entity.dart b/lib/ecs/entity.dart new file mode 100644 index 0000000..7a99664 --- /dev/null +++ b/lib/ecs/entity.dart @@ -0,0 +1,39 @@ +import 'component.dart'; +/// 实体ID生成器 +class EntityIdGenerator { + static int _id = 0; + static int nextId() => _id++; +} + +/// 实体类 - 代表地图上的一个对象 +class Entity { + final int id; + final String name; + int entityType; + final Map _components = {}; + + Entity({int? id, required this.name, this.entityType = 0}) : id = id ?? EntityIdGenerator.nextId(); + + /// 添加组件 + void addComponent(T component) { + _components[T.toString()] = component; + } + + /// 获取组件 + T? getComponent() { + return _components[T.toString()] as T?; + } + + /// 检查是否有特定类型的组件 + bool hasComponent() { + return _components.containsKey(T.toString()); + } + + /// 移除组件 + void removeComponent() { + _components.remove(T.toString()); + } + + /// 获取所有组件 + Map get components => _components; +} \ No newline at end of file diff --git a/lib/ecs/system.dart b/lib/ecs/system.dart new file mode 100644 index 0000000..21fb57f --- /dev/null +++ b/lib/ecs/system.dart @@ -0,0 +1,389 @@ +import 'dart:collection'; +import 'dart:math'; +import 'package:flutter/material.dart'; +import 'package:maplibre/maplibre.dart'; +import 'package:maplibre_gl/maplibre_gl.dart' as gl; +import '../screens/map_screen.dart'; +import 'entity.dart'; +import 'component.dart'; + +/// 系统基类 - 用于处理特定类型的组件 +abstract class System { + void update(List entities, Duration deltaTime); +} + +/// 地图系统 - 处理地图相关的实体和组件 +class MapSystem implements System { + gl.MapLibreMapController? mapController; + MapUiBodyState? mapUiBodyState; + final List _plotIds = []; + final List _trailIds = []; + final List _iconIds = []; + + // 单例实例 + static MapSystem? _instance; + + // 工厂构造函数,实现单例 + factory MapSystem({gl.MapLibreMapController? mapController, MapUiBodyState? mapUiBodyState}) { + _instance ??= MapSystem._internal(mapController: mapController, mapUiBodyState: mapUiBodyState); + if (mapController != null) _instance!.mapController = mapController; + if (mapUiBodyState != null) _instance!.mapUiBodyState = mapUiBodyState; + return _instance!; + } + + // 私有构造函数 + MapSystem._internal({this.mapController, this.mapUiBodyState}); + + /// 获取单例实例 + static MapSystem get instance { + _instance ??= MapSystem._internal(); + return _instance!; + } + + @override + void update(List entities, Duration deltaTime) { + // 更新地图上的标绘 + for (var entity in entities) { + if (entity.hasComponent()) { + _updatePlot(entity.getComponent()!); + } + + if (entity.hasComponent()) { + _updateIcon(entity.getComponent()!); + } + + if (entity.hasComponent()) { + _updateTrail(entity.getComponent()!); + } + + if (entity.hasComponent()) { + _updateMovement(entity); + } + } + } + + void _updatePlot(PlotComponent plot) { + // 实现标绘更新逻辑 + // 这里可以根据plotType绘制不同类型的图形 + if (plot.coordinates.length >= 2) { + // 示例:绘制线段 + // mapController?.addLine() // 这里需要根据实际API实现 + } + } + + void _updateIcon(IconComponent icon) { + // 实现图标更新逻辑 + // mapController?.addMarker() // 这里需要根据实际API实现 + } + + void _updateTrail(TrailComponent trail) { + // 实现拖尾更新逻辑 + // 绘制轨迹线 + } + + void _updateMovement(Entity entity) { + var movement = entity.getComponent(); + var plot = entity.getComponent(); + var icon = entity.getComponent(); + + if (movement != null && (plot != null || icon != null)) { + if (movement.target != null) { + // 简单的移动逻辑 - 向目标点移动 + double dx = movement.target!.longitude - movement.position.longitude; + double dy = movement.target!.latitude - movement.position.latitude; + double distance = sqrt(dx * dx + dy * dy); + + if (distance > 0.0001) { // 如果距离目标足够近就停止 + double ratio = movement.speed * 0.0001 / distance; + movement.position = gl.LatLng( + movement.position.latitude + dy * ratio, + movement.position.longitude + dx * ratio, + ); + + // 更新图标位置 + if (icon != null) { + icon.position = movement.position; + } + + // 如果有拖尾组件,添加新点 + var trail = entity.getComponent(); + if (trail != null) { + trail.addPoint(movement.position); + } + } else { + movement.target = null; // 到达目标 + } + } + } + } + + // ==================== 便捷方法:通过 mapUiBodyState 调用地图接口 ==================== + + /// 添加自定义图片标记 + void addCustomMarker(Geographic position, {Map? properties}) { + mapUiBodyState?.addCustomMarker(position, properties: properties); + } + + /// 添加圆形 + void addCircle( + Geographic position, { + double radius = 20, + Color color = Colors.orange, + Color strokeColor = Colors.red, + double strokeWidth = 2, + }) { + mapUiBodyState?.addCircle( + position, + radius: radius, + color: color, + strokeWidth: strokeWidth, + ); + } + + /// 添加扇形 + /// [center] 扇形中心的地理位置 + /// [radius] 扇形的半径(单位:米) + /// [startAngle] 起始角度(单位:度,0度表示正东方向) + /// [endAngle] 结束角度(单位:度) + /// [segments] 扇形的分段数,值越大越平滑 + /// [color] 填充颜色 + /// [outlineColor] 边框颜色 + void addSector( + Geographic center, { + required double radius, + required double startAngle, + required double endAngle, + int segments = 36, + Color color = Colors.lightBlueAccent, + Color outlineColor = Colors.blue, + }) { + mapUiBodyState?.addSector( + center, + radius: radius, + startAngle: startAngle, + endAngle: endAngle, + segments: segments, + color: color, + outlineColor: outlineColor, + ); + } + + /// 添加长方形 + /// [center] 长方形中心的地理位置 + /// [width] 长方形的宽度(单位:米) + /// [height] 长方形的高度(单位:米) + /// [color] 填充颜色 + /// [outlineColor] 边框颜色 + void addRectangle( + Geographic center, { + required double width, + required double height, + Color color = Colors.lightBlueAccent, + Color outlineColor = Colors.blue, + }) { + mapUiBodyState?.addRectangle( + center, + width: width, + height: height, + color: color, + outlineColor: outlineColor, + ); + } + + /// 清除所有自定义标记 + void clearCustomMarkers() { + mapUiBodyState?.clearCustomMarkers(); + } + + /// 清除所有圆形 + void clearCircles() { + mapUiBodyState?.clearCircles(); + } + + /// 清除所有多边形(包括扇形和长方形) + void clearPolygons() { + mapUiBodyState?.clearPolygons(); + } + + /// 清除所有自定义图层 + void clearAllCustomLayers() { + mapUiBodyState?.clearAllCustomLayers(); + } + + /// 添加固定大小的圆形(不随地图缩放) + void addFixedCircle( + Geographic position, { + double radius = 20, + Color color = Colors.orange, + Color strokeColor = Colors.red, + double strokeWidth = 2, + }) { + mapUiBodyState?.addFixedCircle( + position, + radius: radius, + color: color, + outlineColor: strokeColor, + ); + } +} + +/// 音频系统 - 处理音频相关的实体和组件 +class AudioSystem implements System { + @override + void update(List entities, Duration deltaTime) { + for (var entity in entities) { + if (entity.hasComponent()) { + var audioComponent = entity.getComponent()!; + _playAudio(audioComponent); + } + } + } + + void _playAudio(AudioComponent audio) { + // 实现音频播放逻辑 + // 这里可以使用Flutter的音频插件如audioplayers + print("Playing audio: ${audio.audioPath}"); + } +} + +/// 组件系统 - 管理各种组件的交互 +class ComponentSystem implements System { + @override + void update(List entities, Duration deltaTime) { + // 处理组件间的交互 + for (var entity in entities) { + // 可以根据需要实现组件交互逻辑 + if (entity.hasComponent() && entity.hasComponent()) { + // 当一个实体同时有标绘和图标组件时的特殊处理 + } + } + } +} + +/// ECS管理器 - 管理实体、系统和整个ECS框架 +class ECSManager { + static ECSManager? _instance; + + factory ECSManager() { + _instance ??= ECSManager._internal(); + return _instance!; + } + + ECSManager._internal(); + + /// 获取单例实例 + static ECSManager get instance { + _instance ??= ECSManager._internal(); + return _instance!; + } + + final List _entities = []; + final List _systems = []; + final Queue _entitiesToAdd = Queue(); + final Queue _entitiesToRemove = Queue(); + + void addEntity(Entity entity) { + _entitiesToAdd.add(entity); + } + + void removeEntity(Entity entity) { + _entitiesToRemove.add(entity); + } + + void addSystem(System system) { + _systems.add(system); + } + + void removeSystem(System system) { + _systems.remove(system); + } + + void update(Duration deltaTime) { + // 添加新实体 + while (_entitiesToAdd.isNotEmpty) { + _entities.add(_entitiesToAdd.removeFirst()); + } + + // 更新所有系统 + for (var system in _systems) { + system.update(_entities, deltaTime); + } + + // 移除实体 + while (_entitiesToRemove.isNotEmpty) { + var entity = _entitiesToRemove.removeFirst(); + _entities.remove(entity); + } + } + + List get entities => _entities; + + /// 工厂方法:创建一个带位置的实体 + Entity createEntityAtPosition({ + required String name, + required gl.LatLng position, + String? plotType, + Color plotColor = Colors.red, + double strokeWidth = 2.0, + String? iconPath, + double iconSize = 30.0, + bool hasTrail = false, + Color trailColor = Colors.blue, + double trailMaxLength = 20.0, + bool hasMovement = false, + gl.LatLng? movementTarget, + double movementSpeed = 1.0, + String? audioPath, + bool audioLoop = false, + double audioVolume = 1.0, + }) { + // 创建实体 + final entity = Entity(name: name); + + // 添加位置相关的组件 + if (plotType != null) { + entity.addComponent(PlotComponent( + plotType: plotType, + coordinates: [position], + color: plotColor, + strokeWidth: strokeWidth, + )); + } + + if (iconPath != null) { + entity.addComponent(IconComponent( + iconPath: iconPath, + position: position, + size: iconSize, + )); + } + + if (hasTrail) { + entity.addComponent(TrailComponent( + trailColor: trailColor, + maxLength: trailMaxLength, + )); + } + + if (hasMovement) { + entity.addComponent(MovementComponent( + position: position, + target: movementTarget, + speed: movementSpeed, + )); + } + + if (audioPath != null) { + entity.addComponent(AudioComponent( + audioPath: audioPath, + loop: audioLoop, + volume: audioVolume, + )); + } + + // 添加到管理器 + addEntity(entity); + + return entity; + } +} \ No newline at end of file diff --git a/lib/screens/chat_screen.dart b/lib/screens/chat_screen.dart index 543e0b2..b5e99c5 100644 --- a/lib/screens/chat_screen.dart +++ b/lib/screens/chat_screen.dart @@ -6,6 +6,12 @@ import '../providers/chat_provider.dart'; import '../widgets/message_bubble.dart'; import '../widgets/typing_indicator.dart'; import '../widgets/chat_input.dart'; +import 'map_screen.dart'; // 导入地图界面 + + +// 定义一个 GlobalKey 来访问 _ChatScreenState +final GlobalKey<_ChatScreenState> chatScreenStateKey = GlobalKey<_ChatScreenState>(); + class ChatScreen extends StatefulWidget { const ChatScreen({super.key}); @@ -16,6 +22,13 @@ class ChatScreen extends StatefulWidget { class _ChatScreenState extends State { final ScrollController _scrollController = ScrollController(); + bool _mapViewOpen = false; // 控制地图界面是否展开 + + void _toggleMapView() { + setState(() { + _mapViewOpen = !_mapViewOpen; + }); + } void _scrollToBottom() { if (_scrollController.hasClients) { @@ -62,18 +75,43 @@ class _ChatScreenState extends State { context.read().clearMessages(); }, ), + // 添加地图按钮 + CommandBarButton( + icon: const Icon(FluentIcons.map_layers), + label: const Text('Map'), + onPressed: _toggleMapView, // 切换地图视图 + ), ], ), ), - content: Column( + content: Row( // 修改为Row布局,实现左右分屏 children: [ - Expanded(child: _buildMessageList()), - _buildInputArea(), + // 聊天界面部分,使用Expanded来正确分配空间 + Expanded( + flex: 1, + child: _buildChatContent(), + ), + + // 地图界面部分,根据状态决定是否显示 + if (_mapViewOpen) + Expanded( + child: const MapUiPage(), // 使用现有的地图页面 + ), ], ), ); } + // 提取聊天内容部分到单独的方法 + Widget _buildChatContent() { + return Column( + children: [ + Expanded(child: _buildMessageList()), + _buildInputArea(), + ], + ); + } + Widget _buildMessageList() { return Consumer( builder: (context, chatProvider, child) { @@ -161,7 +199,7 @@ class _ChatScreenState extends State { color: theme.accentColor, borderRadius: BorderRadius.circular(20), ), - child: const Icon(FluentIcons.robot, color: Colors.white, size: 40), + child: Icon(FluentIcons.robot, color: Colors.white, size: 40), ), const SizedBox(height: 24), Text('Hello! I\'m your AI Assistant', style: theme.typography.title), @@ -220,4 +258,4 @@ class _ChatScreenState extends State { _scrollController.dispose(); super.dispose(); } -} +} \ No newline at end of file diff --git a/lib/screens/map_screen.dart b/lib/screens/map_screen.dart new file mode 100644 index 0000000..a8eb240 --- /dev/null +++ b/lib/screens/map_screen.dart @@ -0,0 +1,613 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +import 'dart:math' as Math; +import 'package:flutter/material.dart'; +import 'package:maplibre/maplibre.dart'; +import 'package:maplibre_gl/maplibre_gl.dart' as gl; +import '../ecs/system.dart'; + +abstract class ExamplePage extends StatelessWidget { + const ExamplePage( + this.leading, + this.title, { + this.needsLocationPermission = true, + super.key, + }); + + final Widget leading; + final String title; + final bool needsLocationPermission; +} + + +class MapUiPage extends ExamplePage { + const MapUiPage({super.key}) : super(const Icon(Icons.map), '态势'); + + @override + Widget build(BuildContext context) { + return const MapUiBody(); + } +} + +class MapUiBody extends StatefulWidget { + const MapUiBody({super.key}); + + @override + State createState() => MapUiBodyState(); + + /// 静态方法,用于通过 GlobalKey 获取 MapUiBodyState 实例 + static MapUiBodyState? of(BuildContext context) { + final mapUiBody = context.findAncestorWidgetOfExactType(); + if (mapUiBody?.key is GlobalKey) { + final key = mapUiBody?.key as GlobalKey; + return key.currentState; + } + return null; + } +} + +class MapUiBodyState extends State with TickerProviderStateMixin { + late final MapController _controller; + final GlobalKey _mapKey = GlobalKey(); + + // MapSystem 实例,用于通过系统调用地图接口 + late final MapSystem mapSystem; + + final _markerPositions = [ + const Geographic(lon: -10, lat: 0), + const Geographic(lon: -5, lat: 0), + const Geographic(lon: 0, lat: 0), + const Geographic(lon: 5, lat: 0), + ]; + + // 自定义图片标记数据 + final _customMarkers = >[]; + bool _customMarkerImageLoaded = false; + + // 圆形数据 + final _circles = >[]; + + // 多边形数据(包括扇形和长方形) + final _polygons = >[]; + + Geographic? _originalPosition; + MapGestures _mapGestures = const MapGestures.all(); + + @override + void initState() { + super.initState(); + // 初始化 MapSystem,并将 this 传递给它 + mapSystem = MapSystem(mapUiBodyState: this); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + //appBar: AppBar(title: const Text('Interactive Widget Layer')), + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Padding( + padding: EdgeInsets.only(left: 16, bottom: 8), + + ), + Expanded( + child: MapLibreMap( + key: _mapKey, + options: MapOptions( + initZoom: 3, + initCenter: const Geographic(lon: 0, lat: 0), + initStyle: "assets/osm_style.json", + gestures: _mapGestures, + ), + onMapCreated: (controller) => _controller = controller, + onEvent: (event) async { + if (event is MapEventStyleLoaded) { + // 加载自定义标记图片 + await event.style.addImageFromIconData( + id: 'custom-marker', + iconData: Icons.location_on, + color: Colors.blue, + ); + setState(() { + _customMarkerImageLoaded = true; + }); + } else if (event is MapEventLongClick) { + final position = event.point; + _markerPositions.add(position); + + setState(() {}); + } + }, + layers: [ + // 自定义图片标记层 + MarkerLayer( + points: _customMarkers.where((marker) => + marker.properties['type'] != 'fixed_circle' + ).toList(), // 过滤掉固定圆形 + iconImage: _customMarkerImageLoaded ? 'custom-marker' : null, + iconSize: 0.15, + iconAnchor: IconAnchor.bottom, + ), + // 圆形层 + CircleLayer( + points: _circles, + color: Colors.orange.withValues(alpha: 0.5), + radius: 20, + strokeColor: Colors.red, + strokeWidth: 2, + ), + // 多边形层(扇形、长方形和圆形) + PolygonLayer( + polygons: _polygons, + color: Colors.lightBlueAccent.withValues(alpha: 0.6), + outlineColor: Colors.blue, + ), + ], + children: [ + WidgetLayer( + allowInteraction: true, + markers: List.generate( + _markerPositions.length, + (index) => Marker( + size: const Size.square(50), + point: _markerPositions[index], + child: GestureDetector( + onTap: () => _onTap(index), + onLongPressStart: (details) => + _onLongPress(index, details), + onPanStart: (details) => _onLongPanStart(details, index), + onPanUpdate: (details) async => + _onPanUpdate(details, index), + onPanEnd: (details) async => _onPanEnd(details, index), + child: const Icon( + Icons.location_on, + color: Colors.red, + size: 50, + ), + ), + alignment: Alignment.bottomCenter, + ), + ), + ), + // 添加固定圆形的Widget + WidgetLayer( + allowInteraction: false, // 固定圆形不需要交互 + markers: _customMarkers + .where((marker) => marker.properties['type'] == 'fixed_circle') + .map((marker) { + final pointGeometry = marker.geometry as Point; + // 使用Point的position属性获取坐标 + final geographic = Geographic( + lon: pointGeometry.position.x, + lat: pointGeometry.position.y, + ); + return Marker( + size: Size.fromRadius(marker.properties['radius']?.toDouble() ?? 20.0), + point: geographic, + child: IgnorePointer( // 忽略指针事件,确保不会干扰地图手势 + child: Container( + width: (marker.properties['radius']?.toDouble() ?? 20.0) * 2, + height: (marker.properties['radius']?.toDouble() ?? 20.0) * 2, + decoration: BoxDecoration( + color: marker.properties['color'] ?? Colors.orange, + shape: BoxShape.circle, + border: Border.all( + color: marker.properties['strokeColor'] ?? Colors.red, + width: marker.properties['strokeWidth']?.toDouble() ?? 2.0, + ), + ), + ), + ), + alignment: Alignment.center, + ); + }) + .toList(), + ), + // display the UI widgets above the widget markers. + const MapScalebar(), + const SourceAttribution(), + const MapControlButtons(), + const MapCompass(), + ], + ), + ), + ], + ), + ); + } + + Future _toLngLat(Offset eventOffset) async { + final mapRenderBox = + _mapKey.currentContext?.findRenderObject() as RenderBox?; + + assert(mapRenderBox != null, 'RenderBox of Map should never be null'); + + final mapOffset = mapRenderBox!.localToGlobal(Offset.zero); + + final offset = Offset( + eventOffset.dx - mapOffset.dx, + eventOffset.dy - mapOffset.dy, + ); + + return _controller.toLngLat(offset); + } + + void _onLongPress(int index, LongPressStartDetails details) { + final offset = details.globalPosition; + + showMenu( + context: context, + position: RelativeRect.fromLTRB( + offset.dx, + offset.dy, + MediaQuery.of(context).size.width - offset.dx, + MediaQuery.of(context).size.height - offset.dy, + ), + items: [ + const PopupMenuItem(child: Text('Edit')), + PopupMenuItem( + onTap: () async { + final isConfirmed = await _showConfirmationDialogDelete(index); + + if (isConfirmed) { + _markerPositions.removeAt(index); + + setState(() {}); + } + }, + child: const Text('Delete'), + ), + ], + ); + } + + Future _onPanEnd(DragEndDetails details, int index) async { + final isAccepted = await _showConfirmationDialogMove(); + + if (!isAccepted) { + _markerPositions[index] = _originalPosition!; + } else { + final newPosition = await _toLngLat(details.globalPosition); + _markerPositions[index] = newPosition; + } + + _originalPosition = null; + + setState(() { + _mapGestures = const MapGestures.all(); + }); + } + + void _onLongPanStart(DragStartDetails details, int index) { + // Keep original position in case of discarded move + _originalPosition = Geographic.from(_markerPositions[index]); + + setState(() { + // Disable camera panning while a marker gets moved. + _mapGestures = const MapGestures.all(pan: false); + }); + } + + Future _onPanUpdate(DragUpdateDetails details, int index) async { + final newPosition = await _toLngLat(details.globalPosition); + _markerPositions[index] = newPosition; + + setState(() {}); + } + + void _onTap(int index) { + _showMarkerDetails(index); + } + + Future _showConfirmationDialogDelete(int index) async { + final isConfirmed = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Delete marker [$index]?'), + actions: [ + TextButton( + style: TextButton.styleFrom( + textStyle: Theme.of(context).textTheme.labelLarge, + ), + child: const Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(false); + }, + ), + TextButton( + style: TextButton.styleFrom( + textStyle: Theme.of(context).textTheme.labelLarge, + ), + child: const Text('Delete'), + onPressed: () { + Navigator.of(context).pop(true); + }, + ), + ], + ), + ); + + return isConfirmed ?? false; + } + + Future _showConfirmationDialogMove() async { + final isConfirmed = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('Accept new position?'), + actions: [ + TextButton( + style: TextButton.styleFrom( + textStyle: Theme.of(context).textTheme.labelLarge, + ), + child: const Text('Discard'), + onPressed: () { + Navigator.of(context).pop(false); + }, + ), + TextButton( + style: TextButton.styleFrom( + textStyle: Theme.of(context).textTheme.labelLarge, + ), + child: const Text('Accept'), + onPressed: () { + Navigator.of(context).pop(true); + }, + ), + ], + ), + ); + + return isConfirmed ?? false; + } + + Future _showMarkerDetails(int index) async { + await showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text('Details marker with index: $index'), + content: Text('Show here the details of Marker with index $index'), + actions: [ + TextButton( + style: TextButton.styleFrom( + textStyle: Theme.of(context).textTheme.labelLarge, + ), + child: const Text('Cancel'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ), + ); + + return; + } + + // ==================== 公共接口方法 ==================== + + /// 添加自定义图片标记 + /// + /// [position] 标记的地理位置 + /// [properties] 可选的属性数据 + void addCustomMarker(Geographic position, {Map? properties}) { + setState(() { + _customMarkers.add(Feature( + geometry: Point(position), + properties: properties, + )); + }); + } + + /// 添加圆形 + /// + /// [position] 圆心的地理位置 + /// [radius] 圆的半径(单位:像素) + /// [color] 填充颜色 + /// [strokeColor] 边框颜色 + /// [strokeWidth] 边框宽度 + void addCircle( + Geographic position, { + double radius = 20, + Color color = Colors.orange, + Color strokeColor = Colors.red, + double strokeWidth = 2, + }) { + setState(() { + _circles.add(Feature( + geometry: Point(position), + properties: { + 'radius': radius, + 'color': color, + 'strokeColor': strokeColor, + 'strokeWidth': strokeWidth, + }, + )); + }); + } + + /// 添加固定大小的圆形(不随地图缩放) + /// + /// [center] 圆心的地理位置 + /// [radius] 圆的半径(单位:米) + /// [color] 填充颜色 + /// [outlineColor] 边框颜色 + void addFixedCircle( + Geographic center, { + required double radius, + Color color = Colors.orange, + Color outlineColor = Colors.blue, + }) { + // 将半径从米转换为经纬度(度) + final radiusInDegrees = _metersToDegrees(center, radius); + + final points = []; + + // 计算圆周上的点(360度) + for (int i = 0; i <= 36; i++) { // 使用36个点来构成圆形 + final angle = (360 * i / 36) * 3.14159265359 / 180; // 角度转弧度 + + // 将角度转换为经纬度偏移 + final latOffset = radiusInDegrees * Math.sin(angle); + final lonOffset = radiusInDegrees * Math.cos(angle); + + points.add(Geographic( + lon: center.lon + lonOffset, + lat: center.lat + latOffset, + )); + } + + setState(() { + _polygons.add(Feature( + geometry: Polygon.from([points]), + properties: { + 'color': color, + 'outlineColor': outlineColor, + 'type': 'fixed_circle_geo', // 标记为地理圆形 + }, + )); + }); + } + + /// 添加扇形 + /// + /// [center] 扇形中心的地理位置 + /// [radius] 扇形的半径(单位:米) + /// [startAngle] 起始角度(单位:度,0度表示正东方向) + /// [endAngle] 结束角度(单位:度) + /// [segments] 扇形的分段数,值越大越平滑 + /// [color] 填充颜色 + /// [outlineColor] 边框颜色 + void addSector( + Geographic center, { + required double radius, + required double startAngle, + required double endAngle, + int segments = 36, + Color color = Colors.lightBlueAccent, + Color outlineColor = Colors.blue, + }) { + // 将半径从米转换为经纬度(度) + final radiusInDegrees = _metersToDegrees(center, radius); + + final points = []; + + // 添加中心点 + points.add(center); + + // 计算扇形的弧线上的点 + for (int i = 0; i <= segments; i++) { + final angle = startAngle + (endAngle - startAngle) * i / segments; + final angleRad = angle * 3.14159265359 / 180; + + // 将角度转换为经纬度偏移 + final latOffset = radiusInDegrees * Math.sin(angleRad); + final lonOffset = radiusInDegrees * Math.cos(angleRad); + + points.add(Geographic( + lon: center.lon + lonOffset, + lat: center.lat + latOffset, + )); + } + + setState(() { + _polygons.add(Feature( + geometry: Polygon.from([points]), + properties: { + 'color': color, + 'outlineColor': outlineColor, + }, + )); + }); + } + + /// 添加长方形 + /// + /// [center] 长方形中心的地理位置 + /// [width] 长方形的宽度(单位:米) + /// [height] 长方形的高度(单位:米) + /// [color] 填充颜色 + /// [outlineColor] 边框颜色 + void addRectangle( + Geographic center, { + required double width, + required double height, + Color color = Colors.lightBlueAccent, + Color outlineColor = Colors.blue, + }) { + // 将宽高从米转换为经纬度(度) + final widthInDegrees = _metersToDegrees(center, width / 2); + final heightInDegrees = _metersToDegrees(center, height / 2); + + final points = [ + Geographic(lon: center.lon - widthInDegrees, lat: center.lat - heightInDegrees), + Geographic(lon: center.lon + widthInDegrees, lat: center.lat - heightInDegrees), + Geographic(lon: center.lon + widthInDegrees, lat: center.lat + heightInDegrees), + Geographic(lon: center.lon - widthInDegrees, lat: center.lat + heightInDegrees), + Geographic(lon: center.lon - widthInDegrees, lat: center.lat - heightInDegrees), // 闭合多边形 + ]; + + setState(() { + _polygons.add(Feature( + geometry: Polygon.from([points]), + properties: { + 'color': color, + 'outlineColor': outlineColor, + }, + )); + }); + } + + /// 将距离(米)转换为经纬度(度) + /// 此方法使用近似计算,适用于小范围区域 + double _metersToDegrees(Geographic center, double meters) { + // 地球半径,约为6378137米 + const earthRadius = 6378137.0; + + // 将米转换为度 + // 1度大约等于111320米(在赤道附近) + // 但需要考虑纬度的影响,因为经度的距离会随纬度变化 + final latCircumference = 2 * Math.pi * earthRadius; // 纬线周长 + final latFactor = meters / latCircumference * 360; // 纬度方向转换因子 + + // 经度方向需要考虑纬度的影响 + final lonCircumference = 2 * Math.pi * earthRadius * Math.cos(center.lat * Math.pi / 180); // 经线周长 + final lonFactor = meters / lonCircumference * 360; // 经度方向转换因子 + + // 返回平均值,对于小范围区域,这个近似是足够的 + return (latFactor + lonFactor) / 2; + } + + /// 清除所有自定义标记 + void clearCustomMarkers() { + setState(() { + _customMarkers.clear(); + }); + } + + /// 清除所有圆形 + void clearCircles() { + setState(() { + _circles.clear(); + }); + } + + /// 清除所有多边形(包括扇形和长方形) + void clearPolygons() { + setState(() { + _polygons.clear(); + }); + } + + /// 清除所有自定义图层 + void clearAllCustomLayers() { + setState(() { + _customMarkers.clear(); + _circles.clear(); + _polygons.clear(); + }); + } +} + diff --git a/lib/utils/map_styles.dart b/lib/utils/map_styles.dart new file mode 100644 index 0000000..61ba958 --- /dev/null +++ b/lib/utils/map_styles.dart @@ -0,0 +1,174 @@ +enum MapStyles { + openMapTilesLiberty( + name: 'OpenMapTiles Liberty', + uri: 'https://tiles.openfreemap.org/styles/liberty', + ), + openMapTilesBright( + name: 'OpenMapTiles Bright', + uri: 'https://tiles.openfreemap.org/styles/bright', + ), + openMapTilesPositron( + name: 'OpenMapTiles Positron', + uri: 'https://tiles.openfreemap.org/styles/positron', + ), + openMapTilesStreets( + name: 'OpenMapTiles Streets', + uri: + 'https://api.maptiler.com/maps/streets-v2/style.json?key=$_maptilerKey', + ), + stadiaMapsAlidadeSmooth( + name: 'Alidade Smooth', + uri: + 'https://tiles.stadiamaps.com/styles/alidade_smooth.json?api_key=$_stadiamapsKey', + ), + stadiaMapsAlidadeSmoothDark( + name: 'Alidade Smooth Dark', + uri: + 'https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json?api_key=$_stadiamapsKey', + ), + versaTilesColorful( + name: 'VersaTiles Colorful', + uri: 'https://tiles.versatiles.org/assets/styles/colorful/style.json', + ), + versaTilesGraybeard( + name: 'VersaTiles Graybeard', + uri: 'https://tiles.versatiles.org/assets/styles/graybeard/style.json', + ), + versaTilesEclipse( + name: 'VersaTiles Eclipse', + uri: 'https://tiles.versatiles.org/assets/styles/eclipse/style.json', + ), + versaTilesNeutrino( + name: 'VersaTiles Neutrino', + uri: 'https://tiles.versatiles.org/assets/styles/neutrino/style.json', + ), + protomapsLight( + name: 'Protomaps Light', + uri: 'https://api.protomaps.com/styles/v2/light.json?key=$_protomapsKey', + ), + protomapsLightPmTiles( + name: 'Protomaps Light (PMTiles)', + uri: 'assets/styles/protomaps-light.json', + ), + protomapsDark( + name: 'Protomaps Dark', + uri: 'https://api.protomaps.com/styles/v2/dark.json?key=$_protomapsKey', + ), + protomapsWhite( + name: 'Protomaps White', + uri: 'https://api.protomaps.com/styles/v2/white.json?key=$_protomapsKey', + ), + // mapboxStreets( + // name: 'Mapbox Streets (legacy)', + // uri: 'mapbox://styles/mapbox/streets-v12?access_token=$_mapboxKey', + // ), + // mapboxOutdoor( + // name: 'Mapbox Outdoors (legacy)', + // uri: 'mapbox://styles/mapbox/outdoors-v12?access_token=$_mapboxKey', + // ), + // mapboxLight( + // name: 'Mapbox Light (legacy)', + // uri: 'mapbox://styles/mapbox/light-v11?access_token=$_mapboxKey', + // ), + // mapboxDark( + // name: 'Mapbox Dark (legacy)', + // uri: 'mapbox://styles/mapbox/dark-v11?access_token=$_mapboxKey', + // ), + // mapboxSatellite( + // name: 'Mapbox Satellite (legacy)', + // uri: 'mapbox://styles/mapbox/satellite-v9?access_token=$_mapboxKey', + // ), + // mapboxSatelliteStreets( + // name: 'Mapbox Satellite Streets (legacy)', + // uri: + // 'mapbox://styles/mapbox/satellite-streets-v12?access_token=$_mapboxKey', + // ), + maplibreWorld( + name: 'MapLibre World', + uri: 'https://demotiles.maplibre.org/style.json', + ), + maplibreDebug( + name: 'MapLibre Debug', + uri: 'https://demotiles.maplibre.org/debug-tiles/style.json', + ), + translucent(name: 'Translucent', uri: 'assets/styles/translucent_style.json'), + countries( + name: 'Countries', + uri: ''' +{ + "version": 8, + "name": "MapLibre", + "center": [17.65431710431244, 32.954120326746775], + "zoom": 0.8619833357855968, + "bearing": 0, + "pitch": 0, + "sources": { + "maplibre": { + "url": "https://demotiles.maplibre.org/tiles/tiles.json", + "type": "vector" + } + }, + "glyphs": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "maxzoom": 24, + "filter": ["all"], + "paint": {"background-color": "#D8F2FF"} + }, + { + "id": "countries-fill", + "type": "fill", + "source": "maplibre", + "source-layer": "countries", + "maxzoom": 24, + "filter": ["all"], + "paint": {"fill-color": "#FFFFFF"} + }, + { + "id": "countries-boundary", + "type": "line", + "source": "maplibre", + "source-layer": "countries", + "maxzoom": 24, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#198EC8", + "line-width": {"stops": [[1, 1], [6, 2], [14, 6], [22, 12]]}, + "line-opacity": {"stops": [[3, 0.5], [6, 1]]} + } + } + ], + "id": "43f36e14-e3f5-43c1-84c0-50a9c80dc5c7" +} + ''', + ); + + const MapStyles({required this.name, required this.uri}); + + final String name; + final String uri; +} + +/// **Use your own key for your project!** +/// This key will be rotated occasionally. +/// +/// https://cloud.maptiler.com/account/keys/ +const _maptilerKey = 'OPCgnZ51sHETbEQ4wnkd'; + +/// **Use your own key for your project!** +/// This key will be rotated occasionally. +/// +/// https://protomaps.com/account +const _protomapsKey = 'a6f9aebb3965458c'; + +/// **Use your own key for your project!** +/// This key will be rotated occasionally. +/// +/// https://client.stadiamaps.com/dashboard +const _stadiamapsKey = '0d5e614b-aaf7-4bfd-9bf3-1f7c3062248e'; diff --git a/lib/utils/style_dropdown.dart b/lib/utils/style_dropdown.dart new file mode 100644 index 0000000..9f2b82a --- /dev/null +++ b/lib/utils/style_dropdown.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import '/utils/map_styles.dart'; + +class StyleDropdown extends StatefulWidget { + const StyleDropdown({required this.onChanged, super.key}); + + final void Function(MapStyles style) onChanged; + + static MapStyles get initStyle => MapStyles.openMapTilesLiberty; + + @override + State createState() => _StyleDropdownState(); +} + +class _StyleDropdownState extends State { + late MapStyles _selectedStyle = StyleDropdown.initStyle; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: DropdownButton( + value: _selectedStyle, + items: MapStyles.values + .map((e) => DropdownMenuItem(value: e, child: Text(e.name))) + .toList(growable: false), + onChanged: (value) { + if (value == null) return; + setState(() => _selectedStyle = value); + widget.onChanged(value); + }, + ), + ); + } +} diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index a52ce89..cc6619f 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,20 +7,28 @@ #include "generated_plugin_registrant.h" #include +#include #include #include +#include #include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) flutter_acrylic_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterAcrylicPlugin"); flutter_acrylic_plugin_register_with_registrar(flutter_acrylic_registrar); + g_autoptr(FlPluginRegistrar) maplibre_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "MaplibrePlugin"); + maplibre_plugin_register_with_registrar(maplibre_registrar); g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin"); screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar); g_autoptr(FlPluginRegistrar) system_theme_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "SystemThemePlugin"); system_theme_plugin_register_with_registrar(system_theme_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); g_autoptr(FlPluginRegistrar) window_manager_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); window_manager_plugin_register_with_registrar(window_manager_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index f914adb..1e908c1 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,12 +4,15 @@ list(APPEND FLUTTER_PLUGIN_LIST flutter_acrylic + maplibre screen_retriever_linux system_theme + url_launcher_linux window_manager ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index f20fc3f..f122b76 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,13 +6,17 @@ import FlutterMacOS import Foundation import macos_window_utils +import maplibre import screen_retriever_macos import system_theme +import url_launcher_macos import window_manager func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin")) + MaplibrePlugin.register(with: registry.registrar(forPlugin: "MaplibrePlugin")) ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin")) SystemThemePlugin.register(with: registry.registrar(forPlugin: "SystemThemePlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 2981991..9c25758 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,12 +1,20 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.7" args: dependency: transitive description: name: args sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.7.0" async: @@ -14,7 +22,7 @@ packages: description: name: async sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.13.0" boolean_selector: @@ -22,7 +30,7 @@ packages: description: name: boolean_selector sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" characters: @@ -30,7 +38,7 @@ packages: description: name: characters sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.4.0" clock: @@ -38,7 +46,7 @@ packages: description: name: clock sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.2" collection: @@ -46,23 +54,63 @@ packages: description: name: collection sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.19.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.7" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" fake_async: dependency: transitive description: name: fake_async sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.4" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + fl_nodes: + dependency: "direct main" + description: + name: fl_nodes + sha256: "4597284f72369885e8b6bfc5221835a3a6472d9c61769b45c6c64b8f242b2b28" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.5.0+1" fluent_ui: dependency: "direct main" description: name: fluent_ui sha256: "64223237a1d873b426d578d4d8b2703b8f7d9731608a5beb7b9745194568d484" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.13.0" flutter: @@ -75,15 +123,23 @@ packages: description: name: flutter_acrylic sha256: b3996dbde5abf5823cc9ead4cf2e5267c3181f15585fe47ce4dc4472e7ec827a - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.4" + flutter_context_menu: + dependency: transitive + description: + name: flutter_context_menu + sha256: "79fe00cd7e3ac3840a552cb3e653d8eb61d827b6c04c559e219973a1dc769165" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.0" flutter_lints: dependency: "direct dev" description: name: flutter_lints sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.0.0" flutter_localizations: @@ -96,33 +152,105 @@ packages: description: name: flutter_markdown sha256: "08fb8315236099ff8e90cb87bb2b935e0a724a3af1623000a9cec930468e0f27" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.7+1" + flutter_shaders: + dependency: transitive + description: + name: flutter_shaders + sha256: "34794acadd8275d971e02df03afee3dee0f98dbfb8c4837082ad0034f612a3e2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.3" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_web_plugins: - dependency: transitive + dependency: "direct main" description: flutter source: sdk version: "0.0.0" + geobase: + dependency: transitive + description: + name: geobase + sha256: "3a4e2eb17a7ab452dda78fb45ee498a3ab02469ded749a5f4a9abea21fc95919" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.0" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: eff94d2a6fc79fa8b811dde79c7549808c2346037ee107a1121b4a644c745f2a + url: "https://pub.flutter-io.cn" + source: hosted + version: "17.0.1" + html: + dependency: transitive + description: + name: html + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.15.6" + http: + dependency: "direct main" + description: + name: http + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.6.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.2" + image: + dependency: transitive + description: + name: image + sha256: "492bd52f6c4fbb6ee41f781ff27765ce5f627910e1e0cbecfa3d9add5562604c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.7.2" intl: dependency: transitive description: name: intl sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.20.2" + jni: + dependency: transitive + description: + name: jni + sha256: "8706a77e94c76fe9ec9315e18949cc9479cc03af97085ca9c1077b61323ea12d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.15.2" + js: + dependency: transitive + description: + name: js + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.7.2" json_annotation: dependency: transitive description: name: json_annotation sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.9.0" leak_tracker: @@ -130,7 +258,7 @@ packages: description: name: leak_tracker sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "11.0.2" leak_tracker_flutter_testing: @@ -138,7 +266,7 @@ packages: description: name: leak_tracker_flutter_testing sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.10" leak_tracker_testing: @@ -146,7 +274,7 @@ packages: description: name: leak_tracker_testing sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" lints: @@ -154,23 +282,79 @@ packages: description: name: lints sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.0.0" + lists: + dependency: transitive + description: + name: lists + sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" macos_window_utils: dependency: transitive description: name: macos_window_utils sha256: d4df3501fd32ac0d2d7590cb6a8e4758337d061c8fa0db816fdd636be63a8438 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.9.0" + maplibre: + dependency: "direct main" + description: + name: maplibre + sha256: d58260f7163baa05305a8700706325b9f8715a71887091370cab28fc327ef9d7 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.2" + maplibre_gl: + dependency: "direct main" + description: + name: maplibre_gl + sha256: "5c7b1008396b2a321bada7d986ed60f9423406fbc7bd16f7ce91b385dfa054cd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.22.0" + maplibre_gl_platform_interface: + dependency: "direct main" + description: + name: maplibre_gl_platform_interface + sha256: "08ee0a2d0853ea945a0ab619d52c0c714f43144145cd67478fc6880b52f37509" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.22.0" + maplibre_gl_web: + dependency: "direct main" + description: + name: maplibre_gl_web + sha256: "2b13d4b1955a9a54e38a718f2324e56e4983c080fc6de316f6f4b5458baacb58" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.22.0" + maplibre_ios: + dependency: transitive + description: + name: maplibre_ios + sha256: "8c2c4ebba25039f7a4001f2d369fb187b0583c805b71b695e1d3c96ee3b7ba0a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.2" markdown: dependency: transitive description: name: markdown sha256: "935e23e1ff3bc02d390bad4d4be001208ee92cc217cb5b5a6c19bc14aaa318c1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "7.3.0" matcher: @@ -178,7 +362,7 @@ packages: description: name: matcher sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.12.17" material_color_utilities: @@ -186,7 +370,7 @@ packages: description: name: material_color_utilities sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.11.1" math_expressions: @@ -194,7 +378,7 @@ packages: description: name: math_expressions sha256: "218dc65bed4726562bb31c53d8daa3cc824664b26fb72d77bc592757edf74ba0" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.7.0" meta: @@ -202,23 +386,47 @@ packages: description: name: meta sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.17.0" + mgrs_dart: + dependency: transitive + description: + name: mgrs_dart + sha256: fb89ae62f05fa0bb90f70c31fc870bcbcfd516c843fb554452ab3396f78586f7 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" nested: dependency: transitive description: name: nested sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "87103d96b19be76dc34b5ef859fecae78561d49779d5480b73c23b4dec8b9ec4" + url: "https://pub.flutter-io.cn" + source: hosted + version: "8.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" path: dependency: transitive description: name: path sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.9.1" petitparser: @@ -226,7 +434,7 @@ packages: description: name: petitparser sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.1.0" plugin_platform_interface: @@ -234,23 +442,79 @@ packages: description: name: plugin_platform_interface sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.8" + pointer_interceptor: + dependency: transitive + description: + name: pointer_interceptor + sha256: "57210410680379aea8b1b7ed6ae0c3ad349bfd56fe845b8ea934a53344b9d523" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.1+2" + pointer_interceptor_ios: + dependency: transitive + description: + name: pointer_interceptor_ios + sha256: "03c5fa5896080963ab4917eeffda8d28c90f22863a496fb5ba13bc10943e40e4" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.1+1" + pointer_interceptor_platform_interface: + dependency: transitive + description: + name: pointer_interceptor_platform_interface + sha256: "0597b0560e14354baeb23f8375cd612e8bd4841bf8306ecb71fcd0bb78552506" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.0+1" + pointer_interceptor_web: + dependency: transitive + description: + name: pointer_interceptor_web + sha256: "460b600e71de6fcea2b3d5f662c92293c049c4319e27f0829310e5a953b3ee2a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.3" + posix: + dependency: transitive + description: + name: posix + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.0.3" + proj4dart: + dependency: transitive + description: + name: proj4dart + sha256: c8a659ac9b6864aa47c171e78d41bbe6f5e1d7bd790a5814249e6b68bc44324e + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.0" provider: dependency: "direct main" description: name: provider sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.1.5+1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" recase: dependency: transitive description: name: recase sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.1.0" screen_retriever: @@ -258,7 +522,7 @@ packages: description: name: screen_retriever sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" screen_retriever_linux: @@ -266,7 +530,7 @@ packages: description: name: screen_retriever_linux sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" screen_retriever_macos: @@ -274,7 +538,7 @@ packages: description: name: screen_retriever_macos sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" screen_retriever_platform_interface: @@ -282,7 +546,7 @@ packages: description: name: screen_retriever_platform_interface sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" screen_retriever_windows: @@ -290,7 +554,7 @@ packages: description: name: screen_retriever_windows sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" scroll_pos: @@ -298,7 +562,7 @@ packages: description: name: scroll_pos sha256: cebf602b2dd939de6832bb902ffefb574608d1b84f420b82b381a4007d3c1e1b - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.5.0" sky_engine: @@ -311,7 +575,7 @@ packages: description: name: source_span sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.1" stack_trace: @@ -319,7 +583,7 @@ packages: description: name: stack_trace sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.12.1" stream_channel: @@ -327,7 +591,7 @@ packages: description: name: stream_channel sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.4" string_scanner: @@ -335,31 +599,31 @@ packages: description: name: string_scanner sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.4.1" system_theme: dependency: "direct main" description: name: system_theme - sha256: "5f93485401689601d4636a695f99f7c70a30873ee68c1d95025d908a3386be7e" - url: "https://pub.dev" + sha256: "827cc5f94a6c3097a4c08d4f9eb11d345322f9deea5be1cb73611ff24bdf45bb" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.2" + version: "3.2.0" system_theme_web: dependency: transitive description: name: system_theme_web - sha256: "900c92c5c050ce58048f241ef9a17e5cd8629808325a05b473dc62a6e99bae77" - url: "https://pub.dev" + sha256: a354b25ff0788ed802b48b632187d344a841b2034f16e4f6cdaa295e4a41a8aa + url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.3" + version: "0.0.4" term_glyph: dependency: transitive description: name: term_glyph sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.2" test_api: @@ -367,15 +631,103 @@ packages: description: name: test_api sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.7" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.0" + unicode: + dependency: transitive + description: + name: unicode + sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.1" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.2" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.28" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.6" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.2" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.5" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.5" + uuid: + dependency: transitive + description: + name: uuid + sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.5.2" vector_math: dependency: transitive description: name: vector_math sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.0" vm_service: @@ -383,7 +735,7 @@ packages: description: name: vm_service sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "15.0.2" web: @@ -391,7 +743,7 @@ packages: description: name: web sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" window_manager: @@ -399,9 +751,25 @@ packages: description: name: window_manager sha256: "732896e1416297c63c9e3fb95aea72d0355f61390263982a47fd519169dc5059" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.3" + wkt_parser: + dependency: transitive + description: + name: wkt_parser + sha256: "8a555fc60de3116c00aad67891bcab20f81a958e4219cc106e3c037aa3937f13" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.5.0" sdks: dart: ">=3.10.0 <4.0.0" - flutter: ">=3.32.0" + flutter: ">=3.35.6" diff --git a/pubspec.yaml b/pubspec.yaml index 7d0d667..8e81e62 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -30,17 +30,24 @@ environment: dependencies: flutter: sdk: flutter - + flutter_web_plugins: + sdk: flutter + go_router: ^17.0.0 + http: ^1.2.2 + maplibre: ^0.3.2 # Fluent UI fluent_ui: ^4.9.2 system_theme: ^3.1.2 window_manager: ^0.4.3 flutter_acrylic: ^1.1.4 - + maplibre_gl: ^0.22.0 + maplibre_gl_web: ^0.22.0 + maplibre_gl_platform_interface: ^0.22.0 # Utilities flutter_markdown: ^0.7.4+3 provider: ^6.1.2 - + fl_nodes: ^0.5.0+1 + dev_dependencies: flutter_test: sdk: flutter @@ -64,10 +71,11 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - + assets: + - assets/config/ + - assets/style.json + - assets/osm_style.json + - assets/pmtiles_style.json # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images @@ -88,7 +96,7 @@ flutter: # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf + # - fonts/TrajanPro_Bold.ttf # weight: 700 # # For details regarding fonts from package dependencies, diff --git a/web/index.html b/web/index.html index 20a8b67..b27ce36 100644 --- a/web/index.html +++ b/web/index.html @@ -31,6 +31,11 @@ llm_chat + + + + + diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 45426a3..a7f7ad4 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,17 +7,23 @@ #include "generated_plugin_registrant.h" #include +#include #include #include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { FlutterAcrylicPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterAcrylicPlugin")); + MaplibrePluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("MaplibrePluginCApi")); ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi")); SystemThemePluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("SystemThemePlugin")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); WindowManagerPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("WindowManagerPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index bd0a88d..8a67f17 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -4,12 +4,15 @@ list(APPEND FLUTTER_PLUGIN_LIST flutter_acrylic + maplibre screen_retriever_windows system_theme + url_launcher_windows window_manager ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES)