Open avanfeel opened 9 years ago
You can read this answer : either add metadata tag or use the 'addLayer' method if you generated your map with kartograph.py like :
var map = kartograph.map('#map', 600, 400);
map.loadMap('map.svg', function() {
map.addLayer('my_layer_name_defined_for_kartograph.py', {
styles: {
fill: 'blue',
stroke: 'red',
}
});
});
I get a "Uncaught TypeError: Cannot read property 'getAttribute' of undefined" error with this simple code:
var map = kartograph.map('#map', 600, 400);
map.loadMap('arg.svg', function() { // do something with your map, add layers etc. });