Simple abstraction to work with SVG
based maps.
var map = new Map(svg);
map.colors("#0B486B", "#3B8686", "#79BD9A");
map.set('minas-gerais', 300);
map.set('sao-paulo', 500);
map.colorize();
document.body.appendChild(map.el);
Initialize Map
with given Document
.
Note: All paths must be named on your SVG
document through the id
attribute.
Set width
and height
dimensions.
Adds scale by given amount
to each path.
Set the attributes
for all paths.
Find path with given id
.
Set value
for key
.
Set range of colors.
Update fill
color of each path, animation disabled by default.
Draw on el
. Useful if you have changed colors or size values.
MIT