[mapguide-commits] r7494 - sandbox/jng/createruntimemap/Web/src/HttpHandler

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 15 04:17:28 PDT 2013


Author: jng
Date: 2013-05-15 04:17:27 -0700 (Wed, 15 May 2013)
New Revision: 7494

Modified:
   sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp
   sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.h
   sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.cpp
   sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.h
Log:
Support a new TARGETMAPNAME request parameter for CREATERUNTIMEMAP. This allows for a specific map name to be used instead of being inferred from the resource id. This is needed for Fusion, which can create more than one runtime map off of the same Map Definition.

Modified: sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp
===================================================================
--- sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp	2013-05-14 14:31:00 UTC (rev 7493)
+++ sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.cpp	2013-05-15 11:17:27 UTC (rev 7494)
@@ -56,6 +56,11 @@
     {
         m_iconLimitPerScaleRange = MgUtil::StringToInt32(sIconsPerScaleRange);
     }
+    STRING sTargetMapName = params->GetParameterValue(MgHttpResourceStrings::reqMappingTargetMapName);
+    if (!sTargetMapName.empty())
+    {
+        m_targetMapName = sTargetMapName;
+    }
 }
 
 /// <summary>
@@ -79,6 +84,10 @@
     Ptr<MgResourceIdentifier> mdfId = new MgResourceIdentifier(m_mapDefinition);
     STRING mapName = mdfId->GetName();
 
+    // Do we have a target map name? Use that instead
+    if (!m_targetMapName.empty())
+        mapName = m_targetMapName;
+
     byteReader = BuildRuntimeMapXml(mdfId, mapName);
     // Convert to requested response format, if necessary
     ProcessFormatConversion(byteReader);

Modified: sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.h
===================================================================
--- sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.h	2013-05-14 14:31:00 UTC (rev 7493)
+++ sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpCreateRuntimeMap.h	2013-05-15 11:17:27 UTC (rev 7494)
@@ -65,6 +65,7 @@
     void CreateGroupItem(MgMappingService* mappingService, MgLayerGroup* group, MgLayerGroup* parent, std::string& xml);
     void CreateLayerItem(MgMappingService* mappingService, MgLayerBase* layer, MgLayerGroup* parent, MdfModel::LayerDefinition* ldf, std::string& xml);
 
+    STRING m_targetMapName;
     STRING m_mapDefinition;
     INT32 m_requestDataMask;
     INT32 m_iconLimitPerScaleRange;

Modified: sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.cpp
===================================================================
--- sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.cpp	2013-05-14 14:31:00 UTC (rev 7493)
+++ sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.cpp	2013-05-15 11:17:27 UTC (rev 7494)
@@ -219,6 +219,7 @@
 const STRING MgHttpResourceStrings::reqMappingThemeCategory = L"THEMECATEGORY";
 const STRING MgHttpResourceStrings::reqMappingRequestedFeatures = L"REQUESTEDFEATURES";
 const STRING MgHttpResourceStrings::reqMappingIconsPerScaleRange = L"ICONSPERSCALERANGE";
+const STRING MgHttpResourceStrings::reqMappingTargetMapName = L"TARGETMAPNAME";
 
 // Predefined Rendering Service Request Parameters
 const STRING MgHttpResourceStrings::reqRenderingMapDefinition = L"MAPDEFINITION";

Modified: sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.h
===================================================================
--- sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.h	2013-05-14 14:31:00 UTC (rev 7493)
+++ sandbox/jng/createruntimemap/Web/src/HttpHandler/HttpResourceStrings.h	2013-05-15 11:17:27 UTC (rev 7494)
@@ -155,6 +155,7 @@
     static const STRING reqMappingThemeCategory;
     static const STRING reqMappingRequestedFeatures;
     static const STRING reqMappingIconsPerScaleRange;
+    static const STRING reqMappingTargetMapName;
 
     // PREDEFINED RENDERING REQUEST PARAMETERS
     static const STRING reqRenderingMapDefinition;



More information about the mapguide-commits mailing list