diff options
author | Ashutosh Bishnoi <41992346+mail2bishnoi@users.noreply.github.com> | 2021-07-22 11:17:22 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 11:17:22 +0530 |
commit | bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844 (patch) | |
tree | d011e72f9609444f71eced195a6394c1d481e80b /web/app/view/map | |
parent | 4a6ed2462ed5ed2960fc8245ac3c5bae967e685b (diff) | |
parent | b0c4891c4b2687e7a08f05e779c84847a0f4f46c (diff) | |
download | trackermap-web-bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844.tar.gz trackermap-web-bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844.tar.bz2 trackermap-web-bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844.zip |
Merge pull request #1 from dkyeremeh/device_list
Thank you. Merged.
Diffstat (limited to 'web/app/view/map')
-rw-r--r-- | web/app/view/map/BaseMap.js | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js index 6891598d..0107acdc 100644 --- a/web/app/view/map/BaseMap.js +++ b/web/app/view/map/BaseMap.js @@ -103,9 +103,29 @@ Ext.define('Traccar.view.map.BaseMap', { }) }), new ol.layer.Tile({ + title: Strings.mapYandexMap, + type: 'base', + visible: type === 'yandexMap', + source: new ol.source.XYZ({ + url: 'https://core-renderer-tiles.maps.yandex.net/tiles?l=map&x={x}&y={y}&z={z}', + projection: 'EPSG:3395', + attributions: '© <a href="https://yandex.com/maps/">Yandex</a>' + }) + }), + new ol.layer.Tile({ + title: Strings.mapYandexSat, + type: 'base', + visible: type === 'yandexSat', + source: new ol.source.XYZ({ + url: 'https://core-sat.maps.yandex.net/tiles?l=sat&x={x}&y={y}&z={z}', + projection: 'EPSG:3395', + attributions: '© <a href="https://yandex.com/maps/">Yandex</a>' + }) + }), + new ol.layer.Tile({ title: Strings.mapOsm, type: 'base', - visible: type === 'osm' || type === 'yandexMap' || type === 'yandexSat' || type === 'wikimedia' || !type, + visible: type === 'osm' || type === 'wikimedia' || !type, source: new ol.source.OSM({}) }) ] @@ -204,4 +224,12 @@ Ext.define('Traccar.view.map.BaseMap', { this.map.updateSize(); } } +}, function () { + var projection; + proj4.defs('EPSG:3395', '+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'); + ol.proj.proj4.register(proj4); + projection = ol.proj.get('EPSG:3395'); + if (projection) { + projection.setExtent([-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244]); + } }); |