Opened 19 years ago

Last modified 17 years ago

#1347 closed enhancement

WMS GetMap and SVG — at Version 5

Reported by: ivano.picco@… Owned by: mapserverbugs
Priority: high Milestone: 5.0 release
Component: Output-SVG Version: unspecified
Severity: minor Keywords:
Cc: ivanopicco

Description (last modified by dmorissette)

Hi!
Still workin' on get SVG map, I think it's stable enough to get support on WMS
getmap method. 
I made a patch to do this:

diff -Nru mapserver-4.6.0-beta1/mapoutput.c mapserver-4.6.0-beta2/mapoutput.c
--- mapserver-4.6.0-beta1/mapoutput.c   2005-04-07 19:23:16.000000000 +0200
+++ mapserver-4.6.0-beta2/mapoutput.c   2005-05-11 11:36:25.000000000 +0200
@@ -927,7 +927,8 @@

         if( j == mime_count && map->outputformatlist[i]->driver &&
             (strncasecmp(map->outputformatlist[i]->driver, "GD/", 3)==0 ||
-             strncasecmp(map->outputformatlist[i]->driver, "GDAL/", 5)==0))
+             strncasecmp(map->outputformatlist[i]->driver, "GDAL/", 5)==0 ||
+             strcasecmp(map->outputformatlist[i]->driver, "svg")==0))
             mime_list[mime_count++] = map->outputformatlist[i]->mimetype;
     }

diff -Nru mapserver-4.6.0-beta1/mapwms.c mapserver-4.6.0-beta2/mapwms.c
--- mapserver-4.6.0-beta1/mapwms.c      2005-04-22 17:50:46.000000000 +0200
+++ mapserver-4.6.0-beta2/mapwms.c      2005-05-11 11:36:25.000000000 +0200
@@ -755,7 +755,8 @@

       if( format == NULL ||
           (strncasecmp(format->driver, "GD/", 3) != 0 &&
-           strncasecmp(format->driver, "GDAL/", 4) != 0))
+           strncasecmp(format->driver, "GDAL/", 4) != 0 &&
+           strcasecmp(format->driver, "svg") != 0))
         {
           msSetError(MS_IMGERR,
                    "Unsupported output format (%s).",
@@ -1783,6 +1784,7 @@
 #ifdef USE_GD_WBMP
                       "<WBMP />"
 #endif
+                      "<SVG />"
                       , NULL);
     msWMSPrintRequestCap(nVersion, "Capabilities", script_url_encoded,
"<WMS_XML />", NULL);
     msWMSPrintRequestCap(nVersion, "FeatureInfo", script_url_encoded, "<MIME
/><GML.1 />", NULL);

I Hope it can be usefull.
Nice day,
Ivano

Change History (6)

comment:1 by ivano.picco@…, 19 years ago

dependson: 455

comment:2 by dmorissette, 19 years ago

Milestone: 4.8 release
Assefa, can you please check this when you have a chance? Would anything else be
required to support SVG through WMS?

by ivano.picco@…, 19 years ago

Attachment: SVG-patch added

Build against MapServer 4.6.0

comment:3 by ivanopicco, 17 years ago

Cc: ivanopicco added

comment:4 by ivanopicco, 17 years ago

Milestone: 4.8 releaseFUTURE

comment:5 by dmorissette, 17 years ago

Description: modified (diff)

Assefa, this change seems very straightforward. Is it really all that's needed to allow SVG output via WMS? Do you think it would be safe to add this now (before 5.0-beta1)?

Note: See TracTickets for help on using tickets.