mirror of
https://github.com/Maks1mS/free-ozon-dpr.git
synced 2024-12-23 18:42:59 +03:00
switch to wikimapia.org maps
This commit is contained in:
parent
ba798c2e19
commit
2e7716be25
9
map.js
9
map.js
@ -4,6 +4,7 @@ import View from 'ol/View';
|
|||||||
import TileLayer from 'ol/layer/Tile';
|
import TileLayer from 'ol/layer/Tile';
|
||||||
import { fromLonLat } from 'ol/proj';
|
import { fromLonLat } from 'ol/proj';
|
||||||
import { XYZ } from 'ol/source';
|
import { XYZ } from 'ol/source';
|
||||||
|
import { createXYZ } from 'ol/tilegrid';
|
||||||
|
|
||||||
const MAP_TARGET = 'map';
|
const MAP_TARGET = 'map';
|
||||||
const MAP_CENTER = fromLonLat([37.57725139554275, 48.02287702854201]);
|
const MAP_CENTER = fromLonLat([37.57725139554275, 48.02287702854201]);
|
||||||
@ -11,7 +12,13 @@ const MAP_ZOOM = 8.5;
|
|||||||
|
|
||||||
const customTileSource = new TileLayer({
|
const customTileSource = new TileLayer({
|
||||||
source: new XYZ({
|
source: new XYZ({
|
||||||
url: 'https://tile-server.ozon.ru/tile/default/{z}/{x}/{y}.png'
|
// url: 'https://tile-server.ozon.ru/tile/default/{z}/{x}/{y}.png'
|
||||||
|
|
||||||
|
tileUrlFunction: ([z, x, y]) => {
|
||||||
|
const s = x % 4 + (y % 4) * 4
|
||||||
|
return `https://i${s}.wikimapia.org/?x=${x}&y=${y}&zoom=${z}&type=map&lng=1`
|
||||||
|
},
|
||||||
|
maxZoom: 18,
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user