[mapguide-commits] r7517 - sandbox/jng/createruntimemap/Server/src/Services/Mapping

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri May 24 03:26:57 PDT 2013


Author: jng
Date: 2013-05-24 03:26:57 -0700 (Fri, 24 May 2013)
New Revision: 7517

Modified:
   sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp
Log:
For a CREATERUNTIMEMAP request on a tiled map, we must return any base layer groups regardless of the REQUESTEDFEATURES mask. This is because the group name is required (in conjunction with the Map Definition) in order for a client application to be able to issue GETTILEIMAGE requests.

Modified: sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp	2013-05-24 05:14:00 UTC (rev 7516)
+++ sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp	2013-05-24 10:26:57 UTC (rev 7517)
@@ -2045,6 +2045,19 @@
             CreateLayerItem(requestedFeatures, iconsPerScaleRange, iconFormat, iconWidth, iconHeight, layer, parent, layerDef, xml);
         }
     }
+    else //Base Layer Groups need to be outputted regardless, otherwise a client application doesn't have enough information to build GETTILEIMAGE requests
+    {
+        Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups();
+        for (INT32 i = 0; i < groups->GetCount(); i++)
+        {
+            Ptr<MgLayerGroup> group = groups->GetItem(i);
+            if (group->GetLayerGroupType() != MgLayerGroupType::BaseMap)
+                continue;
+
+            Ptr<MgLayerGroup> parent = group->GetGroup();
+            CreateGroupItem(group, parent, xml);
+        }
+    }
     // ------------------------ Finite Display Scales (if any) ------------------------- //
     INT32 fsCount = map->GetFiniteDisplayScaleCount();
     if (fsCount > 0)



More information about the mapguide-commits mailing list