From 5e2a98924c2a0efdb1f75a213efe7114df5e0cae Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 11 Oct 2023 19:16:33 +0200 Subject: [PATCH] Fix: add carto vector layers again --- src/Models/RasterLayers.ts | 6 +-- src/assets/global-raster-layers.json | 68 ++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 4 deletions(-) diff --git a/src/Models/RasterLayers.ts b/src/Models/RasterLayers.ts index 47162b690..d0f8a88d5 100644 --- a/src/Models/RasterLayers.ts +++ b/src/Models/RasterLayers.ts @@ -53,10 +53,7 @@ export class AvailableRasterLayers { geometry: BBox.global.asGeometry(), } - public static readonly vectorLayers = [ - AvailableRasterLayers.maptilerDefaultLayer, - AvailableRasterLayers.osmCarto, - ] + public static readonly vectorLayers = [AvailableRasterLayers.maptilerDefaultLayer] public static layersAvailableAt( location: Store<{ lon: number; lat: number }> @@ -79,6 +76,7 @@ export class AvailableRasterLayers { } return GeoOperations.inside(lonlat, eliPolygon) }) + matching.push(AvailableRasterLayers.maptilerDefaultLayer) matching.push(...AvailableRasterLayers.globalLayers) return matching }) diff --git a/src/assets/global-raster-layers.json b/src/assets/global-raster-layers.json index 25c0edf0a..cb54b006c 100644 --- a/src/assets/global-raster-layers.json +++ b/src/assets/global-raster-layers.json @@ -87,6 +87,74 @@ "text": "Stadiamaps", "url": "https://stadiamaps.com/" } + }, + { + "url": "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json?key=eyJhbGciOiJIUzI1NiJ9.eyJhIjoiYWNfdW4ybmhlbTciLCJqdGkiOiIwZGQxNjJmNyJ9.uATJpa6QcrtXhph3Bzvk2nX3QsxEw-Q8dj5khUG6hGk", + "name": "Carto Positron", + "category": "osmbasedmap", + "id": "carto.positron", + "type": "vector", + "attribution": { + "text": "CARTO", + "url": "https://carto.com/" + } + }, + { + "url": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json?key=eyJhbGciOiJIUzI1NiJ9.eyJhIjoiYWNfdW4ybmhlbTciLCJqdGkiOiIwZGQxNjJmNyJ9.uATJpa6QcrtXhph3Bzvk2nX3QsxEw-Q8dj5khUG6hGk", + "name": "Carto Dark Matter", + "category": "osmbasedmap", + "id": "carto.dark_matter", + "type": "vector", + "attribution": { + "text": "CARTO", + "url": "https://carto.com/" + } + }, + { + "url": "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json?key=eyJhbGciOiJIUzI1NiJ9.eyJhIjoiYWNfdW4ybmhlbTciLCJqdGkiOiIwZGQxNjJmNyJ9.uATJpa6QcrtXhph3Bzvk2nX3QsxEw-Q8dj5khUG6hGk", + "name": "Carto Voyager", + "category": "osmbasedmap", + "id": "carto.voyager", + "type": "vector", + "attribution": { + "text": "CARTO", + "url": "https://carto.com/" + } + }, + + + { + "url": "https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json?key=eyJhbGciOiJIUzI1NiJ9.eyJhIjoiYWNfdW4ybmhlbTciLCJqdGkiOiIwZGQxNjJmNyJ9.uATJpa6QcrtXhph3Bzvk2nX3QsxEw-Q8dj5khUG6hGk", + "name": "Carto Positron (no labels)", + "category": "osmbasedmap", + "id": "carto.positron_no_labels", + "type": "vector", + "attribution": { + "text": "CARTO", + "url": "https://carto.com/" + } + }, + { + "url": "https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json?key=eyJhbGciOiJIUzI1NiJ9.eyJhIjoiYWNfdW4ybmhlbTciLCJqdGkiOiIwZGQxNjJmNyJ9.uATJpa6QcrtXhph3Bzvk2nX3QsxEw-Q8dj5khUG6hGk", + "name": "Carto Dark Matter (no labels)", + "category": "osmbasedmap", + "id": "carto.dark_matter_no_labels", + "type": "vector", + "attribution": { + "text": "CARTO", + "url": "https://carto.com/" + } + }, + { + "url": "https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json?key=eyJhbGciOiJIUzI1NiJ9.eyJhIjoiYWNfdW4ybmhlbTciLCJqdGkiOiIwZGQxNjJmNyJ9.uATJpa6QcrtXhph3Bzvk2nX3QsxEw-Q8dj5khUG6hGk", + "name": "Carto Voyager (no labels)", + "category": "osmbasedmap", + "id": "carto.voyager_no_labels", + "type": "vector", + "attribution": { + "text": "CARTO", + "url": "https://carto.com/" + } } ] }