From 7239687e5b7fab3c48a567cfee811fc8e9d1f2e8 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 6 Feb 2012 23:14:21 +0000 Subject: [PATCH] avoid warnings when geometry of object cannot be determined --- lib/template/details-html.php | 2 ++ lib/template/search-xml.php | 2 +- website/search.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/template/details-html.php b/lib/template/details-html.php index eca76c7e..9124d594 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -74,10 +74,12 @@ body { var proj_map = map.getProjectionObject(); var latlon; 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); diff --git a/lib/template/search-xml.php b/lib/template/search-xml.php index b15c9a2e..6e48be4c 100644 --- a/lib/template/search-xml.php +++ b/lib/template/search-xml.php @@ -42,7 +42,7 @@ echo ','.$aResult['aBoundingBox'][3]; echo '"'; - if ($bShowPolygons) + if ($bShowPolygons && isset($aResult['aPolyPoints'])) { echo ' polygonpoints=\''; echo javascript_renderData($aResult['aPolyPoints']); diff --git a/website/search.php b/website/search.php index 4a75c768..7169c829 100755 --- a/website/search.php +++ b/website/search.php @@ -1161,7 +1161,7 @@ } // Output data suitable for display (points and a bounding box) - if ($bShowPolygons) + if ($bShowPolygons && isset($aPolyPoints)) { $aResult['aPolyPoints'] = array(); foreach($aPolyPoints as $aPoint) -- 2.39.5