]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/assets/js/detailpage.js
/reverse.html should be reverse.html to app works in subdirectory
[nominatim-ui.git] / src / assets / js / detailpage.js
index 919e19a4dcaa074a572d78c83548edb8308f0497..3a951877a6dee35787795532a400262f6146fad6 100644 (file)
@@ -54,8 +54,7 @@ function init_map_on_detail_page(lat, lon, geojson) {
 }
 
 
-jQuery(document).ready(function () {
-  if (!$('#details-page').length) { return; }
+function details_page_load() {
 
   var search_params = new URLSearchParams(window.location.search);
   // var place_id = search_params.get('place_id');
@@ -64,6 +63,7 @@ jQuery(document).ready(function () {
     place_id: search_params.get('place_id'),
     osmtype: search_params.get('osmtype'),
     osmid: search_params.get('osmid'),
+    class: search_params.get('class'),
     keywords: search_params.get('keywords'),
     addressdetails: 1,
     hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),
@@ -111,4 +111,4 @@ jQuery(document).ready(function () {
       alert('invalid input');
     }
   });
-});
+}