params.mlon = latLng.lng.toFixed(precision);
}
- if (this._object) {
- params[this._object.type] = this._object.id;
- }
-
var url = 'http://' + OSM.SERVER_URL + '/',
query = querystring.stringify(params),
hash = OSM.formatHash(this);
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);
}
});