X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b263323fe46728f594239819b3153706b449ce61..7ec9e882af170fec837f606720e4a5fdfd64be94:/src/assets/js/detailpage.js
diff --git a/src/assets/js/detailpage.js b/src/assets/js/detailpage.js
index 9ab6cc8..49ec981 100644
--- a/src/assets/js/detailpage.js
+++ b/src/assets/js/detailpage.js
@@ -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 ) //'© OpenStreetMap contributors'
+ attribution: (get_config_value('Map_Tile_Attribution') || null ) //'© OpenStreetMap 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