Skip to content

Commit

Permalink
move private method into correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Jun 19, 2012
1 parent 45d9421 commit ff47132
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/map/Map.js
Expand Up @@ -356,17 +356,10 @@ L.Map = L.Class.extend({
return this.unproject(point.add(this._initialTopLeftPoint));
},

latLngToLayerPoint: function (latlng, zoom) { // (LatLng)
latLngToLayerPoint: function (latlng) { // (LatLng)
return this.project(latlng)._round()._subtract(this._initialTopLeftPoint);
},

_latLngToNewLayerPoint: function (latlng, newZoom, newCenter) {
var mapPaneOffset = L.DomUtil.getPosition(this._mapPane),
topLeft = this._getNewTopLeftPoint(newCenter, newZoom).add(mapPaneOffset);

return this.project(latlng, newZoom)._round()._subtract(topLeft);
},

containerPointToLatLng: function (point) {
return this.layerPointToLatLng(this.containerPointToLayerPoint(point));
},
Expand Down Expand Up @@ -596,6 +589,13 @@ L.Map = L.Class.extend({
return this.project(center, zoom)._subtract(viewHalf)._round();
},

_latLngToNewLayerPoint: function (latlng, newZoom, newCenter) {
var mapPaneOffset = L.DomUtil.getPosition(this._mapPane),
topLeft = this._getNewTopLeftPoint(newCenter, newZoom).add(mapPaneOffset);

return this.project(latlng, newZoom)._round()._subtract(topLeft);
},

_limitZoom: function (zoom) {
var min = this.getMinZoom(),
max = this.getMaxZoom();
Expand Down

0 comments on commit ff47132

Please sign in to comment.