[mapguide-commits] r1303 - trunk/MgDev/Server/src/Services/Kml

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Mar 20 15:03:47 EDT 2007


Author: traianstanev
Date: 2007-03-20 15:03:47 -0400 (Tue, 20 Mar 2007)
New Revision: 1303

Modified:
   trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp
Log:
Fix problems in URL generation for KML output, related to the recent change in handling of VERSION strings in URL requests. Also initialize the KmlRenderer properly with a non-null symbol manager.

Modified: trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp	2007-03-20 18:54:44 UTC (rev 1302)
+++ trunk/MgDev/Server/src/Services/Kml/ServerKmlService.cpp	2007-03-20 19:03:47 UTC (rev 1303)
@@ -20,6 +20,7 @@
 #include "Services/KmlDefs.h"
 #include "Stylization.h"
 #include "StylizationUtil.h"
+#include "SEMgSymbolManager.h"
 #include "KmlRenderer.h"
 #include "RSMgFeatureReader.h"
 #include "RSMgInputStream.h"
@@ -306,7 +307,7 @@
     kmlContent.WriteString("<Link>");
     kmlContent.WriteString("<href>");
     kmlContent.WriteString(agentUri, false);
-    kmlContent.WriteString("?OPERATION=GetLayerKml&amp;VERSION=1&amp;LAYERDEFINITION=", false);
+    kmlContent.WriteString("?OPERATION=GetLayerKml&amp;VERSION=1.0.0&amp;LAYERDEFINITION=", false);
     kmlContent.WriteString(MgUtil::WideCharToMultiByte(layer->GetLayerDefinition()->ToString()), false);
     sprintf(buffer,"&amp;DRAWORDER=%d", drawOrder);
     kmlContent.WriteString(buffer, false);
@@ -345,7 +346,7 @@
     kmlContent.WriteString("<Link>");
     kmlContent.WriteString("<href>");
     kmlContent.WriteString(agentUri, false);
-    kmlContent.WriteString("?OPERATION=GetFeaturesKml&amp;VERSION=1&amp;LAYERDEFINITION=", false);
+    kmlContent.WriteString("?OPERATION=GetFeaturesKml&amp;VERSION=1.0.0&amp;LAYERDEFINITION=", false);
     kmlContent.WriteString(MgUtil::WideCharToMultiByte(layer->GetLayerDefinition()->ToString()), false);
     sprintf(buffer,"&amp;DPI=%f", dpi);
     kmlContent.WriteString(buffer, false);
@@ -394,7 +395,7 @@
     kmlContent.WriteString("<Icon>");
     kmlContent.WriteString("<href>");
     kmlContent.WriteString(agentUri, false);
-    kmlContent.WriteString("?OPERATION=GetFeaturesKml&amp;VERSION=1&amp;LAYERDEFINITION=", false);
+    kmlContent.WriteString("?OPERATION=GetFeaturesKml&amp;VERSION=1.0.0&amp;LAYERDEFINITION=", false);
     kmlContent.WriteString(MgUtil::WideCharToMultiByte(layer->GetLayerDefinition()->ToString()), false);
     sprintf(buffer,"&amp;DPI=%f", dpi);
     kmlContent.WriteString(buffer, false);
@@ -469,7 +470,8 @@
             }
 
             KmlRenderer renderer(&kmlContent, bounds, scale, dpi, metersPerUnit, drawOrder);
-            DefaultStylizer stylizer(NULL);
+            SEMgSymbolManager sman(m_svcResource);
+            DefaultStylizer stylizer(&sman);
             renderer.StartLayer(&layerInfo, &fcInfo);
             stylizer.StylizeVectorLayer(vl, &renderer, rdr, csTrans, NULL, NULL);
             renderer.EndLayer();



More information about the mapguide-commits mailing list