@@ -22,8 +22,8 @@ const NIMIQ_COLORS = {
2222 red400 : '#F9E1DC' , // Very light red (hospitals)
2323} as const
2424
25- // Free Protomaps tiles URL (non-commercial use )
26- const PROTOMAPS_TILES_URL = 'pmtiles:// https://build.protomaps .com/20250122.pmtiles '
25+ // Stadia Maps vector tiles (OpenMapTiles schema )
26+ const STADIA_TILES_URL = 'https://tiles.stadiamaps .com/data/openmaptiles.json?api_key=72b90deb-0790-4dcb-a39e-8584048fbf45 '
2727
2828export function getMapStyle ( origin : string ) : StyleSpecification {
2929 return {
@@ -36,10 +36,10 @@ export function getMapStyle(origin: string): StyleSpecification {
3636 sprite : 'https://protomaps.github.io/basemaps-assets/sprites/v4/light' ,
3737 glyphs : 'https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf' ,
3838 sources : {
39- protomaps : {
39+ openmaptiles : {
4040 type : 'vector' ,
41- url : PROTOMAPS_TILES_URL ,
42- attribution : '<a href="https://protomaps .com">Protomaps </a> | <a href="https://openstreetmap.org">© OpenStreetMap</a>' ,
41+ url : STADIA_TILES_URL ,
42+ attribution : '<a href="https://stadiamaps .com/">Stadia Maps</a> | <a href="https://openmaptiles.org/">© OpenMapTiles </a> | <a href="https://openstreetmap.org">© OpenStreetMap</a>' ,
4343 } ,
4444 locations : {
4545 type : 'vector' ,
@@ -62,7 +62,7 @@ export function getMapStyle(origin: string): StyleSpecification {
6262 {
6363 'id' : 'landcover_grass' ,
6464 'type' : 'fill' ,
65- 'source' : 'protomaps ' ,
65+ 'source' : 'openmaptiles ' ,
6666 'source-layer' : 'landcover' ,
6767 'filter' : [ '==' , 'class' , 'grass' ] ,
6868 'paint' : {
@@ -73,7 +73,7 @@ export function getMapStyle(origin: string): StyleSpecification {
7373 {
7474 'id' : 'landcover_wood' ,
7575 'type' : 'fill' ,
76- 'source' : 'protomaps ' ,
76+ 'source' : 'openmaptiles ' ,
7777 'source-layer' : 'landcover' ,
7878 'filter' : [ '==' , 'class' , 'wood' ] ,
7979 'paint' : {
@@ -86,7 +86,7 @@ export function getMapStyle(origin: string): StyleSpecification {
8686 {
8787 'id' : 'park' ,
8888 'type' : 'fill' ,
89- 'source' : 'protomaps ' ,
89+ 'source' : 'openmaptiles ' ,
9090 'source-layer' : 'park' ,
9191 'paint' : {
9292 'fill-color' : NIMIQ_COLORS . green600 ,
@@ -98,7 +98,7 @@ export function getMapStyle(origin: string): StyleSpecification {
9898 {
9999 'id' : 'landuse_residential' ,
100100 'type' : 'fill' ,
101- 'source' : 'protomaps ' ,
101+ 'source' : 'openmaptiles ' ,
102102 'source-layer' : 'landuse' ,
103103 'filter' : [ 'in' , 'class' , 'residential' , 'suburbs' , 'neighbourhood' ] ,
104104 'paint' : {
@@ -109,7 +109,7 @@ export function getMapStyle(origin: string): StyleSpecification {
109109 {
110110 'id' : 'landuse_hospital' ,
111111 'type' : 'fill' ,
112- 'source' : 'protomaps ' ,
112+ 'source' : 'openmaptiles ' ,
113113 'source-layer' : 'landuse' ,
114114 'filter' : [ '==' , 'class' , 'hospital' ] ,
115115 'paint' : {
@@ -119,7 +119,7 @@ export function getMapStyle(origin: string): StyleSpecification {
119119 {
120120 'id' : 'landuse_school' ,
121121 'type' : 'fill' ,
122- 'source' : 'protomaps ' ,
122+ 'source' : 'openmaptiles ' ,
123123 'source-layer' : 'landuse' ,
124124 'filter' : [ '==' , 'class' , 'school' ] ,
125125 'paint' : {
@@ -131,7 +131,7 @@ export function getMapStyle(origin: string): StyleSpecification {
131131 {
132132 'id' : 'water' ,
133133 'type' : 'fill' ,
134- 'source' : 'protomaps ' ,
134+ 'source' : 'openmaptiles ' ,
135135 'source-layer' : 'water' ,
136136 'paint' : {
137137 'fill-color' : NIMIQ_COLORS . blue400 ,
@@ -140,7 +140,7 @@ export function getMapStyle(origin: string): StyleSpecification {
140140 {
141141 'id' : 'waterway' ,
142142 'type' : 'line' ,
143- 'source' : 'protomaps ' ,
143+ 'source' : 'openmaptiles ' ,
144144 'source-layer' : 'waterway' ,
145145 'minzoom' : 8 ,
146146 'paint' : {
@@ -163,7 +163,7 @@ export function getMapStyle(origin: string): StyleSpecification {
163163 {
164164 'id' : 'building' ,
165165 'type' : 'fill' ,
166- 'source' : 'protomaps ' ,
166+ 'source' : 'openmaptiles ' ,
167167 'source-layer' : 'building' ,
168168 'minzoom' : 13 ,
169169 'paint' : {
@@ -177,7 +177,7 @@ export function getMapStyle(origin: string): StyleSpecification {
177177 {
178178 'id' : 'road_minor' ,
179179 'type' : 'line' ,
180- 'source' : 'protomaps ' ,
180+ 'source' : 'openmaptiles ' ,
181181 'source-layer' : 'transportation' ,
182182 'filter' : [ 'in' , 'class' , 'minor' , 'service' ] ,
183183 'paint' : {
@@ -188,7 +188,7 @@ export function getMapStyle(origin: string): StyleSpecification {
188188 {
189189 'id' : 'road_major' ,
190190 'type' : 'line' ,
191- 'source' : 'protomaps ' ,
191+ 'source' : 'openmaptiles ' ,
192192 'source-layer' : 'transportation' ,
193193 'filter' : [ 'in' , 'class' , 'primary' , 'secondary' , 'tertiary' ] ,
194194 'paint' : {
@@ -199,7 +199,7 @@ export function getMapStyle(origin: string): StyleSpecification {
199199 {
200200 'id' : 'road_motorway' ,
201201 'type' : 'line' ,
202- 'source' : 'protomaps ' ,
202+ 'source' : 'openmaptiles ' ,
203203 'source-layer' : 'transportation' ,
204204 'filter' : [ '==' , 'class' , 'motorway' ] ,
205205 'minzoom' : 5 ,
@@ -213,7 +213,7 @@ export function getMapStyle(origin: string): StyleSpecification {
213213 {
214214 'id' : 'admin_country' ,
215215 'type' : 'line' ,
216- 'source' : 'protomaps ' ,
216+ 'source' : 'openmaptiles ' ,
217217 'source-layer' : 'boundary' ,
218218 'filter' : [ '==' , 'admin_level' , 2 ] ,
219219 'paint' : {
@@ -225,7 +225,7 @@ export function getMapStyle(origin: string): StyleSpecification {
225225 {
226226 'id' : 'admin_state' ,
227227 'type' : 'line' ,
228- 'source' : 'protomaps ' ,
228+ 'source' : 'openmaptiles ' ,
229229 'source-layer' : 'boundary' ,
230230 'filter' : [ 'in' , 'admin_level' , 3 , 4 ] ,
231231 'paint' : {
@@ -239,7 +239,7 @@ export function getMapStyle(origin: string): StyleSpecification {
239239 {
240240 'id' : 'water_name' ,
241241 'type' : 'symbol' ,
242- 'source' : 'protomaps ' ,
242+ 'source' : 'openmaptiles ' ,
243243 'source-layer' : 'water_name' ,
244244 'minzoom' : 10 ,
245245 'layout' : {
@@ -256,7 +256,7 @@ export function getMapStyle(origin: string): StyleSpecification {
256256 {
257257 'id' : 'waterway_name' ,
258258 'type' : 'symbol' ,
259- 'source' : 'protomaps ' ,
259+ 'source' : 'openmaptiles ' ,
260260 'source-layer' : 'waterway' ,
261261 'filter' : [ '==' , 'class' , 'river' ] ,
262262 'minzoom' : 12 ,
@@ -278,7 +278,7 @@ export function getMapStyle(origin: string): StyleSpecification {
278278 {
279279 'id' : 'road_label' ,
280280 'type' : 'symbol' ,
281- 'source' : 'protomaps ' ,
281+ 'source' : 'openmaptiles ' ,
282282 'source-layer' : 'transportation_name' ,
283283 'filter' : [ 'in' , 'class' , 'motorway' , 'trunk' , 'primary' ] ,
284284 'minzoom' : 10 ,
@@ -301,7 +301,7 @@ export function getMapStyle(origin: string): StyleSpecification {
301301 {
302302 'id' : 'aerodrome_label' ,
303303 'type' : 'symbol' ,
304- 'source' : 'protomaps ' ,
304+ 'source' : 'openmaptiles ' ,
305305 'source-layer' : 'aerodrome_label' ,
306306 'minzoom' : 9 ,
307307 'layout' : {
@@ -322,7 +322,7 @@ export function getMapStyle(origin: string): StyleSpecification {
322322 {
323323 'id' : 'mountain_peak' ,
324324 'type' : 'symbol' ,
325- 'source' : 'protomaps ' ,
325+ 'source' : 'openmaptiles ' ,
326326 'source-layer' : 'mountain_peak' ,
327327 'filter' : [ '>' , [ 'coalesce' , [ 'get' , 'rank' ] , 99 ] , 0 ] ,
328328 'minzoom' : 11 ,
@@ -344,7 +344,7 @@ export function getMapStyle(origin: string): StyleSpecification {
344344 {
345345 'id' : 'place_country' ,
346346 'type' : 'symbol' ,
347- 'source' : 'protomaps ' ,
347+ 'source' : 'openmaptiles ' ,
348348 'source-layer' : 'place' ,
349349 'filter' : [ '==' , 'class' , 'country' ] ,
350350 'minzoom' : 3 ,
@@ -365,7 +365,7 @@ export function getMapStyle(origin: string): StyleSpecification {
365365 {
366366 'id' : 'place_city' ,
367367 'type' : 'symbol' ,
368- 'source' : 'protomaps ' ,
368+ 'source' : 'openmaptiles ' ,
369369 'source-layer' : 'place' ,
370370 'filter' : [ 'in' , 'class' , 'city' , 'town' ] ,
371371 'minzoom' : 8 ,
@@ -384,7 +384,7 @@ export function getMapStyle(origin: string): StyleSpecification {
384384 {
385385 'id' : 'place_village' ,
386386 'type' : 'symbol' ,
387- 'source' : 'protomaps ' ,
387+ 'source' : 'openmaptiles ' ,
388388 'source-layer' : 'place' ,
389389 'filter' : [ '==' , 'class' , 'village' ] ,
390390 'minzoom' : 12 ,
0 commit comments