1 module.exports.get_config_value = get_config_value;
4 const Nominatim_Config_Defaults = {
5 Nominatim_API_Endpoint: 'http://localhost/nominatim/',
6 Images_Base_Url: 'mapicons/',
7 Search_AreaPolygons: 1,
8 Reverse_Default_Search_Zoom: 18,
12 Map_Tile_URL: 'https://{s}.tile.osm.org/{z}/{x}/{y}.png',
13 Map_Tile_Attribution: '<a href="https://osm.org/copyright">OpenStreetMap contributors</a>',
14 Page_Title: 'Nominatim Demo'
17 function get_config_value(str, default_val) {
18 var value = ((typeof Nominatim_Config !== 'undefined')
19 && (typeof Nominatim_Config[str] !== 'undefined'))
20 ? Nominatim_Config[str]
21 : Nominatim_Config_Defaults[str];
22 return (typeof value !== 'undefined' ? value : default_val);