]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/assets/js/detailpage.js
detail page: only load and display parent-of section after button click
[nominatim-ui.git] / src / assets / js / detailpage.js
index 9ef2d97d63e0e4752680b80a3ad0f10f5c50c0fd..09a8ce105d12c218aa419073d4517b21243c2b1c 100644 (file)
@@ -57,7 +57,7 @@ jQuery(document).ready(function () {
     osmid: search_params.get('osmid'),
     keywords: search_params.get('keywords'),
     addressdetails: 1,
-    hierarchy: 1,
+    hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),
     group_hierarchy: 1,
     polygon_geojson: 1,
     format: 'json'
@@ -65,7 +65,7 @@ jQuery(document).ready(function () {
 
   if (api_request_params.place_id || (api_request_params.osmtype && api_request_params.osmid)) {
     fetch_from_api('details', api_request_params, function (aFeature) {
-      var context = { aPlace: aFeature };
+      var context = { aPlace: aFeature, base_url: location.search };
 
       render_template($('main'), 'detailspage-template', context);