This commit is contained in:
Mourner 2011-03-31 12:05:14 +03:00
parent 162aad202e
commit 29b89d18d1

View File

@ -82,6 +82,12 @@ L.Map = L.Class.extend({
return this.setView(bounds.getCenter(), zoom);
},
fitWorld: function() {
var sw = new L.LatLng(-60, -170),
ne = new L.LatLng(85, 179);
return this.fitBounds(new L.LatLngBounds(sw, ne));
},
panTo: function(/*LatLng*/ center) {
return this.setView(center, this._zoom);
},