且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

传单-标记未显示

更新时间:2023-12-05 21:14:22

显示的标记 ,但未在您期望的位置.

Your markers are shown, but not at the position you expect.

在Leaflet中,坐标顺序为[lat, lng],而在代码中已设置:

In Leaflet, the coordinates order is [lat, lng], whereas in your code you have set:

L.marker([data.long, data.lat])

实时演示: https://plnkr.co/edit/UC6io0jPh9HJVoDAgJS1?p=preview