[mapguide-commits] r4232 - trunk/MgDev/Common/Renderers
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Sep 17 18:31:49 EDT 2009
Author: tomfukushima
Date: 2009-09-17 18:31:48 -0400 (Thu, 17 Sep 2009)
New Revision: 4232
Modified:
trunk/MgDev/Common/Renderers/KmlRenderer.cpp
Log:
#1096 <coordinate> tag in generated KML does not follow spec.
Although this ticket is low priority I made the change because it is quite simple and innocuous.
Removed the spaces from all of the coordinates generated from the KML renderer.
Tested by viewing polygon, line and point data in Google Earth before the change and then viewing it again after the change.
Modified: trunk/MgDev/Common/Renderers/KmlRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/KmlRenderer.cpp 2009-09-17 02:05:30 UTC (rev 4231)
+++ trunk/MgDev/Common/Renderers/KmlRenderer.cpp 2009-09-17 22:31:48 UTC (rev 4232)
@@ -306,7 +306,7 @@
for (int i = 0; i < numPoints; i ++)
{
- sprintf(buffer, "%f, %f, %f%s", plb->x_coord(i), plb->y_coord(i), m_elevation, (i < numPoints - 1)? "," : "");
+ sprintf(buffer, "%f,%f,%f%s", plb->x_coord(i), plb->y_coord(i), m_elevation, (i < numPoints - 1)? "," : "");
m_kmlContent->WriteString(buffer);
}
m_kmlContent->WriteString("</coordinates>");
@@ -321,7 +321,7 @@
int pointOffset = plb->contour_start_point(cntr);
for (int i = 0; i < numPoints; i ++)
{
- sprintf(buffer, "%f, %f, %f%s", plb->x_coord(pointOffset), plb->y_coord(pointOffset), m_elevation, (i < numPoints - 1)? "," : "");
+ sprintf(buffer, "%f,%f,%f%s", plb->x_coord(pointOffset), plb->y_coord(pointOffset), m_elevation, (i < numPoints - 1)? "," : "");
m_kmlContent->WriteString(buffer);
pointOffset++;
}
@@ -376,7 +376,7 @@
m_kmlContent->WriteString("<Point>");
WriteElevationSettings();
m_kmlContent->WriteString("<coordinates>");
- sprintf(buffer, "%f, %f, %f", x, y, m_elevation);
+ sprintf(buffer, "%f,%f,%f", x, y, m_elevation);
m_kmlContent->WriteString(buffer);
m_kmlContent->WriteString("</coordinates>");
m_kmlContent->WriteString("</Point>");
@@ -400,7 +400,7 @@
{
m_kmlContent->WriteString("<Point>");
m_kmlContent->WriteString("<coordinates>");
- sprintf(buffer, "%f, %f, 0.00000", labels[i].x(), labels[i].y());
+ sprintf(buffer, "%f,%f,0.00000", labels[i].x(), labels[i].y());
m_kmlContent->WriteString(buffer);
m_kmlContent->WriteString("</coordinates>");
m_kmlContent->WriteString("</Point>");
More information about the mapguide-commits
mailing list