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

如何在marker drag后获取marker位置? #99

Closed
indexlang opened this issue Aug 6, 2019 · 1 comment
Closed

如何在marker drag后获取marker位置? #99

indexlang opened this issue Aug 6, 2019 · 1 comment

Comments

@indexlang
Copy link

No description provided.

@leftstick
Copy link
Owner

marker组件上实现loaded,拿到marker实例,然后通过marker实例监听dragend事件就好

<marker [point]="marker.point" [options]="marker.options" (loaded)="onLoad($event)" ></marker>

public onLoad(marker: BMarker): void {
    marker.addEventListener('dragend', e => {
      console.log(e) // e里就包含了:type, target, pixel, point
   })
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants