[fusion-commits] r1571 - trunk/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Sep 29 20:46:10 EDT 2008


Author: pagameba
Date: 2008-09-29 20:46:10 -0400 (Mon, 29 Sep 2008)
New Revision: 1571

Modified:
   trunk/MapGuide/php/LoadMap.php
   trunk/MapGuide/php/LoadScaleRanges.php
Log:
assign null to scaleObj so that a new one is made for every scale range, otherwise every entry is a clone of the last one.

Modified: trunk/MapGuide/php/LoadMap.php
===================================================================
--- trunk/MapGuide/php/LoadMap.php	2008-09-30 00:33:30 UTC (rev 1570)
+++ trunk/MapGuide/php/LoadMap.php	2008-09-30 00:46:10 UTC (rev 1571)
@@ -171,9 +171,7 @@
     
         array_push($mapObj->FiniteDisplayScales, $map->GetFiniteDisplayScaleAt($i));
     }
-
     echo var2json($mapObj);
-
 }
 catch (MgException $e)
 {
@@ -308,6 +306,7 @@
 
                     $labelText = $label->length==1? $label->item(0)->nodeValue: "";
                     $filterText = $filter->length==1? $filter->item(0)->nodeValue: "";
+                    $styleObj = NULL;
                     $styleObj->legendLabel = addslashes(trim($labelText));
                     $styleObj->filter = addslashes(trim($filterText));
                     $styleObj->geometryType = ($ts+1);

Modified: trunk/MapGuide/php/LoadScaleRanges.php
===================================================================
--- trunk/MapGuide/php/LoadScaleRanges.php	2008-09-30 00:33:30 UTC (rev 1570)
+++ trunk/MapGuide/php/LoadScaleRanges.php	2008-09-30 00:46:10 UTC (rev 1571)
@@ -57,8 +57,7 @@
     }
  }
 
-header('Content-type: text/x-json');
-header('X-JSON: true');
+header('Content-type: application/json');
 
 echo var2json($scaleObj);
 exit;



More information about the fusion-commits mailing list