if (!window.location.hash) {
var bounds = map._objectLayer.getBounds();
if (bounds.isValid()) {
- OSM.route.moveListenerOff();
- map.once('moveend', OSM.route.moveListenerOn);
+ OSM.router.moveListenerOff();
+ map.once('moveend', OSM.router.moveListenerOn);
map.fitBounds(bounds);
}
}
zoom: this.getZoom(),
layers: this.getLayersCode()
}
+ },
+
+ setState: function(state, options) {
+ if (state.center) this.setView(state.center, state.zoom, options);
+ this.updateLayers(state.layers);
}
});