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>'
16 function get_config_value(str, default_val) {
17 var value = ((typeof Nominatim_Config !== 'undefined')
18 && (typeof Nominatim_Config[str] !== 'undefined'))
19 ? Nominatim_Config[str]
20 : Nominatim_Config_Defaults[str];
21 return (typeof value !== 'undefined' ? value : default_val);