sxnc / markedup-svg-worldmap

An SVG world map marked-up with ISO 3166 country codes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marked-Up SVG World Map

An SVG world map marked-up with ISO 3166 country codes. Path (path) and group (g) elements are annotated with cc attributes containing their country codes.

For example, to colour Canada red, you might use the following JavaScript:

// 'map' should contain a reference to the embedded SVG element
map.getSVGDocument().querySelector("[cc=ca]").style.fill = "red";

A full example is included in the example.html file.

Acknowledgements

Adapted from Al MacDonald's Low Resolution World Map.

Author

Original Low Resolution World Map by Al MacDonald. This derivative work has been pruned and marked-up with ISO 3166 country codes by Ben Hodgson.

Thanks to Marco Vettorello and Denis Hovart for contributing fixes.

License

This work is made available under a Creative Commons Attribution-ShareAlike 3.0 Unported license. For the full license, see the LICENSE file.

About

An SVG world map marked-up with ISO 3166 country codes.

License:Other


Languages

Language:HTML 100.0%