Leaflet 将传单上的点转换为板条

Leaflet 将传单上的点转换为板条,leaflet,Leaflet,我正试图在地图上找到我的观点的正确位置,如: let point = L.point(0,0) // x=0,y=0 let latlng = map.unproject(point) 但是latlng值不是实际位置 我缺少什么?函数:unproject不正确 您应该使用:layerpointtolatng: let point = L.point(0,0); // x=0,y=0 let latlng = map.layerPointToLatLng(point); 问候 雷切尔

我正试图在地图上找到我的观点的正确位置,如:

let point = L.point(0,0) // x=0,y=0
let latlng = map.unproject(point)
但是
latlng
值不是实际位置


我缺少什么?

函数:
unproject
不正确

您应该使用:
layerpointtolatng

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

雷切尔