Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 MapLibre底图,新增marker 拖动报错 #2487

Closed
hehuasa opened this issue May 20, 2024 · 3 comments
Closed

使用 MapLibre底图,新增marker 拖动报错 #2487

hehuasa opened this issue May 20, 2024 · 3 comments
Assignees
Labels
bug 这个是一个 bug help wanted issue 求助社区帮助解决

Comments

@hehuasa
Copy link

hehuasa commented May 20, 2024

问题描述

使用 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

@lvisei
Copy link
Member

lvisei commented May 21, 2024

收到 MapBox/Map 也有这个问题

@lvisei lvisei added bug 这个是一个 bug help wanted issue 求助社区帮助解决 labels May 21, 2024
Copy link
Contributor

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,期待您的贡献。

giphy

@lvisei
Copy link
Member

lvisei commented Jun 11, 2024

@antv/l7@2.22.0 已修复

@lvisei lvisei closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 这个是一个 bug help wanted issue 求助社区帮助解决
Projects
None yet
Development

No branches or pull requests

2 participants