Skip to content

Bug: 鼠标事件不适配简单坐标系 #2721

Description

@wohenbushuang

官方案例的codesandbox打开后全都编译不了……


简单坐标系官方案例 的基础上,增加以下代码

    // 鼠标经纬度官方案例 https://l7.antv.antgroup.com/examples/component/control#mouselocation
    const mouseLocation = new MouseLocation({
      position: 'bottomright',
    });
    scene.addControl(mouseLocation);
    
    // https://l7.antv.antgroup.com/api/scene#鼠标事件
    scene.on('click', (e) => {
      console.log(e);
      alert("lngLat: " + e.lngLat);
      alert("point: x=" + e.point.x + " y=" + e.point.y);
    });

根据 https://l7.antv.antgroup.com/api/experiment/simple_coordinates#mapsize-number ,图片左下角平面坐标应该为 (0, 0),但获取到的还是经纬度,在简单坐标系下没有意义

Originally posted by @wohenbushuang in #2717

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions