From bbd7f801b41961dce8bad41a657338f0dddddff4 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Sat, 14 Dec 2019 18:34:51 +0700 Subject: [PATCH] added carto to cache --- src/constants/providers.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/constants/providers.ts b/src/constants/providers.ts index e91ce1d..498bdc7 100644 --- a/src/constants/providers.ts +++ b/src/constants/providers.ts @@ -15,7 +15,8 @@ export interface ITileMaps { YMAP: IProvider, SAT: IProvider, ESAT: IProvider, - CACHE: IProvider, + CACHE_OSM: IProvider, + CACHE_CARTO: IProvider, } @@ -36,11 +37,16 @@ const TILEMAPS: ITileMaps = { url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', range: ['a', 'b', 'c'], }, - CACHE: { - name: 'Cache', + CACHE_OSM: { + name: 'Cache Osm', url: 'https://{s}.osm.tile.vault48.org/{z}/{x}/{y}.png', range: ['a', 'b', 'c'], }, + CACHE_CARTO: { + name: 'Cache Carto', + url: 'https://{s}.carto.tile.vault48.org/{z}/{x}/{y}.png', + range: ['a', 'b', 'c'], + }, DARQ: { name: 'Darq', url: 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', @@ -78,7 +84,7 @@ const TILEMAPS: ITileMaps = { } }; -const ENABLED: Array = ['BLANK', 'DEFAULT', 'DGIS', 'HOT', 'ESAT', 'CACHE']; +const ENABLED: Array = ['BLANK', 'DEFAULT', 'DGIS', 'HOT', 'ESAT', 'CACHE_OSM', 'CACHE_CARTO']; export const DEFAULT_PROVIDER: keyof ITileMaps = ENABLED[0]; export const PROVIDERS: Partial = ENABLED.reduce((obj, provider) => ({