X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/859347523fb2c7340b2df9980e52d5ea4543c82d..3a2ddbe2e0f3320b9f21ae6f299d10477553d13d:/lib/ClassTypes.php diff --git a/lib/ClassTypes.php b/lib/ClassTypes.php index 971f5b93..5a69d1de 100644 --- a/lib/ClassTypes.php +++ b/lib/ClassTypes.php @@ -236,6 +236,20 @@ function getIcon($aPlace) return $aIcons[$sClassPlace] ?? null; } +/** + * Get an icon for the given object with its full URL. + */ +function getIconFile($aPlace) +{ + $sIcon = getIcon($aPlace); + + if (!isset($sIcon)) { + return null; + } + + return CONST_Website_BaseURL.'images/mapicons/'.$sIcon.'.p.20.png'; +} + /** * Return a class importance value for the given place. *