]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/assets/js/detailpage.js
Allow map to wrap-around, still longitude should be -180..+180
[nominatim-ui.git] / src / assets / js / detailpage.js
index 9ab6cc820f22c3523829d08801244e47d78ab153..49ec9812fe9facfe337820687eb727b5b95a4864 100644 (file)
@@ -15,7 +15,7 @@ function init_map_on_detail_page(lat, lon, geojson) {
 
     L.tileLayer(get_config_value('Map_Tile_URL'), {
         // moved to footer
-        attribution: (get_config_value('Map_Tile_Attribution') || null ) //'&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
+        attribution: (get_config_value('Map_Tile_Attribution') || null ) //'&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
     }).addTo(map);
 
     var layerGroup = new L.layerGroup().addTo(map);
@@ -25,7 +25,7 @@ function init_map_on_detail_page(lat, lon, geojson) {
 
     if (geojson) {
         var geojson_layer = L.geoJson(
-            // http://leafletjs.com/reference-1.0.3.html#path-option
+            // https://leafletjs.com/reference-1.0.3.html#path-option
             parse_and_normalize_geojson_string(geojson),
             {
                 style: function(feature) {
@@ -56,10 +56,11 @@ jQuery(document).ready(function(){
         place_id: search_params.get('place_id'),
         osmtype: search_params.get('osmtype'),
         osmid: search_params.get('osmid'),
+        keywords: search_params.get('keywords'),
         addressdetails: 1,
-        linkedplaces: 1,
-        childplaces: 1,
-        group_parents: 1,
+        hierarchy: 1,
+        group_hierarchy: 1,
+        polygon_geojson: 1,
         format: 'json'
     };
 
@@ -71,6 +72,8 @@ jQuery(document).ready(function(){
 
         update_data_date();
 
-        init_map_on_detail_page(aFeature.lat, aFeature.lon, aFeature.geojson);
+        var lat = aFeature.centroid.coordinates[1];
+        var lon = aFeature.centroid.coordinates[0];
+        init_map_on_detail_page(lat, lon, aFeature.geometry);
     });
 });
\ No newline at end of file