These samples of cartographic applications shall help you getting started with SVG ("Basic examples"). The basic examples come with commented source code. The more complex examples should showcase and demonstrate the usefulness of SVG for webmapping purposes. Please understand and apologize that we can't afford the time to comment the more complex, javascript driven examples.
Please inform the editors (emails given on the bottom of the respective pages) about typos, mistakes or alternative, more elegant methods to do similar things. If you want to add a tutorial, provide a related example or would like to see one particular topic addressed here, please contact the editor of this content page, André M. Winter. Also please see the technical notes below regarding the viewing of these examples. We try to keep our examples platform and viewer independent. Please understand that some of the older examples aren't under active development any more and were only tested in the older Adobe SVG viewer. As time permits we want to update the one or the other. Additional help is always welcome.
Content
Please download a SVG-Viewer plugin or browser with native SVG support (if not done so far).
Remarks: we don't provide a javascript that is checking for the existence of a SVG-viewer plugin or native SVG capabilities within your browser. You are responsible to install it yourself. In case you can't see the SVG examples or you get alerts about missing plugins, please return to this page and install an appropriate SVG plugin or an SVG enabled browser, such as the Firefox 1.5 branch or Opera 9+. Please also check your SVG viewer version. Most examples only work with the newer plugin versions. Please update to the most recent one.
Abbreviations for SVG viewers: (if the abbreviation is listed between parentheses it means that while most of the example works, there are still limitations/bugs; a plus sign after the version number of a viewer means the version indicated, plus later versions.)
Windows-Users have several options for viewing SVG files. The preferred way is to get a browser with native SVG support, such as Opera or Firefox (see additional notes on native browser support below). The most popular and most complete browser plugin for Internet Explorer is probably the Adobe SVG viewer 3 (you may download it www.adobe.com/devnet/svg/adobe-svg-viewer-download-area.html Adobe SVG download area). Adobe has decided to https://www.adobe.com/svg/eol.html discontinue the development and support of their viewer, since SVG is now increasingly available as a native browser technology. The other reason is that Adobe wants to push their own proprietary Flash solution for interactive content on the web. Windows users can also use the Java based Batik viewer (see below).
Macintosh-Users should also use a browser with native SVG support, such as Opera or Firefox (see notes below). The next generation of Safari/Webkit will also feature native SVG support. PowerPC Mac users can still use the Adobe SVG 3 viewer, which works in all MacOSX browsers (tested in Opera, Mozilla, Safari, Internet Explorer and Firefox). The Adobe SVG viewer, however, doesn't support the Intel platform and due to limitations in javascript communication between the browsers and browser plugins we can't use most browsers for interactive mapping projects that rely on HTML to SVG communication. MacOSX users can also use the Java based Batik project (see below) or browsers with native SVG support, such as Mozilla Firefox ≥ 1.5 or Opera ≥ 9 or a recent developer version of the SVG enabled Safari/Webkit application.
Linux/Unix-Users should also install a browser with native SVG support, such as Opera 9.1 or higher, or Firefox. Alternatively, one can use the Apache Batik Squiggle viewer. The KSVG team and Apple collaborate on the KSVG viewer and Webkit browser component for Apple and KDE. Progress is steady and encouraging. Please test webkit and provide bug reports! It is also worth mentioning that many tools on Linux support SVG, e.g. as an export format (e.g. Inkscape).
Java users (all Java supported platforms) looking for a standalone SVG viewer or Java developers that want to integrate SVG support in their Java Applications should have a look at Batik. Batik is a collection of several SVG tools, a browser, a renderer, font-converter and many more. (download and more infos at xml.apache.org/batik/). The Batik SVG viewer component can be embedded into your own Java programs and Batik can also be used with Java servlets at a webserver. Finally, Batik-Squiggle (the viewing component) offers a DOM-tree viewer and a javascript debugger - both features are very useful for SVG developers generating dynamic content with ECMAScript. Batik is perhaps the most complete SVG viewer when it comes to scripting/DOM support. The latest developer branch, that can be checked out using SVN, already implements some of the new SVG 1.2 features and SMIL support! Be sure to check the latest https://xmlgraphics.apache.org/batik/download.cgi#svn SVN version or download at xmlgraphics.apache.org/batik/download.cgi#snapshot" a nightly snapshot.
Native SVG support is part of the www.opera.com Opera browser since version 8. Version 8 supported SMIL animation, but no CSS and no scripting. Opera 9 supports scripting, CSS and DOM manipulations, SVG fonts, filters, as well as XSLT processing. Be sure to update your browser regularly, as new updates always contain bug fixes and new features regarding SVG. If you want to test the latest releases (not always stable) download a developers version. As of 2007-01 Opera 9.1 is the most complete native SVG implementation in a web browser. Although Opera 9 targets SVG basic, the SVG support is actually closer to SVG full. Mozilla SVG supports scripting/DOM/XSLT but no SMIL animation since version 1.5. Firefox 2.0 containts minor improvements to SVG (e.g. the <textPath/> element or some improved DOM support). Firefox 3 (currently alpha), however contains numerous SVG improvements, because it is based on a newer version of the Gecko engine and Cairo. Work on native SVG support in Safari/Webkit is progressing fast. Its is a collaboration between KDE people and Apple and will appear in future versions of Safari and Konqueror. Major advantages of native SVG support in web browsers are: better integration with other webstandards, mixed HTML/SVG pages, use of SVG as a background image, HTML inside SVG as a foreign object, Scripting across HTML/SVG and other components, SVG as a component of a Opera widget or Apple Dashboard, etc. Interesting times ahead!
Last modified:
Tuesday, 10-Dec-2019 21:40:11 CET
© carto:net (andreas neumann & andré m. winter) original URL for reference: https://old.carto.net/papers/svg/samples/index.shtml |