From: marc tobias Date: Fri, 19 Jun 2020 04:36:37 +0000 (+0200) Subject: control requesting polygons from API without hidden HTML field X-Git-Url: https://git.openstreetmap.org/nominatim-ui.git/commitdiff_plain/93117a14df2d0aee9109d51edd7d6dad834d8ec4?ds=sidebyside control requesting polygons from API without hidden HTML field --- diff --git a/dist/assets/js/nominatim-ui.js b/dist/assets/js/nominatim-ui.js index c597643..05019aa 100644 --- a/dist/assets/js/nominatim-ui.js +++ b/dist/assets/js/nominatim-ui.js @@ -653,7 +653,7 @@ jQuery(document).ready(function () { state: search_params.get('state'), country: search_params.get('country'), postalcode: search_params.get('postalcode'), - polygon_geojson: search_params.get('polygon_geojson') ? 1 : 0, + polygon_geojson: get_config_value('Search_AreaPolygons', false) ? 1 : 0, viewbox: search_params.get('viewbox'), exclude_place_ids: search_params.get('exclude_place_ids'), format: 'jsonv2' diff --git a/dist/config.example.js b/dist/config.example.js index bfddf7f..30da769 100644 --- a/dist/config.example.js +++ b/dist/config.example.js @@ -12,7 +12,7 @@ Nominatim_Config['Nominatim_API_Endpoint'] = 'https://nominatim.openstreetmap.or // Nominatim_Config['Images_Base_Url'] = '/mapicons/'; // If the API should return polygons to be displayed on the map -// Nominatim_Config['Search_AreaPolygons'] = 1; +// Nominatim_Config['Search_AreaPolygons'] = true; // Nominatim_Config['Reverse_Default_Search_Zoom'] = 18; // ---- MAP ---- diff --git a/dist/search.html b/dist/search.html index b3e2b03..afb6c33 100644 --- a/dist/search.html +++ b/dist/search.html @@ -178,9 +178,6 @@
- {{#if env.Search_AreaPolygons}} - - {{/if}}
- {{#if env.Search_AreaPolygons}} - - {{/if}}
- {{#if env.Search_AreaPolygons}} - - {{/if}}