Joining GeoJSON and JSON at client end for Choropleth Map in Leaflet

by Devils Dream   Last Updated March 25, 2018 10:22 AM

This is not a duplicate of This question because I need to join on client side.

I want to develop a choropleth map. I am using the same tutorial of Leaflet. I am also using the same statesData provided in that tutorial. The problem is value. I am getting an API which providing me the value of states. The 2nd JSON is providing me the id of states and its corresponding value. I want to visualize the choropleth map using these instead of Density value given in the statesData.js file.


How can I put this value to obtain a choropleth map instead of using density that showed in the tutorial.

Related Questions

Working with GeoJson in a leaflet?

Updated June 11, 2017 14:22 PM

Change opacity using leaflet without plugin

Updated November 13, 2017 18:22 PM