[Pkg-javascript-commits] [leaflet] 104/301: Use CRS's bounds to calculate wrap
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 3bcc1c9a3aff81b41aede559733715f6b432bf36
Author: perliedman <per.liedman at kartena.se>
Date: Mon Sep 23 09:59:10 2013 +0200
Use CRS's bounds to calculate wrap
---
src/layer/tile/TileLayer.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js
index 407a954..5572733 100644
--- a/src/layer/tile/TileLayer.js
+++ b/src/layer/tile/TileLayer.js
@@ -472,9 +472,10 @@ L.TileLayer = L.Class.extend({
}, this.options));
},
- _getWrapTileNum: function () {
- // TODO refactor, limit is not valid for non-standard projections
- return Math.pow(2, this._getZoomForUrl());
+ _getWrapTileNum: function () {
+ var crs = this._map.options.crs,
+ bounds = crs.getBounds(this._getZoomForUrl());
+ return bounds[3] / this.options.tileSize;
},
_adjustTilePoint: function (tilePoint) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list