[mapguide-commits] r1325 - trunk/MgDev/Common/MdfParser

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Mar 21 16:49:58 EDT 2007


Author: ronnielouie
Date: 2007-03-21 16:49:58 -0400 (Wed, 21 Mar 2007)
New Revision: 1325

Modified:
   trunk/MgDev/Common/MdfParser/IOElevationSettings.cpp
Log:
ElevationSettings in the layer definition xml was not output correctly.  This submission fixes the string encoding and the order for the ZOffsetType element.

Modified: trunk/MgDev/Common/MdfParser/IOElevationSettings.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOElevationSettings.cpp	2007-03-21 20:38:08 UTC (rev 1324)
+++ trunk/MgDev/Common/MdfParser/IOElevationSettings.cpp	2007-03-21 20:49:58 UTC (rev 1325)
@@ -128,29 +128,29 @@
     fd << EncodeString(elevationSettings->GetZExtrusionExpression());
     fd << "</ZExtrusion>" << std::endl; // NOXLATE
 
-    fd << tab() << "<Unit>"; // NOXLATE
-    std::auto_ptr<MdfString> str(LengthConverter::UnitToEnglish(elevationSettings->GetUnit()));
-    fd << EncodeString(*str);
-    fd << "</Unit>" << std::endl; // NOXLATE
-
     fd << tab() << "<ZOffsetType>"; // NOXLATE
     ElevationSettings::ElevationType elevType = elevationSettings->GetElevationType();
     switch(elevType)
     {
     case ElevationSettings::Absolute:
         {
-            fd << ELEV_TYPE_ABSOLUTE; 
+            fd << EncodeString(ELEV_TYPE_ABSOLUTE); 
             break;
         }
     case ElevationSettings::RelativeToGround:
     default:
         {
-            fd << ELEV_TYPE_RELATIVE_TO_GROUND; 
+            fd << EncodeString(ELEV_TYPE_RELATIVE_TO_GROUND); 
             break;
         }
     }
     fd << "</ZOffsetType>" << std::endl; // NOXLATE
 
+    fd << tab() << "<Unit>"; // NOXLATE
+    std::auto_ptr<MdfString> str(LengthConverter::UnitToEnglish(elevationSettings->GetUnit()));
+    fd << EncodeString(*str);
+    fd << "</Unit>" << std::endl; // NOXLATE
+
     // Write any previously found unknown XML
     if (!elevationSettings->GetUnknownXml().empty())
     {



More information about the mapguide-commits mailing list