diff --git a/apps-ads.txt b/application/apps-ads.txt similarity index 100% rename from apps-ads.txt rename to application/apps-ads.txt diff --git a/application/assets/js/maps.js b/application/assets/js/maps.js index 0acd65ad..2b43c34e 100644 --- a/application/assets/js/maps.js +++ b/application/assets/js/maps.js @@ -219,7 +219,6 @@ const maps = (() => { let overlayer = ""; let addMap = function (url, attribution, max_zoom, type, marker) { - console.log(general.active_layer); if (attribution == null) attribution = ""; if (max_zoom == null) max_zoom = 17; //remove layer diff --git a/application/assets/js/module.js b/application/assets/js/module.js index 0878716d..9a1776c8 100644 --- a/application/assets/js/module.js +++ b/application/assets/js/module.js @@ -423,6 +423,14 @@ const module = (() => { helper.bottom_bar("cancel", "option", ""); //show selected marker + //show/hide popop editor input field + if (markers_collection[index].tag == undefined) { + document.querySelector("#popup-editor").style.display = "block"; + } else { + document.querySelector("#popup-editor").style.display = "none"; + } + + //get latlng map.setView(markers_collection[index].getLatLng()); let marker_latlng = markers_collection[index].getLatLng(); diff --git a/application/assets/js/overpass.js b/application/assets/js/overpass.js index 07a0830f..4c4e9c41 100644 --- a/application/assets/js/overpass.js +++ b/application/assets/js/overpass.js @@ -51,16 +51,25 @@ const overpass = (() => { return false; } - //boundingbox - let e = map.getBounds().getEast(); - let w = map.getBounds().getWest(); - let n = map.getBounds().getNorth(); - let s = map.getBounds().getSouth(); + let currentBounds = map.getBounds(); + // Apply 20% padding to the bounds + let paddedBounds = currentBounds.pad(0.2); + + // Extract the padded bounds + let e = paddedBounds.getEast(); + let w = paddedBounds.getWest(); + let n = paddedBounds.getNorth(); + let s = paddedBounds.getSouth(); + + // Create the bounding box string var bounds = s + "," + w + "," + n + "," + e; + + // Construct the queries using the padded bounds var nodeQuery = "(node" + node_query + "(" + bounds + ");"; var wayQuery = "way" + way_query + "(" + bounds + ");"; var relationQuery = "relation" + relation_query + "(" + bounds + ");)"; + var query = "?data=[out:json][timeout:25];" + nodeQuery + diff --git a/application/index.html b/application/index.html index 44e2f678..8f149aed 100644 --- a/application/index.html +++ b/application/index.html @@ -6,7 +6,7 @@