An SVG world map marked-up with ISO 3166 country codes.
Switch branches/tags
Nothing to show
Clone or download
Latest commit aa0f7dc Nov 24, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Jan 1, 2013
LICENSE Initial commit Jan 1, 2013
README.md Updated README to credit @dhovart's contribution Nov 24, 2016
example.html Unbreak example.html. Nov 24, 2016
map.svg Switch uganda and uruguay country codes Nov 20, 2016

README.md

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.