add Map#layerPointToContainerPoint

This commit is contained in:
Mourner 2011-01-11 15:44:09 +02:00
parent 14bfaa867b
commit ad5b885124

View File

@ -214,6 +214,10 @@ L.Map = L.Class.extend({
return point.subtract(L.DomUtil.getPosition(this._mapPane));
},
layerPointToContainerPoint: function(point) {
return point.add(L.DomUtil.getPosition(this._mapPane));
},
layerPointToLatLng: function(point) {
return this.unproject(point.add(this._initialTopLeftPoint));
},