How to convert a map location (lat, lng) pair to a screen position (x, y) pair in mapbox
问题 I am using mapbox javascript API to do some cool stuff on a map. Now I have a map location (latitude, longitude) pair and I want to set the view to this location then use javascript to simulate a click at this location. The problem is that I need to find out the screen position (x, y) pair of this location after setting the view. But how do I do that? It seems there is an API L.ICRS. I tried but it returned NaN for both x and y -- please check my example javascript codes below. var latlng =