mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
avoid warnings when geometry of object cannot be determined
This commit is contained in:
@@ -74,10 +74,12 @@ body {
|
|||||||
var proj_map = map.getProjectionObject();
|
var proj_map = map.getProjectionObject();
|
||||||
var latlon;
|
var latlon;
|
||||||
<?php
|
<?php
|
||||||
|
if (isset($aPolyPoints)) {
|
||||||
foreach($aPolyPoints as $aPolyPoint)
|
foreach($aPolyPoints as $aPolyPoint)
|
||||||
{
|
{
|
||||||
echo " pointList.push(new OpenLayers.Geometry.Point(".$aPolyPoint[1].",".$aPolyPoint[2]."));\n";
|
echo " pointList.push(new OpenLayers.Geometry.Point(".$aPolyPoint[1].",".$aPolyPoint[2]."));\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
var linearRing = new OpenLayers.Geometry.LinearRing(pointList).transform(proj_EPSG4326, proj_map);;
|
var linearRing = new OpenLayers.Geometry.LinearRing(pointList).transform(proj_EPSG4326, proj_map);;
|
||||||
var polygonFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing]),null,style);
|
var polygonFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing]),null,style);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
echo ','.$aResult['aBoundingBox'][3];
|
echo ','.$aResult['aBoundingBox'][3];
|
||||||
echo '"';
|
echo '"';
|
||||||
|
|
||||||
if ($bShowPolygons)
|
if ($bShowPolygons && isset($aResult['aPolyPoints']))
|
||||||
{
|
{
|
||||||
echo ' polygonpoints=\'';
|
echo ' polygonpoints=\'';
|
||||||
echo javascript_renderData($aResult['aPolyPoints']);
|
echo javascript_renderData($aResult['aPolyPoints']);
|
||||||
|
|||||||
@@ -1161,7 +1161,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Output data suitable for display (points and a bounding box)
|
// Output data suitable for display (points and a bounding box)
|
||||||
if ($bShowPolygons)
|
if ($bShowPolygons && isset($aPolyPoints))
|
||||||
{
|
{
|
||||||
$aResult['aPolyPoints'] = array();
|
$aResult['aPolyPoints'] = array();
|
||||||
foreach($aPolyPoints as $aPoint)
|
foreach($aPolyPoints as $aPoint)
|
||||||
|
|||||||
Reference in New Issue
Block a user