[mapserver-commits] r9076 - sandbox/davidK
svn at osgeo.org
svn at osgeo.org
Wed Jun 3 18:04:10 EDT 2009
Author: davidK
Date: 2009-06-03 18:04:10 -0400 (Wed, 03 Jun 2009)
New Revision: 9076
Modified:
sandbox/davidK/mapoutput.c
Log:
Modified: sandbox/davidK/mapoutput.c
===================================================================
--- sandbox/davidK/mapoutput.c 2009-06-03 22:03:32 UTC (rev 9075)
+++ sandbox/davidK/mapoutput.c 2009-06-03 22:04:10 UTC (rev 9076)
@@ -30,6 +30,8 @@
#include <assert.h>
#include "mapserver.h"
+#include "mapkml.h"
+
MS_CVSID("$Id$")
static outputFormatObj *msAllocOutputFormat( mapObj *map, const char *name,
@@ -272,6 +274,18 @@
format->r = msCreateRenderer(MS_RENDER_WITH_OGL);
}
#endif
+
+ #if defined(USE_KML)
+ if( strcasecmp(driver,"KML") == 0 )
+ {
+ format = msAllocOutputFormat( map, "kml", driver );
+ format->mimetype = strdup("application/vnd.google-earth.kml+xml");
+ format->imagemode = MS_IMAGEMODE_RGB;
+ format->extension = strdup("kml");
+ format->renderer = MS_RENDER_WITH_KML;
+ format->r = msCreateRenderer(MS_RENDER_WITH_KML);
+ }
+#endif
@@ -1088,6 +1102,41 @@
return r;
#endif
+#ifdef USE_KML
+ case MS_RENDER_WITH_KML:
+
+ r->supports_transparent_layers = 1;
+ r->supports_pixel_buffer = 0;
+ r->supports_imagecache = 0;
+ r->supports_transparent_layers = 1;
+
+ r->startNewLayer = msStartNewLayerKml;
+ r->closeNewLayer = msCloseNewLayerKml;
+ r->renderLine=&msRenderLineKml;
+ r->createImage=&msCreateImageKml;
+ r->saveImage=&msSaveImageKml;
+ r->transformShape=&msTransformShapeKml;
+ r->renderPolygon=&msRenderPolygonKml;
+ r->renderGlyphs=&msRenderGlyphsKml;
+ r->renderEllipseSymbol = &msRenderEllipseSymbolKml;
+ r->renderVectorSymbol = &msRenderVectorSymbolKml;
+ r->renderPixmapSymbol = &msRenderPixmapSymbolKml;
+ r->mergeRasterBuffer = &msMergeRasterBufferKml;
+ r->getTruetypeTextBBox = &msGetTruetypeTextBBoxKml;
+ r->createPixmapSymbolTile = &msCreatePixmapSymbolTileKml;
+ r->createVectorSymbolTile = &msCreateVectorSymbolTileKml;
+ r->createEllipseSymbolTile = &msCreateEllipseSymbolTileKml;
+ r->createTruetypeSymbolTile = &msCreateTruetypeSymbolTileKml;
+ r->renderTile = &msRenderTileKml;
+ r->renderPolygonTiled = &msRenderPolygonTiledKml;
+ r->renderLineTiled = &msRenderLineTiledKml;
+ r->freeTile = &msFreeTileKml;
+ r->freeSymbol = &msFreeSymbolKml;
+ r->freeImage=&msFreeImageKml;
+ return r;
+#endif
+
+
default:
return NULL;
}
More information about the mapserver-commits
mailing list