mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
providers: initial
This commit is contained in:
parent
b85141046d
commit
552e3effb8
16 changed files with 133 additions and 49 deletions
|
@ -7,5 +7,6 @@ export const MODES = {
|
|||
NONE: 'NONE',
|
||||
LOGO: 'LOGO',
|
||||
SAVE: 'SAVE',
|
||||
CONFIRM_CANCEL: 'CONFIRM_CANCEL'
|
||||
CONFIRM_CANCEL: 'CONFIRM_CANCEL',
|
||||
PROVIDER: 'PROVIDER',
|
||||
};
|
||||
|
|
|
@ -1,12 +1,56 @@
|
|||
// Стили карт
|
||||
export const providers = {
|
||||
'watercolor': 'http://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg',
|
||||
'darq': 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
|
||||
'dgis': 'https://tile1.maps.2gis.com/tiles?x={x}&y={y}&z={z}&v=1',
|
||||
'default': 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
'hot': 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||
'blank': 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
|
||||
'sat': 'http://mt0.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}',
|
||||
'ymap': 'https://vec03.maps.yandex.net/tiles?l=map&v=17.04.16-0&x={x}&y={y}&z={z}&scale=1&lang=ru_RU',
|
||||
'ysat': 'https://sat02.maps.yandex.net/tiles?l=sat&v=3.330.0&x={x}&y={y}&z={z}&lang=ru_RU'
|
||||
const TILEMAPS = {
|
||||
WATERCOLOR: {
|
||||
name: 'Watercolor',
|
||||
url: 'http://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg',
|
||||
range: [1, 4],
|
||||
},
|
||||
DGIS: {
|
||||
name: '2gis',
|
||||
url: 'https://tile1.maps.2gis.com/tiles?x={x}&y={y}&z={z}&v=1',
|
||||
range: [1, 3],
|
||||
},
|
||||
DEFAULT: {
|
||||
name: 'OpenStreetMap',
|
||||
url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
range: [1, 4],
|
||||
},
|
||||
DARQ: {
|
||||
name: 'Darq',
|
||||
url: 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
|
||||
range: [1, 4],
|
||||
},
|
||||
BLANK: {
|
||||
name: 'Blanque',
|
||||
url: 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
|
||||
range: [1, 4],
|
||||
},
|
||||
HOT: {
|
||||
name: 'Hot',
|
||||
url: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||
range: [1, 4],
|
||||
},
|
||||
SAY: {
|
||||
name: 'Google?',
|
||||
url: 'http://mt{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}',
|
||||
range: [0, 3],
|
||||
},
|
||||
YMAP: {
|
||||
name: 'Yandex',
|
||||
url: 'https://vec0{s}.maps.yandex.net/tiles?l=map&v=17.04.16-0&x={x}&y={y}&z={z}&scale=1&lang=ru_RU',
|
||||
range: [1, 4],
|
||||
},
|
||||
YSAT: {
|
||||
name: 'YandexSat',
|
||||
url: 'https://sat0{s}.maps.yandex.net/tiles?l=sat&v=3.330.0&x={x}&y={y}&z={z}&lang=ru_RU',
|
||||
range: [1, 4],
|
||||
},
|
||||
};
|
||||
|
||||
const ENABLED = ['BLANK', 'DEFAULT', 'DGIS'];
|
||||
|
||||
export const DEFAULT_PROVIDER = ENABLED[0];
|
||||
export const PROVIDERS = ENABLED.reduce((obj, provider) => ({
|
||||
...obj,
|
||||
[provider]: TILEMAPS[provider],
|
||||
}), {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue