*/
function getIconFile($aPlace)
{
+ if (CONST_MapIcon_URL === false) {
+ return null;
+ }
+
$sIcon = getIcon($aPlace);
if (!isset($sIcon)) {
return null;
}
- return CONST_Website_BaseURL.'images/mapicons/'.$sIcon.'.p.20.png';
+ return CONST_MapIcon_URL.'/'.$sIcon.'.p.20.png';
}
/**
@define('CONST_BasePath', '".CONST_BasePath."');
if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS'));
-@define('CONST_Database_DSN', '".CONST_Database_DSN."'); // or add ;host=...;port=...;user=...;password=...
+@define('CONST_Database_DSN', '".CONST_Database_DSN."');
@define('CONST_Default_Language', ".(CONST_Default_Language ? ("'".CONST_Default_Language."'") : 'false').");
-@define('CONST_Default_Lat', ".CONST_Default_Lat.");
-@define('CONST_Default_Lon', ".CONST_Default_Lon.");
-@define('CONST_Default_Zoom', ".CONST_Default_Zoom.");
-@define('CONST_Map_Tile_URL', '".CONST_Map_Tile_URL."');
-@define('CONST_Map_Tile_Attribution', '".CONST_Map_Tile_Attribution."'); // Set if tile source isn't osm.org
@define('CONST_Log_DB', ".(CONST_Log_DB ? 'true' : 'false').");
@define('CONST_Log_File', ".(CONST_Log_File ? ("'".CONST_Log_File."'") : 'false').");
@define('CONST_Max_Word_Frequency', '".CONST_Max_Word_Frequency."');
@define('CONST_Term_Normalization_Rules', \"".CONST_Term_Normalization_Rules."\");
@define('CONST_Use_Aux_Location_data', ".(CONST_Use_Aux_Location_data ? 'true' : 'false').");
@define('CONST_Use_US_Tiger_Data', ".(CONST_Use_US_Tiger_Data ? 'true' : 'false').");
-@define('CONST_Website_BaseURL', '".CONST_Website_BaseURL."');
+@define('CONST_MapIcon_URL', ".(CONST_MapIcon_URL ? ("'".CONST_MapIcon_URL."'") : 'false').");
");
info(CONST_InstallPath.'/settings/settings-frontend.php has been set up successfully');
}
// How long to sleep when no update could be found
@define('CONST_Replication_Recheck_Interval', '60');
-// Website settings
+// If true, send CORS headers to allow access
@define('CONST_NoAccessControl', true);
-@define('CONST_Website_BaseURL', '/');
+// Set this to the /mapicon directory of your nominatim-ui to enable returning
+// icon URLs with the results.
+@define('CONST_MapIcon_URL', false);
// Language to assume when none is supplied with the query.
// When set to false, the local language (i.e. the name tag without suffix)
// will be used.
@define('CONST_Default_Language', false);
-// Appearance of the map in the debug interface.
-@define('CONST_Default_Lat', 20.0);
-@define('CONST_Default_Lon', 0.0);
-@define('CONST_Default_Zoom', 2);
-@define('CONST_Map_Tile_URL', 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
-@define('CONST_Map_Tile_Attribution', ''); // Set if tile source isn't osm.org
@define('CONST_Search_AreaPolygons', true);
@define('CONST_Search_NameOnlySearchFrequencyThreshold', 500);
// If set to true, then reverse order of queries will be tried by default.
-// When set to false only selected languages alloow reverse search.
+// When set to false only selected languages allow reverse search.
@define('CONST_Search_ReversePlanForAll', true);
// Maximum number of OSM ids that may be queried at once
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$aMoreParams['accept-language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
}
-$sMoreURL = CONST_Website_BaseURL.'search.php?'.http_build_query($aMoreParams);
+
+if (isset($_SERVER['REQUEST_SCHEME'])
+ && isset($_SERVER['SERVER_NAME'])
+ && isset($_SERVER['DOCUMENT_URI'])
+) {
+ $sMoreURL = $_SERVER['REQUEST_SCHEME'].'://'
+ .$_SERVER['SERVER_NAME'].$_SERVER['DOCUMENT_URI'].'/?'
+ .http_build_query($aMoreParams);
+} else {
+ $sMoreURL = '/search.php'.http_build_query($aMoreParams);
+}
if (CONST_Debug) exit;