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组件获取实例之后,在实例中的对象marker上setAnimation(BMAP_ANIMATION_BOUNCE)不生效的问题 #82

Open
Loveapleace opened this issue Jun 17, 2024 · 2 comments

Comments

@Loveapleace
Copy link

No description provided.

@Loveapleace
Copy link
Author

class MapMarker extends React.Component {
  render(): React.ReactNode {
    return (
        <Marker
          position={{
            lng: Number(lng),
            lat: Number(lat),
            equals: undefined!
          }}
          icon={CommonIcon}
          map={undefined!}
          ref={(e) => this.markerRef(e)}
        />
    )
  }

  markerRef=(e: any) => {
      const marker: BMapGL.Marker = e.marker
      marker.setAnimation(BMAP_ANIMATION_BOUNCE)
    }
}

@Loveapleace
Copy link
Author

是否在setAnimation之后还有其他方法需要调用,或者还有其他可以实现标记点动画效果的吗?

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

1 participant