<base href="<?php echo CONST_Website_BaseURL;?>" />
<link href="nominatim.xml" rel="search" title="Nominatim Search" type="application/opensearchdescription+xml" />
- <script src="OpenLayers.js"></script>
- <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
- <script src="prototype-1.6.0.3.js"></script>
+ <script src="js/OpenLayers.js"></script>
+ <script src="js/tiles.js"></script>
+ <script src="js/prototype-1.6.0.3.js"></script>
<style>
* {-moz-box-sizing: border-box;}
map.panTo(lonLat, <?php echo $iZoom ?>);
}
- function panToLatLonZoom(lat,lon, zoom) {
+ function panToLatLonZoom(lat, lon, zoom) {
var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
if (zoom != map.getZoom())
map.setCenter(lonLat, zoom);
var proj_EPSG4326 = new OpenLayers.Projection("EPSG:4326");
var proj_map = map.getProjectionObject();
map.zoomToExtent(new OpenLayers.Bounds(minlon,minlat,maxlon,maxlat).transform(proj_EPSG4326, proj_map));
+ var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
+ map.panTo(lonLat, <?php echo $iZoom ?>);
var pointList = [];
var style = {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
eventListeners: {
- "moveend": mapEventMove,
+ "moveend": mapEventMove
}
} );
- map.addLayer(new OpenLayers.Layer.OSM.Mapnik("Mapnik"));
+ map.addLayer(new OpenLayers.Layer.OSM.<?php echo CONST_Tile_Default;?>("Default"));
var layer_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
layer_style.fillOpacity = 0.2;
<div id="seachheaderfade1"></div><div id="seachheaderfade2"></div><div id="seachheaderfade3"></div><div id="seachheaderfade4"></div>
<div id="seachheader">
- <form action="<?php echo CONST_Website_BaseURL; ?>search.php" method="get">
+ <form accept-charset="UTF-8" action="<?php echo CONST_Website_BaseURL; ?>search.php" method="get">
<table border="0" width="100%">
<tr>
<td valign="center" style="width:30px;"><img src="images/logo.gif"></td>
<a href="http://wiki.openstreetmap.org/wiki/Nominatim" target="_blank">Documentation</a> | <a href="http://wiki.openstreetmap.org/wiki/Nominatim/FAQ"
target="_blank">FAQ</a></td>
-<?php } ?> <td style="text-align:right;"><?php if ($sQuery) { if ($sReportDescription) {?><div style="text-align:center;"><b>Thank you for your problem report</b></div><?php } else { ?><input type="button" value="Report Problem With Results" onclick="$('report').style.visibility=($('report').style.visibility=='hidden'?'visible':'hidden')"><?php }} ?></td>
+<?php } ?> <td style="text-align:right;"><?php if ($sQuery) { ?><input type="button" value="Report Problem With Results" onclick="$('report').style.visibility=($('report').style.visibility=='hidden'?'visible':'hidden')"><?php } ?></td>
</tr>
</table>
</form>
echo ', '.$aResult['aBoundingBox'][1];
echo ', '.$aResult['aBoundingBox'][2];
echo ', '.$aResult['aBoundingBox'][3];
- echo ', '.javascript_renderData($aResult['aPolyPoints']);
+ if (isset($aResult['aPolyPoints'])) echo ', '.json_encode($aResult['aPolyPoints']);
echo ');\'>';
}
elseif (isset($aResult['zoom']))
echo '<div class="result" onClick="panToLatLon('.$aResult['lat'].', '.$aResult['lon'].');">';
}
- echo ($aResult['icon']?'<img src="'.$aResult['icon'].'">':'');
+ echo (isset($aResult['icon'])?'<img src="'.$aResult['icon'].'">':'');
echo ' <span class="name">'.$aResult['name'].'</span>';
- echo ' <span class="latlon">'.round($aResult['lat'],3).','.round($aResult['lat'],3).'</span>';
+ echo ' <span class="latlon">'.round($aResult['lat'],3).','.round($aResult['lon'],3).'</span>';
echo ' <span class="place_id">'.$aResult['place_id'].'</span>';
- echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['type'])).')</span>';
+ if (isset($aResult['label']))
+ echo ' <span class="type">('.$aResult['label'].')</span>';
+ else
+ echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['type'])).')</span>';
echo ' <span class="details">(<a href="details.php?place_id='.$aResult['place_id'].'">details</a>)</span>';
echo '</div>';
}
echo ', '.$aResult['aBoundingBox'][1];
echo ', '.$aResult['aBoundingBox'][2];
echo ', '.$aResult['aBoundingBox'][3];
- echo ', '.javascript_renderData($aResult['aPolyPoints']);
+ if (isset($aResult['aPolyPoints']))
+ {
+ echo ', ';
+ echo javascript_renderData($aResult['aPolyPoints']);
+ }
echo ');'."\n";
}
else