</style>
<script src="js/OpenLayers.js"></script>
<script src="js/tiles.js"></script>
- <script src="prototype-1.6.0.3.js"></script>
<script type="text/javascript">
var map;
var proj_map = map.getProjectionObject();
var latlon;
<?php
-foreach($aPolyPoints as $aPolyPoint)
+if (isset($aPolyPoints))
{
- echo " pointList.push(new OpenLayers.Geometry.Point(".$aPolyPoint[1].",".$aPolyPoint[2]."));\n";
+ foreach($aPolyPoints as $aPolyPoint)
+ {
+ echo " pointList.push(new OpenLayers.Geometry.Point(".$aPolyPoint[1].",".$aPolyPoint[2]."));\n";
+ }
}
?>
var linearRing = new OpenLayers.Geometry.LinearRing(pointList).transform(proj_EPSG4326, proj_map);;
if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' <a href="http://www.openstreetmap.org/browse/'.$sOSMType.'/'.$aAddressLine['osm_id'].'">'.$aAddressLine['osm_id'].'</a></span>';
echo ', <span class="adminlevel">'.$aAddressLine['admin_level'].'</span>';
echo ', <span class="rankaddress">'.$aAddressLine['rank_search_label'].'</span>';
- echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
+// echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
echo ', <span class="distance">'.$aAddressLine['distance'].'</span>';
echo ' <a href="details.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
echo ')';
}
echo '</div>';
+ if ($aLinkedLines)
+ {
+ echo '<h2>Linked Places</h2>';
+ echo '<div class=\"linked\">';
+ foreach($aLinkedLines as $aAddressLine)
+ {
+ $sOSMType = ($aAddressLine['osm_type'] == 'N'?'node':($aAddressLine['osm_type'] == 'W'?'way':($aAddressLine['osm_type'] == 'R'?'relation':'')));
+
+ echo '<div class="line">';
+ echo '<span class="name">'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'<span class="noname">No Name</span>').'</span>';
+ echo ' (';
+ echo '<span class="type"><span class="label">Type: </span>'.$aAddressLine['class'].':'.$aAddressLine['type'].'</span>';
+ if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' <a href="http://www.openstreetmap.org/browse/'.$sOSMType.'/'.$aAddressLine['osm_id'].'">'.$aAddressLine['osm_id'].'</a></span>';
+ echo ', <span class="adminlevel">'.$aAddressLine['admin_level'].'</span>';
+ echo ', <span class="rankaddress">'.$aAddressLine['rank_search_label'].'</span>';
+// echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
+ echo ', <span class="distance">'.$aAddressLine['distance'].'</span>';
+ echo ' <a href="details.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
+ echo ')';
+ echo '</div>';
+ }
+ echo '</div>';
+ }
+
if ($aPlaceSearchNameKeywords)
{
echo '<h2>Name Keywords</h2>';