[mapguide-commits] r9541 - in sandbox/jng/tiling_v3: Common/MapGuideCommon/MapLayer Common/Schema Server/src/Services/Mapping

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Jun 10 08:23:36 PDT 2019


Author: jng
Date: 2019-06-10 08:23:36 -0700 (Mon, 10 Jun 2019)
New Revision: 9541

Added:
   sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd
Modified:
   sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp
   sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h
   sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp
Log:
Add RuntimeMap-4.0.0.xsd schema which includes:

 - Tile Provider (XYZ or Default)
 - Tile Pixel Ratio (for XYZ retina tiles)

Modified: sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp
===================================================================
--- sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp	2019-06-07 14:19:52 UTC (rev 9540)
+++ sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp	2019-06-10 15:23:36 UTC (rev 9541)
@@ -43,7 +43,8 @@
     m_unpackedLayersGroups(false),
     m_colorPalette(NULL),        // lazy instantiation
     m_watermarkUsage(Viewer),
-    m_tileSetId((MgResourceIdentifier*)NULL)
+    m_tileSetId((MgResourceIdentifier*)NULL),
+    m_tilePixelRatio(1)
 {
 }
 
@@ -216,6 +217,18 @@
 
         m_srs = GetCoordinateSystemFromTileSet(tdef.get(), true);
 
+        auto tsp = tdef->GetTileStoreParameters();
+        m_tileSetProvider = tsp->GetTileProvider();
+        auto parameters = tsp->GetParameters();
+        for (auto i = 0; i < parameters->GetCount(); i++)
+        {
+            auto nvp = parameters->GetAt(i);
+            if (nvp->GetName() == MG_TILE_PROVIDER_XYZ_PARAM_RETINASCALE)
+            {
+                m_tilePixelRatio = MgUtil::StringToInt32(nvp->GetValue());
+            }
+        }
+
         //If tile CS is not the same as map def CS, then the bounds of the map def need to be transformed
         if (m_srs != mdef->GetCoordinateSystem())
         {
@@ -622,6 +635,18 @@
     std::unique_ptr<MdfModel::TileSetDefinition> tdef(parser.DetachTileSetDefinition());
     assert(tdef.get() != NULL);
 
+    auto tsp = tdef->GetTileStoreParameters();
+    m_tileSetProvider = tsp->GetTileProvider();
+    auto parameters = tsp->GetParameters();
+    for (auto i = 0; i < parameters->GetCount(); i++)
+    {
+        auto nvp = parameters->GetAt(i);
+        if (nvp->GetName() == MG_TILE_PROVIDER_XYZ_PARAM_RETINASCALE)
+        {
+            m_tilePixelRatio = MgUtil::StringToInt32(nvp->GetValue());
+        }
+    }
+
     MgGeometryFactory gf;
 
     const Box2D& extent = tdef->GetExtents();
@@ -1612,4 +1637,14 @@
 MgResourceIdentifier* MgMap::GetTileSetDefinition()
 {
     return SAFE_ADDREF((MgResourceIdentifier*)m_tileSetId);
+}
+
+STRING MgMap::GetTileSetProvider()
+{
+    return m_tileSetProvider;
+}
+
+INT32 MgMap::GetTilePixelRatio()
+{
+    return m_tilePixelRatio;
 }
\ No newline at end of file

Modified: sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h
===================================================================
--- sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h	2019-06-07 14:19:52 UTC (rev 9540)
+++ sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h	2019-06-10 15:23:36 UTC (rev 9541)
@@ -506,6 +506,49 @@
     /// to a Tile Set
     MgResourceIdentifier* GetTileSetDefinition();
 
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns the provider name of the referenced tile set definition
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// string GetTileSetProvider();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// String GetTileSetProvider();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// string GetTileSetProvider();
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \since 4.0
+    ///
+    /// \return
+    /// Returns the tile set provider name. Or an empty string if this map does not reference a tile set
+    STRING GetTileSetProvider();
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns the tile pixel ratio for retina tiles. This is only 
+    /// applicable for XYZ tiles.
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// int GetTilePixelRatio();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// int GetTilePixelRatio();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// int GetTilePixelRatio();
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \since 4.0
+    ///
+    /// \return
+    /// Returns the tile pixel ratio for retina tiles
+    INT32 GetTilePixelRatio();
+
 INTERNAL_API:
 
     //////////////////////////////////////////////////////////////////
@@ -787,6 +830,8 @@
     ColorStringList* m_colorPalette;
 
     INT32 m_watermarkUsage;
+    STRING m_tileSetProvider;
+    INT32 m_tilePixelRatio;
 };
 /// \}
 

Added: sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd
===================================================================
--- sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd	                        (rev 0)
+++ sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd	2019-06-10 15:23:36 UTC (rev 9541)
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+  <xs:element name="RuntimeMap">
+    <xs:annotation>
+      <xs:documentation>Describes information about a Runtime Map, so that client applications can interact with it</xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element name="SiteVersion" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>The MapGuide Site Version</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="Name" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>The name of the runtime map. This is the value required for any mapagent operation that require a MAPNAME parameter</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="MapDefinition" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>The resource id of the Map Definition from which this runtime map was created from</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="TileSetDefinition" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>The resource id of the Tile Set Definition that this Map Definition is linked from. If this Map Definition does not link to a tile set, this element is omitted</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="TileSetProvider" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>The provider for the Tile Set Definition</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="TilePixelRatio" type="xs:integer" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>The tile pixel ratio for retina tiles</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="TileWidth" type="xs:integer" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>The tile width as defined by the settings in the Tile Set Definition. If this Map Definition does not link to a tile set, this element is omitted</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="TileHeight" type="xs:integer" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>The tile height as defined by the settings in the Tile Set Definition. If this Map Definition does not link to a tile set, this element is omitted</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="BackgroundColor" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>The map's background color in ARGB hex string format</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="DisplayDpi" type="xs:integer">
+          <xs:annotation>
+            <xs:documentation>The number of dots per inch of the map display</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="IconMimeType" type="xs:string" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>The mime type of all inline icons</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="CoordinateSystem" type="CoordinateSystemType" />
+        <xs:element name="Extents" type="Envelope" />
+        <xs:element name="Group" type="RuntimeMapGroup" minOccurs="0" maxOccurs="unbounded" />
+        <xs:element name="Layer" type="RuntimeMapLayer" minOccurs="0" maxOccurs="unbounded" />
+        <xs:element name="FiniteDisplayScale" type="xs:double" minOccurs="0" maxOccurs="unbounded" />
+        <xs:attribute name="version" type="xs:string" use="required" fixed="3.0.0"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:complexType name="CoordinateSystemType">
+    <xs:annotation>
+      <xs:documentation>Describes the coordinate system of the runtime map</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Wkt" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The WKT string of the coordinate system</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MentorCode" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The CS-Map code of the coordinate system</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="EpsgCode" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The EPSG code of the coordinate system</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MetersPerUnit" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>The meters-per-unit value of the coordinate system</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="RuntimeMapGroup">
+    <xs:annotation>
+      <xs:documentation>Describes a group of Runtime Map Layers</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the group</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Type" type="xs:integer">
+        <xs:annotation>
+          <xs:documentation>The type of this group. Can be tiled or dynamic. Uses the value of MgLayerGroupType</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The group's legend label</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ObjectId" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The group's unique id. Use this value for turning on/off this group in a GETDYNAMICMAPOVERLAYIMAGE request</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ParentId" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The group's parent group id. Use this value for determining parent-child relationships when building a layer/group hierarchy</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="DisplayInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates whether this group should be displayed in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExpandInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates whether this group should be initially expanded in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Visible" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates whether this group is potentially visible. Note that this may be true even though the group is not visible. This will occur if one of the groups this group is organized within is not visible.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ActuallyVisible" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates the actual visibility of the group. The visibility depends on the visible property of the group, and the visible property of each group this group is organized within.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="RuntimeMapLayer">
+    <xs:annotation>
+      <xs:documentation>Describes a runtime instance of a Layer Definition</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the layer</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Type" type="xs:integer">
+        <xs:annotation>
+          <xs:documentation>The type of this layer. Can be tiled or dynamic. Uses the value of MgLayerType</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The layer's legend label</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ObjectId" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The layer's unique id. Use this value for turning on/off this layer in a GETDYNAMICMAPOVERLAYIMAGE request</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ParentId" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The layer's parent group id. Use this value for determining parent-child relationships when building a layer/group hierarchy</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="DisplayInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates whether this layer should be displayed in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExpandInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates whether this layer should be initially expanded (if layer is themed) in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Visible" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates whether this layer is potentially visible. Note that this may be true even though the layer is not visible. This will occur if the visible flag of one of the groups this layer is organized within is not visible or when the current viewScale property of the map is outside the scale ranges defined for this layer.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ActuallyVisible" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Indicates the actual visibility of the layer. The visibility depends on the visible property of the group, and the visible property of each group this group is organized within.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LayerDefinition" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The Layer Definition from which this runtime layer was created from</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="FeatureSource" type="FeatureSourceInfo" minOccurs="0" />
+      <xs:element name="ScaleRange" type="ScaleRangeInfo" minOccurs="0" maxOccurs="unbounded" />
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="FeatureSourceInfo">
+    <xs:annotation>
+      <xs:documentation>Describe the Feature Source information for a runtime layer</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="ResourceId" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The Feature Source resource id</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ClassName" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The qualified FDO class name</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Geometry" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the default Geometry property</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ScaleRangeInfo">
+    <xs:annotation>
+      <xs:documentation>Describes a scale range of the runtime layer</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="MinScale" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>The minimum scale of this scale range</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MaxScale" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>The maximum scale of this scale range</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="FeatureStyle" type="FeatureStyleInfo" minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>The feature style for a given geometry type. This is empty for drawing and raster layers</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="FeatureStyleInfo">
+    <xs:annotation>
+      <xs:documentation>Defines the style rules for a given geometry type</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Type" type="xs:integer">
+        <xs:annotation>
+          <xs:documentation>The geometry type that this rule is applicable to (1=point, 2=line, 3=area, 4=composite)</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Rule" type="RuleInfo" minOccurs="0" maxOccurs="unbounded" />
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="RuleInfo">
+    <xs:annotation>
+      <xs:documentation>Describes a stylization rule in a layer's scale range</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The legend label for this rule</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Filter" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The FDO filter that features must match in order for them to be stylized using this particular rule</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Icon" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Defines the icon for this rule. The icon's image content is in base64 format</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="Envelope">
+    <xs:annotation>
+      <xs:documentation>Specifies an envelope (a rectangle) using two corner points.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LowerLeftCoordinate">
+        <xs:annotation>
+          <xs:documentation>Specifies the lower left corner of the envelope.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="X" type="xs:double"/>
+            <xs:element name="Y" type="xs:double"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="UpperRightCoordinate">
+        <xs:annotation>
+          <xs:documentation>Specifies the upper right corner of the envelope.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="X" type="xs:double"/>
+            <xs:element name="Y" type="xs:double"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>
\ No newline at end of file

Modified: sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp	2019-06-07 14:19:52 UTC (rev 9540)
+++ sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp	2019-06-10 15:23:36 UTC (rev 9541)
@@ -1249,8 +1249,11 @@
     std::string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";  // NOXLATE
     if (schemaVersion == MG_API_VERSION(2, 6, 0))
         xml.append("<RuntimeMap xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"RuntimeMap-2.6.0.xsd\">\n");
+    else if (schemaVersion == MG_API_VERSION(3, 0, 0))
+        xml.append("<RuntimeMap xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"RuntimeMap-3.0.0.xsd\" version=\"3.0.0\">\n");
     else
-        xml.append("<RuntimeMap xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"RuntimeMap-3.0.0.xsd\" version=\"3.0.0\">\n");
+        xml.append("<RuntimeMap xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"RuntimeMap-4.0.0.xsd\" version=\"4.0.0\">\n");
+
     // ------------------------------ Site Version ----------------------------------//
     xml.append("<SiteVersion>");
     MgServerManager* serverMgr = MgServerManager::GetInstance();
@@ -1268,8 +1271,8 @@
     xml.append("<MapDefinition>");
     xml.append(MgUtil::WideCharToMultiByte(mapDefinition->ToString()));
     xml.append("</MapDefinition>\n");
-    //Write tile set definition if requesting a v3.0.0 response
-    if (NULL != (MgResourceIdentifier*)tileSetDefinition && schemaVersion == MG_API_VERSION(3, 0, 0))
+    //Write tile set definition if requesting a v3.0.0 response or higher
+    if (NULL != (MgResourceIdentifier*)tileSetDefinition && schemaVersion >= MG_API_VERSION(3, 0, 0))
     {
         if (m_svcTile == NULL)
             InitializeTileService();
@@ -1283,6 +1286,19 @@
         xml.append("<TileSetDefinition>");
         xml.append(MgUtil::WideCharToMultiByte(tileSetDefinition->ToString()));
         xml.append("</TileSetDefinition>\n");
+        // ------------------------------ Tile Set Provider --------------------------------- //
+        if (schemaVersion == MG_API_VERSION(4, 0, 0))
+        {
+            xml.append("<TileSetProvider>");
+            xml.append(MgUtil::WideCharToMultiByte(map->GetTileSetProvider()));
+            xml.append("</TileSetProvider>\n");
+
+            xml.append("<TilePixelRatio>");
+            std::string sPR;
+            MgUtil::Int32ToString(map->GetTilePixelRatio(), sPR);
+            xml.append(sPR);
+            xml.append("</TilePixelRatio>");
+        }
         // ------------------------------ Tile Width ---------------------------------- //
         xml.append("<TileWidth>");
         xml.append(sWidth);



More information about the mapguide-commits mailing list