var data = $('.details').data();
if (!noteState) map.addLayer(noteLayer);
- if (window.location.hash == "") {
+ if (!window.location.hash) {
var coords = data.coordinates.split(',');
OSM.route.moveListenerOff();
map.once('moveend', OSM.route.moveListenerOn);
map._objectLayer.addData(xml);
map._objectLayer.addTo(map);
- var bounds = map._objectLayer.getBounds();
- if (bounds.isValid()) {
- OSM.route.moveListenerOff();
- map.once('moveend', OSM.route.moveListenerOn);
-
- map.fitBounds(bounds);
+ if (!window.location.hash) {
+ var bounds = map._objectLayer.getBounds();
+ if (bounds.isValid()) {
+ OSM.route.moveListenerOff();
+ map.once('moveend', OSM.route.moveListenerOn);
+ map.fitBounds(bounds);
+ }
}
}
});