[fusion-commits] r1804 - trunk/layers/MapServer/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Mar 4 15:22:05 EST 2009


Author: pdeschamps
Date: 2009-03-04 15:22:05 -0500 (Wed, 04 Mar 2009)
New Revision: 1804

Modified:
   trunk/layers/MapServer/php/Maptip.php
Log:
fixed bug with maptips when you load a map thru the query string. If the layers don't exist it used to error out. now retunring empty json object 


Modified: trunk/layers/MapServer/php/Maptip.php
===================================================================
--- trunk/layers/MapServer/php/Maptip.php	2009-03-04 20:13:16 UTC (rev 1803)
+++ trunk/layers/MapServer/php/Maptip.php	2009-03-04 20:22:05 UTC (rev 1804)
@@ -84,7 +84,11 @@
     foreach($aLayer as $key=>$layer){
         $oLayer = @$oMap->GetLayerByName($layer);
 
-        // make sure the layer exists in the map. 
+        if(!is_object($oLayer)){
+            $szMessage = "{'maptips':'','url':'','label':'','error':' The layer [".$layer."] was not found'}";
+            die($szMessage);
+        }
+        // make sure the layer exists in the map.
         if(is_object($oLayer)){
             $oLayer->set('tolerance', 0);
 



More information about the fusion-commits mailing list