[OpenLayers-Users] OpenLayers.Layer.WMS - using SVG Format?

Andrew Stewart Andrew.Stewart at reddeer.ca
Mon Dec 17 09:28:47 PST 2012


Hi Harris,

Thanks for the response - unfortunately we are using Internet Explorer 8 and that is the browser I'm having issues with. I can just use a standard <html> tag without doctype and the svg layer displays properly within Google Chrome, Firefox or Safari. When I use the same code within IE8 I am getting the invalid pink tiles, but when right-clicking and pasting the request into the browser as - 

http://testing/Test_WMS/Request.aspx?LAYERS=Neighbourhood_Label&FORMAT=image%2Fsvg%2Bxml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A3776&BBOX=8613.8870779406,5792610.7620554,15731.338831386,5799728.2138088&WIDTH=256&HEIGHT=256

It does show up properly within IE8. Adding the - <!DOCTYPE html> tag gets the pink tiles to dissapear but the OpenLayers Map does not show anything now, any ideas?


Andrew Stewart


-----Original Message-----
From: Harris Hudson [mailto:hhudson at katmandu.org] 
Sent: December 14, 2012 11:38 PM
To: Andrew Stewart
Cc: openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] OpenLayers.Layer.WMS - using SVG Format?

Using OpenLayers.Layer.WMS to add a WMS SVG (image/svg+xml) format layer
should work fine for modern browsers.  I've successfully added WMS SVG
layers using OpenLayers.Layer.WMS where the layer tiles are added to the
map based either on the <img> tag or the <iframe> tag.  You might just need
to have <!DOCTYPE html> at the top of your page for versions of IE that
support SVG.

In non standard cases where your WMS produces a non-static or an interactive
SVG layer, or an SVG layer that has external styling for example, then you
might consider trying OpenLayers.Layer.WMS.InlineXhtml from the InlineXhtml
Addin.

Regards,

Harris.

> Hi, just wondering if instead of pushing out an OpenLayers.Layer.WMS as
> format:image/png I can use svg. My getcapabilities request of my WMS says
> that is supports SVG with the following -
>
> - <GetMap>
>   <Format>image/png</Format>
>   <Format>image/jpeg</Format>
>   <Format>image/svg+xml</Format>
>   <Format>svgz</Format>
>
> However when I declare a WMS layer with svg format it does not show, is
> there any way to use SVG with a WMS layer? Thanks.
>
>  layer_Overview = new OpenLayers.Layer.WMS("Overview Map Layers", wms, {
>     layers: ["OVERVIEW_County", "OVERVIEW_City_Boundaries",
> "OVERVIEW_Roads", "OVERVIEW_River", "OVERVIEW_Roads_Highways"],
>     VERSION: "1.3.0",
>     format: 'image/svg+xml'
> }, {
>     isBaseLayer: true,
>     displayInLayerSwitcher: false,
>     singleTile: true,
>     buffer: 1,
>     ratio: 1
> });
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/OpenLayers-Layer-WMS-using-SVG-Format-tp5023159.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>




[This message has been scanned for security content threats and viruses.]

[The City of Red Deer I.T. Services asks that you please consider the environment before printing this e-mail.]






More information about the Users mailing list