mapbox-plugins-android icon indicating copy to clipboard operation
mapbox-plugins-android copied to clipboard

Should `MarkerViewManager` implement a more 'reactive' camera listener ?

Open xseignard opened this issue 5 years ago • 2 comments

Hello, The MarkerViewManager implements the MapView.OnCameraDidChangeListener so updating a MarkerView is only updated after the camera did change, and not while the camera is changing.

The consequence of that is some sluggish MarkerView re-positioning after a camera move, as shown here: sluggish

I tried replacing MapView.OnCameraDidChangeListener by MapView.OnCameraIsChangeingListener and had no more updates ?!

I then tried using MapboxMap.OnCameraMoveListener with better results: okish https://imgur.com/ZNweZfQ

GPU usage is a tad high, that's why I'm not sending a PR.

Should MarkerViewManager implements a more 'reactive' camera listener ?

PS: on the above gifs, I'm using react-native with:

  • https://github.com/react-native-mapbox-gl/maps
  • and https://github.com/react-native-community/lottie-react-native for the animated orange markers

xseignard avatar Apr 20 '20 14:04 xseignard

Hi there! Any update ?

xseignard avatar Apr 29 '20 12:04 xseignard

Seems to be fixed by https://github.com/mapbox/mapbox-plugins-android/pull/1165

mfazekas avatar Sep 21 '21 13:09 mfazekas