使用 MapLibre底图,新增marker 拖动报错
hehuasa opened this issue · comments
问题描述
使用 MapLibre底图,新增marker ,options 设置 draggable:true,
,进行marker拖动时,会报错。
跟了下报错信息:拖动时,代码 使用 e.lnglat
获取当前坐标,但是实际返回的 坐标对象名为 e.lngLat
;
重现链接
https://codesandbox.io/p/sandbox/l7-demo-forked-d5mgff?file=%2Findex.js%3A15%2C28
重现步骤
复现仓库见上方,最小复现步骤:
import { Scene, Marker } from "@antv/l7";
import { MapLibre } from "@antv/l7-maps";
const scene = new Scene({
id: "map",
map: new MapLibre({
pitch: 0,
style:
"https://api.maptiler.com/maps/3eb670bc-724c-46fc-adbc-48f2c5956bc8/style.json?key=mIkNLzkbhwfNopBXjt6d",
center: [121.435159, 31.256971],
zoom: 12,
}),
});
const marker = new Marker({ draggable: true }).setLnglat([
121.4316962, 31.26082325,
]);
scene.addMarker(marker);
预期行为
No response
平台
- 操作系统: Windows
- 网页浏览器: Chrome
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
收到 MapBox/Map 也有这个问题
Hello @hehuasa, We totally like your proposal/feedback. welcome to send us a Pull Request to solve this problem and contribute to the open source project. After submitting the code, please send a Pull Request to the master branch. We will review it and look forward to your contribution.
你好 @hehuasa,同意你的反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题,为开源项目贡献一份力量。提交代码后,请将 Pull Request 发到 master 分支,我们会进行 Review,期待您的贡献。
@antv/l7@2.22.0 已修复