[mapguide-commits] r7705 - in sandbox/jng/getruntimemap: Common/MapGuideCommon/Services Server/src/Services/Mapping Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jul 30 08:05:55 PDT 2013


Author: jng
Date: 2013-07-30 08:05:55 -0700 (Tue, 30 Jul 2013)
New Revision: 7705

Added:
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.cpp
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.h
Modified:
   sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingDefs.h
   sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingService.h
   sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.cpp
   sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.h
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/Makefile.am
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.h
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj.filters
   sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingServiceBuild.cpp
   sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.cpp
   sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.h
Log:
Add DescribeRuntimeMap which is exactly like CreateRuntimeMap, except that operates off of a mapname/sessionid instead of a map definition. This is used to get the XML structure of an existing MgMap and not creating a new one from scratch.

Modified: sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingDefs.h
===================================================================
--- sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingDefs.h	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingDefs.h	2013-07-30 15:05:55 UTC (rev 7705)
@@ -105,6 +105,8 @@
     static const int GenerateLegendImage        = 0x1111EE0D;
     static const int CreateRuntimeMap           = 0x1111EE0E;
     static const int CreateRuntimeMap2          = 0x1111EE0F;
+    static const int DescribeRuntimeMap         = 0x1111EE10;
+    static const int DescribeRuntimeMap2        = 0x1111EE11;
 };
 /// \endcond
 

Modified: sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingService.h
===================================================================
--- sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingService.h	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/MappingService.h	2013-07-30 15:05:55 UTC (rev 7705)
@@ -467,8 +467,91 @@
                                            INT32 iconHeight,
                                            INT32 requestedFeatures,
                                            INT32 iconsPerScaleRange) = 0;
-                                             
 
+    ////////////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns an XML-based description of the runtime map
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \param map (MgMap)
+    /// The map to describe
+    /// \param requestedFeatures (int)
+    /// A bitmask representing the desired information to return in the XML response: 
+    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
+    /// \param iconsPerScaleRange (int)
+    /// The number of legend icons per scale range to render inline in the XML response as base64 strings. 
+    /// If a scale range contains a number of rules that exceeds this value, only the first and
+    /// last rules of a type style in the scale range will have inline icons
+    ///
+    /// \remarks
+    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
+    /// is not specified
+    ///
+    /// \return
+    /// Returns an XML-based description of the runtime map
+    ///
+    virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
+                                             INT32 requestedFeatures,
+                                             INT32 iconsPerScaleRange) = 0;
+
+    ////////////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns an XML-based description of the given runtime map
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, String iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \param map (MgMap)
+    /// The map to describe
+    /// \param iconFormat (String/string)
+    /// The desired image format for icons (from MgImageFormats)
+    /// \param iconWidth (int)
+    /// The width of each individual inline legend icons. Has no effect if icons was not requested in the response.
+    /// \param iconHeight (int)
+    /// The height of each individual inline legend icons. Has no effect if icons was not requested in the response.
+    /// \param requestedFeatures (int)
+    /// A bitmask representing the desired information to return in the XML response: 
+    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
+    /// \param iconsPerScaleRange (int)
+    /// The number of legend icons per scale range to render inline in the XML response as base64 strings. 
+    /// If a scale range contains a number of rules that exceeds this value, only the first and
+    /// last rules of a type style in the scale range will have inline icons
+    ///
+    /// \remarks
+    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
+    /// is not specified
+    ///
+    /// \return
+    /// Returns an XML-based description of the runtime map
+    ///
+    /// \exception MgInvalidArgumentException
+    /// \exception MgNullArgumentException
+    ///
+    virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
+                                             CREFSTRING iconFormat,
+                                             INT32 iconWidth,
+                                             INT32 iconHeight,
+                                             INT32 requestedFeatures,
+                                             INT32 iconsPerScaleRange) = 0;
+
 EXTERNAL_API:
 
     //////////////////////////////////////////////////////////////////////////////////////////////////////////

Modified: sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.cpp
===================================================================
--- sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.cpp	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.cpp	2013-07-30 15:05:55 UTC (rev 7705)
@@ -509,6 +509,129 @@
     return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Returns an XML-based description of the runtime map
+///
+/// <!-- Syntax in .Net, Java, and PHP -->
+/// \htmlinclude DotNetSyntaxTop.html
+/// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+/// \htmlinclude SyntaxBottom.html
+/// \htmlinclude JavaSyntaxTop.html
+/// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+/// \htmlinclude SyntaxBottom.html
+/// \htmlinclude PHPSyntaxTop.html
+/// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+/// \htmlinclude SyntaxBottom.html
+///
+/// \param map (MgMap)
+/// The map to describe
+/// \param requestedFeatures (int)
+/// A bitmask representing the desired information to return in the XML response: 
+/// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
+/// \param iconsPerScaleRange (int)
+/// The number of legend icons per scale range to render inline in the XML response as base64 strings. 
+/// If a scale range contains a number of rules that exceeds this value, only the first and
+/// last rules of a type style in the scale range will have inline icons
+///
+/// \remarks
+/// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
+/// is not specified
+///
+/// \return
+/// Returns an XML-based description of the runtime map
+///
+MgByteReader* MgProxyMappingService::DescribeRuntimeMap(MgMap* map,
+                                                        INT32 requestedFeatures,
+                                                        INT32 iconsPerScaleRange)
+{
+    MgCommand cmd;
+
+    cmd.ExecuteCommand(m_connProp,
+                       MgCommand::knObject,
+                       MgMappingServiceOpId::DescribeRuntimeMap,
+                       3,
+                       Mapping_Service,
+                       BUILD_VERSION(2,6,0),
+                       MgCommand::knObject,    map,
+                       MgCommand::knInt32,     requestedFeatures,
+                       MgCommand::knInt32,     iconsPerScaleRange,
+                       MgCommand::knNone);
+
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Returns an XML-based description of the given runtime map
+///
+/// <!-- Syntax in .Net, Java, and PHP -->
+/// \htmlinclude DotNetSyntaxTop.html
+/// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+/// \htmlinclude SyntaxBottom.html
+/// \htmlinclude JavaSyntaxTop.html
+/// virtual MgByteReader DescribeRuntimeMap(MgMap map, String iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+/// \htmlinclude SyntaxBottom.html
+/// \htmlinclude PHPSyntaxTop.html
+/// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+/// \htmlinclude SyntaxBottom.html
+///
+/// \param map (MgMap)
+/// The map to describe
+/// \param iconFormat (String/string)
+/// The desired image format for icons (from MgImageFormats)
+/// \param iconWidth (int)
+/// The width of each individual inline legend icons. Has no effect if icons was not requested in the response.
+/// \param iconHeight (int)
+/// The height of each individual inline legend icons. Has no effect if icons was not requested in the response.
+/// \param requestedFeatures (int)
+/// A bitmask representing the desired information to return in the XML response: 
+/// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
+/// \param iconsPerScaleRange (int)
+/// The number of legend icons per scale range to render inline in the XML response as base64 strings. 
+/// If a scale range contains a number of rules that exceeds this value, only the first and
+/// last rules of a type style in the scale range will have inline icons
+///
+/// \remarks
+/// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
+/// is not specified
+///
+/// \return
+/// Returns an XML-based description of the runtime map
+///
+/// \exception MgInvalidArgumentException
+/// \exception MgNullArgumentException
+///
+MgByteReader* MgProxyMappingService::DescribeRuntimeMap(MgMap* map,
+                                                        CREFSTRING iconFormat,
+                                                        INT32 iconWidth,
+                                                        INT32 iconHeight,
+                                                        INT32 requestedFeatures,
+                                                        INT32 iconsPerScaleRange)
+{
+    MgCommand cmd;
+
+    cmd.ExecuteCommand(m_connProp,
+                       MgCommand::knObject,
+                       MgMappingServiceOpId::DescribeRuntimeMap2,
+                       6,
+                       Mapping_Service,
+                       BUILD_VERSION(2,6,0),
+                       MgCommand::knObject,    map,
+                       MgCommand::knString,    &iconFormat,
+                       MgCommand::knInt32,     iconWidth,
+                       MgCommand::knInt32,     iconHeight,
+                       MgCommand::knInt32,     requestedFeatures,
+                       MgCommand::knInt32,     iconsPerScaleRange,
+                       MgCommand::knNone);
+
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
+}
+
 //////////////////////////////////////////////////////////////////
 /// \brief
 /// Sets the connection properties for the Proxy Service.  This

Modified: sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.h
===================================================================
--- sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.h	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Common/MapGuideCommon/Services/ProxyMappingService.h	2013-07-30 15:05:55 UTC (rev 7705)
@@ -428,6 +428,90 @@
                                            INT32 requestedFeatures,
                                            INT32 iconsPerScaleRange);
 
+    ////////////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns an XML-based description of the runtime map
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \param map (MgMap)
+    /// The map to describe
+    /// \param requestedFeatures (int)
+    /// A bitmask representing the desired information to return in the XML response: 
+    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
+    /// \param iconsPerScaleRange (int)
+    /// The number of legend icons per scale range to render inline in the XML response as base64 strings. 
+    /// If a scale range contains a number of rules that exceeds this value, only the first and
+    /// last rules of a type style in the scale range will have inline icons
+    ///
+    /// \remarks
+    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
+    /// is not specified
+    ///
+    /// \return
+    /// Returns an XML-based description of the runtime map
+    ///
+    virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
+                                             INT32 requestedFeatures,
+                                             INT32 iconsPerScaleRange);
+
+    ////////////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns an XML-based description of the given runtime map
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, String iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \param map (MgMap)
+    /// The map to describe
+    /// \param iconFormat (String/string)
+    /// The desired image format for icons (from MgImageFormats)
+    /// \param iconWidth (int)
+    /// The width of each individual inline legend icons. Has no effect if icons was not requested in the response.
+    /// \param iconHeight (int)
+    /// The height of each individual inline legend icons. Has no effect if icons was not requested in the response.
+    /// \param requestedFeatures (int)
+    /// A bitmask representing the desired information to return in the XML response: 
+    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
+    /// \param iconsPerScaleRange (int)
+    /// The number of legend icons per scale range to render inline in the XML response as base64 strings. 
+    /// If a scale range contains a number of rules that exceeds this value, only the first and
+    /// last rules of a type style in the scale range will have inline icons
+    ///
+    /// \remarks
+    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
+    /// is not specified
+    ///
+    /// \return
+    /// Returns an XML-based description of the runtime map
+    ///
+    /// \exception MgInvalidArgumentException
+    /// \exception MgNullArgumentException
+    ///
+    virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
+                                             CREFSTRING iconFormat,
+                                             INT32 iconWidth,
+                                             INT32 iconHeight,
+                                             INT32 requestedFeatures,
+                                             INT32 iconsPerScaleRange);
+
 INTERNAL_API:
     //////////////////////////////////////////////////////////////////
     /// \brief

Modified: sandbox/jng/getruntimemap/Server/src/Services/Mapping/Makefile.am
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/Makefile.am	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/Makefile.am	2013-07-30 15:05:55 UTC (rev 7705)
@@ -36,6 +36,7 @@
   MappingServiceHandler.cpp \
   MappingUtil.cpp \
   OpCreateRuntimeMap.cpp \
+  OpDescribeRuntimeMap.cpp \
   OpGenerateLegendImage.cpp \
   OpGenerateLegendPlot.cpp \
   OpGenerateMap.cpp \
@@ -58,6 +59,7 @@
   MappingServiceHandler.h \
   MappingUtil.h \
   OpCreateRuntimeMap.h \
+  OpDescribeRuntimeMap.h \
   OpGenerateLegendImage.h \
   OpGenerateLegendPlot.h \
   OpGenerateMap.h \

Added: sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.cpp
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.cpp	                        (rev 0)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.cpp	2013-07-30 15:05:55 UTC (rev 7705)
@@ -0,0 +1,161 @@
+//
+//  Copyright (C) 2004-2013 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "ServerMappingServiceDefs.h"
+#include "OpDescribeRuntimeMap.h"
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Constructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+MgOpDescribeRuntimeMap::MgOpDescribeRuntimeMap()
+{
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Destructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+MgOpDescribeRuntimeMap::~MgOpDescribeRuntimeMap()
+{
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Executes the operation.
+/// </summary>
+///
+/// <exceptions>
+/// MgException
+/// </exceptions>
+///----------------------------------------------------------------------------
+void MgOpDescribeRuntimeMap::Execute()
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("  (%t) MgOpDescribeRuntimeMap::Execute()\n")));
+
+    MG_LOG_OPERATION_MESSAGE(L"DescribeRuntimeMap");
+
+    MG_TRY()
+
+    MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+    ACE_ASSERT(m_stream != NULL);
+
+    if (6 == m_packet.m_NumArguments)
+    {
+        STRING targetMapName;
+        STRING sessionId;
+        STRING iconFormat;
+        INT32 iconWidth, iconHeight, requestedFeatures, iconsPerScaleRange;
+
+        Ptr<MgMap> map = (MgMap*)m_stream->GetObject();
+        map->SetDelayedLoadResourceService(m_resourceService);
+        Ptr<MgResourceIdentifier> resource = map->GetResourceId();
+
+        m_stream->GetString(targetMapName);
+        m_stream->GetString(sessionId);
+        m_stream->GetString(iconFormat);
+        m_stream->GetInt32(iconWidth);
+        m_stream->GetInt32(iconHeight);
+        m_stream->GetInt32(requestedFeatures);
+        m_stream->GetInt32(iconsPerScaleRange);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(iconFormat);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(iconWidth);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(iconHeight);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(requestedFeatures);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(iconsPerScaleRange);
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgByteReader> byteReader =
+            m_service->DescribeRuntimeMap(map, iconFormat, iconWidth, iconHeight, requestedFeatures, iconsPerScaleRange);
+
+        EndExecution(byteReader);
+    }
+    else if (3 == m_packet.m_NumArguments)
+    {
+        STRING sessionId;
+        INT32 requestedFeatures, iconsPerScaleRange;
+
+        Ptr<MgMap> map = (MgMap*)m_stream->GetObject();
+        map->SetDelayedLoadResourceService(m_resourceService);
+        Ptr<MgResourceIdentifier> resource = map->GetResourceId();
+
+        m_stream->GetInt32(requestedFeatures);
+        m_stream->GetInt32(iconsPerScaleRange);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(requestedFeatures);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(iconsPerScaleRange);
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgByteReader> byteReader =
+            m_service->DescribeRuntimeMap(map, requestedFeatures, iconsPerScaleRange);
+
+        EndExecution(byteReader);
+    }
+    else
+    {
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    }
+
+    if (!m_argsRead)
+    {
+        throw new MgOperationProcessingException(L"MgOpDescribeRuntimeMap.Execute",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_CATCH(L"MgOpDescribeRuntimeMap.Execute")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_THROW()
+}

Added: sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.h
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.h	                        (rev 0)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/OpDescribeRuntimeMap.h	2013-07-30 15:05:55 UTC (rev 7705)
@@ -0,0 +1,31 @@
+//
+//  Copyright (C) 2004-2013 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MG_OP_DESCRIBE_RUNTIME_MAP_H
+#define MG_OP_DESCRIBE_RUNTIME_MAP_H
+
+class MgOpDescribeRuntimeMap : public MgMappingOperation
+{
+    public:
+        MgOpDescribeRuntimeMap();
+        virtual ~MgOpDescribeRuntimeMap();
+
+    public:
+        virtual void Execute();
+};
+
+#endif
\ No newline at end of file

Modified: sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp	2013-07-30 15:05:55 UTC (rev 7705)
@@ -1862,26 +1862,21 @@
     // Do nothing.  No connection properties are required for Server-side service objects.
 }
 
-MgByteReader* MgServerMappingService::CreateRuntimeMap(MgResourceIdentifier* mapDefinition,
-                                                       CREFSTRING sessionId,
-                                                       INT32 requestedFeatures,
-                                                       INT32 iconsPerScaleRange)
+MgByteReader* MgServerMappingService::DescribeRuntimeMap(MgMap* map,
+                                                         INT32 requestedFeatures,
+                                                         INT32 iconsPerScaleRange)
 {
-    CHECKNULL(mapDefinition, L"MgServerMappingService.CreateRuntimeMap");
-    STRING mapName = mapDefinition->GetName();
-    return CreateRuntimeMap(mapDefinition, mapName, sessionId, MgImageFormats::Png, LEGEND_BITMAP_SIZE, LEGEND_BITMAP_SIZE, requestedFeatures, iconsPerScaleRange);
+    CHECKNULL(map, L"MgServerMappingService.DescribeRuntimeMap");
+    return DescribeRuntimeMap(map, MgImageFormats::Png, LEGEND_BITMAP_SIZE, LEGEND_BITMAP_SIZE, requestedFeatures, iconsPerScaleRange);
 }
 
-MgByteReader* MgServerMappingService::CreateRuntimeMap(MgResourceIdentifier* mapDefinition,
-                                                       CREFSTRING targetMapName,
-                                                       CREFSTRING sessionId,
-                                                       CREFSTRING iconFormat,
-                                                       INT32 iconWidth,
-                                                       INT32 iconHeight,
-                                                       INT32 requestedFeatures,
-                                                       INT32 iconsPerScaleRange)
+MgByteReader* MgServerMappingService::DescribeRuntimeMap(MgMap* map,
+                                                         CREFSTRING iconFormat,
+                                                         INT32 iconWidth,
+                                                         INT32 iconHeight,
+                                                         INT32 requestedFeatures,
+                                                         INT32 iconsPerScaleRange)
 {
-    CHECKARGUMENTNULL(mapDefinition, L"MgServerMappingService.CreateRuntimeMap");
     LayerDefinitionMap layerDefinitionMap;
     if (MgImageFormats::Png != iconFormat &&
         MgImageFormats::Gif != iconFormat &&
@@ -1890,35 +1885,16 @@
     {
         MgStringCollection args;
         args.Add(iconFormat);
-        throw new MgInvalidArgumentException(L"MgServerMappingService.CreateRuntimeMap", __LINE__, __WFILE__, NULL, L"MgInvalidImageFormat", &args);
+        throw new MgInvalidArgumentException(L"MgServerMappingService.DescribeRuntimeMap", __LINE__, __WFILE__, NULL, L"MgInvalidImageFormat", &args);
     }
     Ptr<MgByteReader> byteReader;
 
     MG_SERVER_MAPPING_SERVICE_TRY()
 
-    if (m_svcResource == NULL)
-        InitializeResourceService();
+    STRING sessionId = map->GetSessionId();
+    STRING targetMapName = map->GetName();
+    Ptr<MgResourceIdentifier> mapDefinition = map->GetMapDefinition();
 
-    Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
-    Ptr<MgUserInformation> userInfo = new MgUserInformation(sessionId);
-    siteConn->Open(userInfo);
-    Ptr<MgMap> map = new MgMap(siteConn);
-    map->Create(mapDefinition, targetMapName);
-    
-    STRING sStateId = L"Session:";
-    sStateId += sessionId;
-    sStateId += L"//";
-    sStateId += targetMapName;
-    sStateId += L".";
-    sStateId += MgResourceType::Map;
-
-    Ptr<MgResourceIdentifier> mapStateId = new MgResourceIdentifier(sStateId);
-    Ptr<MgSelection> sel = new MgSelection(map);
-    //Call our special Save() API that doesn't try to look for a MgUserInformation that's not
-    //there
-    sel->Save(m_svcResource, sessionId, targetMapName);
-    map->Save(m_svcResource, mapStateId);
-
     //TODO: Possible future caching opportunity?
     std::string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";  // NOXLATE
     xml.append("<RuntimeMap xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"RuntimeMap-2.6.0.xsd\">\n");
@@ -2084,7 +2060,7 @@
     byteSource->SetMimeType(MgMimeType::Xml);
     byteReader = byteSource->GetReader();
 
-    MG_SERVER_MAPPING_SERVICE_CATCH(L"MgServerMappingService.CreateRuntimeMap")
+    MG_SERVER_MAPPING_SERVICE_CATCH(L"MgServerMappingService.DescribeRuntimeMap")
 
     //Cleanup our LayerDefinition pointers. Do it here so we don't leak on any exception
     for (LayerDefinitionMap::iterator it = layerDefinitionMap.begin(); it != layerDefinitionMap.end(); it++)
@@ -2099,6 +2075,70 @@
     return byteReader.Detach();
 }
 
+MgByteReader* MgServerMappingService::CreateRuntimeMap(MgResourceIdentifier* mapDefinition,
+                                                       CREFSTRING sessionId,
+                                                       INT32 requestedFeatures,
+                                                       INT32 iconsPerScaleRange)
+{
+    CHECKNULL(mapDefinition, L"MgServerMappingService.CreateRuntimeMap");
+    STRING mapName = mapDefinition->GetName();
+    return CreateRuntimeMap(mapDefinition, mapName, sessionId, MgImageFormats::Png, LEGEND_BITMAP_SIZE, LEGEND_BITMAP_SIZE, requestedFeatures, iconsPerScaleRange);
+}
+
+MgByteReader* MgServerMappingService::CreateRuntimeMap(MgResourceIdentifier* mapDefinition,
+                                                       CREFSTRING targetMapName,
+                                                       CREFSTRING sessionId,
+                                                       CREFSTRING iconFormat,
+                                                       INT32 iconWidth,
+                                                       INT32 iconHeight,
+                                                       INT32 requestedFeatures,
+                                                       INT32 iconsPerScaleRange)
+{
+    CHECKARGUMENTNULL(mapDefinition, L"MgServerMappingService.CreateRuntimeMap");
+    LayerDefinitionMap layerDefinitionMap;
+    if (MgImageFormats::Png != iconFormat &&
+        MgImageFormats::Gif != iconFormat &&
+        MgImageFormats::Png8 != iconFormat &&
+        MgImageFormats::Jpeg != iconFormat)
+    {
+        MgStringCollection args;
+        args.Add(iconFormat);
+        throw new MgInvalidArgumentException(L"MgServerMappingService.CreateRuntimeMap", __LINE__, __WFILE__, NULL, L"MgInvalidImageFormat", &args);
+    }
+    Ptr<MgByteReader> byteReader;
+
+    MG_SERVER_MAPPING_SERVICE_TRY()
+
+    if (m_svcResource == NULL)
+        InitializeResourceService();
+
+    Ptr<MgSiteConnection> siteConn = new MgSiteConnection();
+    Ptr<MgUserInformation> userInfo = new MgUserInformation(sessionId);
+    siteConn->Open(userInfo);
+    Ptr<MgMap> map = new MgMap(siteConn);
+    map->Create(mapDefinition, targetMapName);
+    
+    STRING sStateId = L"Session:";
+    sStateId += sessionId;
+    sStateId += L"//";
+    sStateId += targetMapName;
+    sStateId += L".";
+    sStateId += MgResourceType::Map;
+
+    Ptr<MgResourceIdentifier> mapStateId = new MgResourceIdentifier(sStateId);
+    Ptr<MgSelection> sel = new MgSelection(map);
+    //Call our special Save() API that doesn't try to look for a MgUserInformation that's not
+    //there
+    sel->Save(m_svcResource, sessionId, targetMapName);
+    map->Save(m_svcResource, mapStateId);
+
+    byteReader = DescribeRuntimeMap(map, iconFormat, iconWidth, iconHeight, requestedFeatures, iconsPerScaleRange);
+
+    MG_SERVER_MAPPING_SERVICE_CATCH_AND_THROW(L"MgServerMappingService.CreateRuntimeMap")
+
+    return byteReader.Detach();
+}
+
 void MgServerMappingService::CreateGroupItem(MgLayerGroup* group, MgLayerGroup* parent, std::string& xml)
 {
     MG_SERVER_MAPPING_SERVICE_TRY()

Modified: sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.h
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.h	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.h	2013-07-30 15:05:55 UTC (rev 7705)
@@ -130,6 +130,17 @@
                                                INT32 requestedFeatures,
                                                INT32 iconsPerScaleRange);
 
+        virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
+                                                 INT32 requestedFeatures,
+                                                 INT32 iconsPerScaleRange);
+
+        virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
+                                                 CREFSTRING iconFormat,
+                                                 INT32 iconWidth,
+                                                 INT32 iconHeight,
+                                                 INT32 requestedFeatures,
+                                                 INT32 iconsPerScaleRange);
+
         void SetConnectionProperties(MgConnectionProperties* connProp);
 
 // Data Members

Modified: sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj	2013-07-30 15:05:55 UTC (rev 7705)
@@ -220,6 +220,12 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="OpDescribeRuntimeMap.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="OpGenerateLegendImage.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -328,6 +334,7 @@
     <ClInclude Include="MappingOperation.h" />
     <ClInclude Include="MappingOperationFactory.h" />
     <ClInclude Include="OpCreateRuntimeMap.h" />
+    <ClInclude Include="OpDescribeRuntimeMap.h" />
     <ClInclude Include="OpGenerateLegendImage.h" />
     <ClInclude Include="OpGenerateLegendPlot.h" />
     <ClInclude Include="OpGenerateMap.h" />

Modified: sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj.filters
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj.filters	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingService.vcxproj.filters	2013-07-30 15:05:55 UTC (rev 7705)
@@ -49,6 +49,9 @@
     <ClCompile Include="OpCreateRuntimeMap.cpp">
       <Filter>Ops</Filter>
     </ClCompile>
+    <ClCompile Include="OpDescribeRuntimeMap.cpp">
+      <Filter>Ops</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="MappingOperation.h">
@@ -96,6 +99,9 @@
     <ClInclude Include="OpCreateRuntimeMap.h">
       <Filter>Ops</Filter>
     </ClInclude>
+    <ClInclude Include="OpDescribeRuntimeMap.h">
+      <Filter>Ops</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="ServerMappingService.rc" />

Modified: sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingServiceBuild.cpp
===================================================================
--- sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingServiceBuild.cpp	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/Services/Mapping/ServerMappingServiceBuild.cpp	2013-07-30 15:05:55 UTC (rev 7705)
@@ -22,6 +22,7 @@
 #include "MappingOperationFactory.cpp"
 #include "MappingServiceHandler.cpp"
 #include "OpCreateRuntimeMap.cpp"
+#include "OpDescribeRuntimeMap.cpp"
 #include "OpGeneratePlot.cpp"
 #include "OpGenerateMap.cpp"
 #include "OpGenerateMapUpdate.cpp"

Modified: sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.cpp
===================================================================
--- sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.cpp	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.cpp	2013-07-30 15:05:55 UTC (rev 7705)
@@ -357,7 +357,108 @@
     }
 }
 
+void TestMappingService::TestCase_DescribeRuntimeMap()
+{
+    try
+    {
+        //make a runtime map
+        Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+        STRING format = MgImageFormats::Png;
+        //call the API
+        Ptr<MgByteReader> rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan1", m_session, format, 16, 16, 0, 25);
+        Ptr<MgMap> map = new MgMap(m_siteConnection);
+        map->Open(L"UnitTestSheboygan1");
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, 0, 25);
 
+        Ptr<MgByteSink> sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapBarebones.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, 1, 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroups.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsPNG16x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG16x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsPNG32x32.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG32x32.xml");
+
+        format = MgImageFormats::Gif;
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsGIF16x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourceGIF16x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsGIF32x32.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourceGIF32x32.xml");
+
+        format = MgImageFormats::Jpeg;
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsJPEG16x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourceJPEG16x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsJPEG32x32.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourceJPEG32x32.xml");
+
+        format = MgImageFormats::Png8;
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsPNG816x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 16, 16, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG816x16.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsPNG832x32.xml");
+
+        rtMap = m_svcMapping->DescribeRuntimeMap(map, format, 32, 32, (1 | 2 | 4), 25);
+        sink = new MgByteSink(rtMap);
+        sink->ToFile(L"../UnitTestFiles/DescribeRuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG832x32.xml");
+    }
+    catch(MgException* e)
+    {
+        STRING message = e->GetDetails(TEST_LOCALE);
+        SAFE_RELEASE(e);
+        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+    catch(...)
+    {
+        throw;
+    }
+}
+
 void TestMappingService::TestCase_GetMap()
 {
     try

Modified: sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.h
===================================================================
--- sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.h	2013-07-30 13:56:33 UTC (rev 7704)
+++ sandbox/jng/getruntimemap/Server/src/UnitTesting/TestMappingService.h	2013-07-30 15:05:55 UTC (rev 7705)
@@ -37,6 +37,7 @@
     CPPUNIT_TEST(TestCase_GetLegendImage);
     CPPUNIT_TEST(TestCase_GetLegendImagePointStyleWithConstRotations);
     CPPUNIT_TEST(TestCase_CreateRuntimeMap);
+    CPPUNIT_TEST(TestCase_DescribeRuntimeMap);
     //CPPUNIT_TEST(TestCase_QueryFeaturesImageMap);
 
     CPPUNIT_TEST(TestEnd); // This must be the very last unit test
@@ -53,6 +54,7 @@
     void TestEnd();
 
     void TestCase_CreateRuntimeMap();
+    void TestCase_DescribeRuntimeMap();
     void TestCase_GetMap();
     void TestCase_GetMapUpdate();
     void TestCase_SaveMap();



More information about the mapguide-commits mailing list