<?php
header("content-type: text/xml; charset=UTF-8");
- header("Access-Control-Allow-Origin: *");
echo "<";
echo "?xml version=\"1.0\" encoding=\"UTF-8\" ?";
echo " timestamp='".date(DATE_RFC822)."'";
echo " attribution='Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright'";
echo " querystring='".htmlspecialchars($sQuery, ENT_QUOTES)."'";
- if (isset($sViewBox)) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
+ if ($sViewBox) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
echo " polygon='".($bShowPolygons?'true':'false')."'";
if (sizeof($aExcludePlaceIDs))
{
echo " display_name='".htmlspecialchars($aResult['name'], ENT_QUOTES)."'";
echo " class='".htmlspecialchars($aResult['class'])."'";
- echo " type='".htmlspecialchars($aResult['type'])."'";
+ echo " type='".htmlspecialchars($aResult['type'], ENT_QUOTES)."'";
+ echo " importance='".htmlspecialchars($aResult['importance'])."'";
if (isset($aResult['icon']) && $aResult['icon'])
{
echo " icon='".htmlspecialchars($aResult['icon'], ENT_QUOTES)."'";
if (isset($aResult['askml']))
{
- echo "\n";
+ echo "\n<geokml>";
echo $aResult['askml'];
+ echo "</geokml>";
}
if (isset($aResult['address']))