From 7e2fb28b558f404442bec67a7551e75fc90ff100 Mon Sep 17 00:00:00 2001 From: tsmgeek Date: Tue, 22 Aug 2017 00:26:01 +0100 Subject: Fix typos --- web/app/view/map/BaseMap.js | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'web/app/view/map/BaseMap.js') diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js index cac5a59..c6eb5b4 100644 --- a/web/app/view/map/BaseMap.js +++ b/web/app/view/map/BaseMap.js @@ -101,13 +101,13 @@ Ext.define('Traccar.view.map.BaseMap', { index = index < 0 ? index + urlsLength : index; if (x < 0) { - x = 'M' + (-x); + x = 'M' + -x; } if (y < 0) { - y = 'M' + (-y); + y = 'M' + -y; } return 'http://online{}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl' - .replace('{}', index).replace('{x}', x).replace('{y}', y).replace('{z}', z); + .replace('{}', index).replace('{x}', x).replace('{y}', y).replace('{z}', z); }, tileGrid: new ol.tilegrid.TileGrid({ extent: ol.proj.transformExtent([-180, -74, 180, 74], 'EPSG:4326', 'BD-MC'), @@ -117,45 +117,11 @@ Ext.define('Traccar.view.map.BaseMap', { 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5 ] -<<<<<<< HEAD }), attributions: [ new ol.Attribution({ html: '© Baidu' }) -======= - }) - ] - }) - }); - } else if (type === 'baidu') { - layer = new ol.layer.Tile({ - source: new ol.source.XYZ({ - projection: 'BD-MC', - tileUrlFunction: function (tileCoord) { - var urlsLength = 5, z = tileCoord[0], x = tileCoord[1], y = tileCoord[2], hash, index; - - hash = (x << z) + y; - index = hash % urlsLength; - index = index < 0 ? index + urlsLength : index; - - if (x < 0) { - x = 'M' + -x; - } - if (y < 0) { - y = 'M' + -y; - } - return 'http://online{}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl' - .replace('{}', index).replace('{x}', x).replace('{y}', y).replace('{z}', z); - }, - tileGrid: new ol.tilegrid.TileGrid({ - extent: ol.proj.transformExtent([-180, -74, 180, 74], 'EPSG:4326', 'BD-MC'), - origin: [0, 0], - minZoom: 3, - resolutions: [ - 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, - 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5 ->>>>>>> e0bb9b92d07176677b3043530660af3bc30774d7 ] }) }); -- cgit v1.2.3