This commit is contained in:
Dominik Moritz
2012-09-01 22:08:07 +01:00
parent 8049f73f09
commit 419f2e395c

View File

@@ -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);