mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
encapsulate icon URL in a function
This commit is contained in:
@@ -57,10 +57,12 @@
|
||||
return $sHTML;
|
||||
}
|
||||
|
||||
function map_icon($sIcon)
|
||||
function map_icon($aPlace)
|
||||
{
|
||||
$sIcon = Nominatim\ClassTypes\getIconFile($aPlace);
|
||||
if (isset($sIcon)) {
|
||||
echo '<img id="mapicon" src="'.CONST_Website_BaseURL.'images/mapicons/'.$sIcon.'.n.32.png'.'" alt="'.$sIcon.'" />';
|
||||
$sLabel = Nominatim\ClassTypes\getIcon($aPlace);
|
||||
echo '<img id="mapicon" src="'.$sIcon.'" alt="'.$sLabel.'" />';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +114,7 @@
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-2 text-right">
|
||||
<?php map_icon($aPointDetails['icon']) ?>
|
||||
<?php map_icon($aPointDetails) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user