I cannot add symbols in my svg map.
This is the metadata of my svg:
<metadata><views>
<view h="720.449987754" padding="0" w="1400">
<proj flip="auto" id="robinson" lon0="-49.8982700875"/>
<bbox h="57.01" w="79.24" x="-771.91" y="435.26"/></view></views>
</metadata>
And this is the js code:
var points_of_interest = [
{ name: 'Florianopolis', lat: -27.60, lon: -48.55}
];
map.addSymbols({
type: kartograph.LabeledBubble,
data: points_of_interest,
location: function(d) { return [d.lon, d.lat] },
title: function(d) { return d.name; },
radius: 3,
center: false,
attrs: { fill: 'black' },
labelattrs: { 'font-size': 11 },
buffer: true
});
I don't know if the coordinates are wrong or the whole code is wrong.
Is there some way to get the coordinates from the path tags?
Someone can help me?
Searching for answers I found this question : Kartograph python script generates SVG with incorrect lat/long coords
Then, I realized that my svg map is with projection type robinson. In this projection the longitudes are different. The map was generated with kartograph py and I have not indicated in config.json what the projection type to use. I generated the svg again using projection 'laea' and now it's all ok.
=)