[mapguide-commits] r7555 - in sandbox/jng/createruntimemap: Common/Schema Server/src/Services/Mapping

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Jun 3 03:18:35 PDT 2013


Author: jng
Date: 2013-06-03 03:18:35 -0700 (Mon, 03 Jun 2013)
New Revision: 7555

Modified:
   sandbox/jng/createruntimemap/Common/Schema/RuntimeMap-2.6.0.xsd
   sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp
Log:
One last change for RFC 134: Include the Display DPI in the CreateRuntimeMap response.

Modified: sandbox/jng/createruntimemap/Common/Schema/RuntimeMap-2.6.0.xsd
===================================================================
--- sandbox/jng/createruntimemap/Common/Schema/RuntimeMap-2.6.0.xsd	2013-06-03 05:37:45 UTC (rev 7554)
+++ sandbox/jng/createruntimemap/Common/Schema/RuntimeMap-2.6.0.xsd	2013-06-03 10:18:35 UTC (rev 7555)
@@ -26,6 +26,11 @@
             <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>

Modified: sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp	2013-06-03 05:37:45 UTC (rev 7554)
+++ sandbox/jng/createruntimemap/Server/src/Services/Mapping/ServerMappingService.cpp	2013-06-03 10:18:35 UTC (rev 7555)
@@ -1942,7 +1942,13 @@
     // ------------------------------ Background Color ---------------------------------- //
     xml.append("<BackgroundColor>");
     xml.append(MgUtil::WideCharToMultiByte(map->GetBackgroundColor()));
-    xml.append("</BackgroundColor>");
+    xml.append("</BackgroundColor>\n");
+    // ------------------------------ Display DPI --------------------------------------- //
+    xml.append("<DisplayDpi>");
+    std::string sDpi;
+    MgUtil::Int32ToString(map->GetDisplayDpi(), sDpi);
+    xml.append(sDpi);
+    xml.append("</DisplayDpi>\n");
     // ------------------------------ Icon Image Format --------------------------------- //
     if ((requestedFeatures & REQUEST_LAYER_ICONS) == REQUEST_LAYER_ICONS)
     {
@@ -1953,7 +1959,7 @@
             xml.append(MgUtil::WideCharToMultiByte(MgMimeType::Jpeg));
         else if (iconFormat == MgImageFormats::Png || iconFormat == MgImageFormats::Png8)
             xml.append(MgUtil::WideCharToMultiByte(MgMimeType::Png));
-        xml.append("</IconMimeType>");
+        xml.append("</IconMimeType>\n");
     }
     // ------------------------------ Coordinate System --------------------------------- //
     xml.append("<CoordinateSystem>\n");



More information about the mapguide-commits mailing list