amitdar amitdar - 2 years ago 471
Javascript Question

Creating a layer from svg image using openlayers 3

So I'm trying to take big svg file and use it as a layer on open layers 3 map. I only want to display the svg, without any map underneath it. Trying to get an answer produced some info about using icon marker for that, but I couldn't make it to work.

Does anyone know how to simply show an svg file as a layer ?

Answer Source

I just answered this in another similiar question. See that answer for a runnable example.

The gist of it: just include the svg file as the url for ol.source.ImageStatic.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download