Hack because of leaflet issue (https://github.com/CloudMade/Leaflet/issues/966)
This commit is contained in:
@@ -329,7 +329,7 @@ my.Map = Backbone.View.extend({
|
|||||||
//
|
//
|
||||||
_zoomToFeatures: function(){
|
_zoomToFeatures: function(){
|
||||||
var bounds = this.features.getBounds();
|
var bounds = this.features.getBounds();
|
||||||
if (bounds){
|
if (bounds.getNorthEast()){
|
||||||
this.map.fitBounds(bounds);
|
this.map.fitBounds(bounds);
|
||||||
} else {
|
} else {
|
||||||
this.map.setView(new L.LatLng(0, 0), 2);
|
this.map.setView(new L.LatLng(0, 0), 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user