[prev in list] [next in list] [prev in thread] [next in thread]
List: mapguide-commits
Subject: [mapguide-commits] r6158 - trunk/MgDev/Web/src/mapadmin
From: svn_mapguide () osgeo ! org
Date: 2011-09-30 6:51:15
Message-ID: 20110930065115.C6C52390313 () trac ! osgeo ! org
[Download RAW message or body]
Author: liuar
Date: 2011-09-29 23:51:15 -0700 (Thu, 29 Sep 2011)
New Revision: 6158
Modified:
trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php
Log:
On behalf of Ted Yang.
fix the ticket 1768: http://trac.osgeo.org/mapguide/ticket/1768
This submission includes:
1. remove the base layers
Modified: trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php
===================================================================
--- trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php 2011-09-30 06:09:48 \
UTC (rev 6157)
+++ trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php 2011-09-30 06:51:15 \
UTC (rev 6158) @@ -23,6 +23,28 @@
$clientWidth = $_REQUEST["imageWidth"];
$clientHeigth = $_REQUEST["imageHeight"];
+ function RemoveBaseLayers(& $map)
+ {
+ $layerCollection = $map->GetLayers();
+ $n = 0;
+ $bLayers;
+ for ($i = 0; $i < $layerCollection->GetCount(); $i++)
+ {
+ $layer = $layerCollection->GetItem($i);
+ $layerType = $layer->GetLayerType();
+
+ if (MgLayerType::BaseMap == $layerType)
+ {
+ $bLayers[$n++] = $layer;
+ }
+ }
+
+ for($j = 0; $j < count($bLayers); $j++)
+ {
+ $layerCollection->Remove($bLayers[$j]);
+ }
+ }
+
function CheckMapExist()
{
global $mapResourceId;
@@ -185,6 +207,8 @@
$map = new MgMap();
$map->Create($resourceService, $resourceID, $newXmlFileId);
+ //The result will not show base layers
+ RemoveBaseLayers($map);
//get the profiling map result
$byteReader = $profilingService->ProfileRenderMap($map, NULL, \
$coordNewCenter, $scale, $clientWidth, $clientHeigth, $bgc, $imageFormat, false);
_______________________________________________
mapguide-commits mailing list
mapguide-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic