diff --git a/browser/src/layer/tile/CanvasTileLayer.js b/browser/src/layer/tile/CanvasTileLayer.js index 7edfdfc1d..b6164dc4f 100644 --- a/browser/src/layer/tile/CanvasTileLayer.js +++ b/browser/src/layer/tile/CanvasTileLayer.js @@ -3895,7 +3895,7 @@ L.CanvasTileLayer = L.Layer.extend({ // Scrolls the view to selected position scrollToPos: function(pos) { - if (pos.pX) // Turn into lat/lng if required. + if (pos.pX) // Turn into lat/lng if required (pos may also be a simplePoint.). pos = this._twipsToLatLng({ x: pos.x, y: pos.y }); var center = this._map.project(pos); @@ -4682,7 +4682,6 @@ L.CanvasTileLayer = L.Layer.extend({ this._updateCursorAndOverlay(); }, - // TODO: unused variables: horizontalDirection, verticalDirection // TODO: used only in calc: move to CalcTileLayer _onUpdateCellCursor: function (onPgUpDn, scrollToCursor, sameAddress) { this._onUpdateCellResizeMarkers(); @@ -6492,26 +6491,6 @@ L.CanvasTileLayer = L.Layer.extend({ return L.TileCoordData.parseKey(key); }, - _keyToBounds: function (key) { - return this._tileCoordsToBounds(this._keyToTileCoords(key)); - }, - - _tileCoordsToBounds: function (coords) { - - var map = this._map; - var tileSize = this._getTileSize(); - - var nwPoint = new L.Point(coords.x, coords.y); - var sePoint = nwPoint.add([tileSize, tileSize]); - nwPoint = this._corePixelsToCss(nwPoint); - sePoint = this._corePixelsToCss(sePoint); - - var nw = map.unproject(nwPoint, coords.z); - var se = map.unproject(sePoint, coords.z); - - return new L.LatLngBounds(nw, se); - }, - // Fix for cool#5876 allow immediate reuse of canvas context memory // WKWebView has a hard limit on the number of bytes of canvas // context memory that can be allocated. Reducing the canvas