Skip to content

benhodgson/markedup-svg-worldmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages