OpenLayers OpenLayers & SVG Web SVGWeb

1.- What is it?

This is an intent to integrate svgweb with OpenLayers

To do so, I have developed a new Renderer for OpenLayers.

1.1.- SVG Web

SVG Web is an open source javascript library developed by Google which provides SVG support on many browsers (including Internet Explorer).

For more info, see http://code.google.com/p/svgweb/

1.2.- OpenLayers

OpenLayers is an open source javascript library for displaying map data in modern browsers.

For more info, see http://www.openlayers.org/

2.- How to use it

In order to use the SVGWeb render, you must use the last version of the SVG Web library with a little patch that correct this issue. Once this issue will be solved, you will be able to use the SVGWeb renderer with any future release of SVG Web.
Update: you can now use the SVG Web renderer with the latest SVN version of SVG Web.

You must also modify your copy of OpenLayers so it knows that there is a new renderer available.

If you are using the compressed version of OpenLayers, open OpenLayers.js, look for the string ['SVG','VML','Canvas'] and replace it with ['SVGWeb','SVG','VML','Canvas'].

If you are using the source version of OpenLayers, you have to edit /OpenLayers/Layer/Vector.js. There, you will have to look for the renderers property and replace ['SVG','VML','Canvas'] with ['SVGWeb','SVG','VML','Canvas'].

Finally, you have to put the following code in the page where you want to use OpenLayers: (just after the inclusion of the OpenLayers.js script)

<script src="./SVGWeb.js" type="text/javascript"></script>
<script src="./svgweb/src/svg-uncompressed.js" data-path="./svgweb/src/" data-htc-filename="svg-htc.php"></script>
	

3.- Download

4.- Examples

Below you will find examples from the openlayers web site that have been adapted to use the SVGWeb Renderer instead of the default one.

Note that Internet Explorer will always use the flash renderer as it does not provide native support for SVG.

SVGWeb using native SVG renderer
(for Firefox, Safari, Opera)
Flash renderer Default OpenLayers Renderer
OpenLayers: Vector Features native SVG renderer flash renderer default
Labeled Features Example native SVG renderer flash renderer default
Styles
Vector Styles native SVG renderer flash renderer default
Styles Unique Value Styles Example native SVG renderer flash renderer default
StyleMap native SVG renderer flash renderer default
Styles Rotation Example native SVG renderer flash renderer default
Edition
Regular Polygon Example native SVG renderer flash renderer default
SelectFeature Control on Layer.Vector native SVG renderer flash renderer default
SelectFeature Control for Select and Highlight native SVG renderer flash renderer default
SelectFeature Control on multiple vector layers native SVG renderer flash renderer default
Draw Feature Example native SVG renderer flash renderer default
Drag Feature Example native SVG renderer flash renderer default
Modify Feature native SVG renderer flash renderer default
Open Popup on Layer.Vector native SVG renderer flash renderer default
Snapping & Splitting
Snapping native SVG renderer flash renderer default
Split Feature Example native SVG renderer flash renderer default
Snapping & Splitting native SVG renderer flash renderer default
Other
Resize Features Example native SVG renderer flash renderer default
Rotate Features Example native SVG renderer flash renderer default
  : Works well —   : Works partially —   : Does not work

5.- Contact

If you have any question, you can contact me