2
votes

I'm trying to get the right location of my point on the map as Latlng:

let point = L.point(0,0) // x=0,y=0
let latlng = map.unproject(point)

but the latlng value is not the real location!

what am i missing ?

1

1 Answers

7
votes

the function: unproject is not correct.

you should use: layerPointToLatLng:

let point = L.point(0,0); // x=0,y=0
let latlng = map.layerPointToLatLng(point);

regards

Rachel