I am trying to learn how to use the Javascript leaflet library with d3 to create various map visualizations.
I followed this tutorial , which creates a choroid map of the United States with some interactivity. This provides some of what I need, but the main functionality that I want is to have a list of full / long coordinates, classified depending on which area they belong to.
This would mean, for example, on a textbook map, if I had a long lat value (55, -3) that fell into the state of the Arizona polygon, the program could classify this point as belonging to Arizona.
Is there a function in the library leaflet (or d3) that will allow me to enter the long lat coordinate as a parameter and return the name of the function to which it belongs? In the tutorial below, you can attach a function to each function using the onEveryFeature property, and you can trigger mouseover events when each function freezes. Of course, is there a way to extend this functionality to numeric data instead of mouse points?
Craig innes
source share