I am working on a Leaflet webmap which receives a layer withs polygons from ESRI REST API.
I want to implement this: When the user clicks on a polygon a diagram shall pop up below the map. The diagram shall use the attributes of the polygon (in my case measurements of different years).
ID year1990 year1991 year1992 year1993 ...
1 -0.3 +2.2 -0.2 +0.5 ...
2 -4.3 -5 +6.8 +0.4 ...
I thought about transferring the polygon's attributes into a JSON and the visualize it with D3.js .
Does this makes sense to you? How would you solve this?
layer
property is the layer that has been clicked on. If the attributes you are looking for are available in the layer data, you can directly access them that way, and build your diagram.