Does anyone know how to add ids to g:path elements in a leaflet Version >= 0.7? This is a example found on leaflet's site. I want to add an ID to the polygons being rendered here.
I have tried this:
var svg = d3.select(map.getPanes().overlayPane).append("svg"),
g = svg.append("g").attr("id", "my_id");
And another question related to this was asked here: Leaflet path: how can I set a css class? And this question did not receive a correct answer. Does anyone have any ideas? It seems like a trivial thing i hate to ask the community about it, but i can't find a way to do it without completely ripping apart me existing code and rebuilding it with this.
Thank you in advance.