//= require leaflet.contextmenu
//= require index/contextmenu
//= require index/search
-//= require index/browse
+//= require index/layers/data
//= require index/export
-//= require index/notes
+//= require index/layers/notes
//= require index/history
//= require index/note
//= require index/new_note
OSM.initializeContextMenu(map);
if (OSM.STATUS !== "api_offline" && OSM.STATUS !== "database_offline") {
- OSM.initializeNotes(map);
+ OSM.initializeNotesLayer(map);
if (params.layers.indexOf(map.noteLayer.options.code) >= 0) {
map.addLayer(map.noteLayer);
}
- OSM.initializeBrowse(map);
+ OSM.initializeDataLayer(map);
if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
map.addLayer(map.dataLayer);
}
OSM.router.load();
$(document).on("click", "a", function (e) {
- if (e.isDefaultPrevented() || e.isPropagationStopped()) {
+ if (e.isDefaultPrevented() || e.isPropagationStopped() || $(e.target).data("turbo")) {
return;
}
if (OSM.router.route(this.pathname + this.search + this.hash)) {
e.preventDefault();
+ if (this.pathname !== "/directions") {
+ $("header").addClass("closed");
+ }
}
});