Skip to content
An SVG world map marked-up with ISO 3166 country codes.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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.


Adapted from Al MacDonald's Low Resolution World Map.


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.


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

You can’t perform that action at this time.