mapbox / mapbox-plugins-android

Mapbox Android Plugins are a collection of libraries that extend our other SDKs, helping you design powerful mapping features while the plugins handle most of the heavy lifting.
https://www.mapbox.com/android-docs/plugins/overview/
BSD 2-Clause "Simplified" License
241 stars 120 forks source link

Improve MarkerView flick behavior #1165

Closed OttyLab closed 3 years ago

OttyLab commented 4 years ago

Background

MarkerView position is only updated withonCameraDidChange. When a user flicks the map, MarkerView keeps the position until the flick animation is finished as below. This behavior looks laggy from user point of view. before

Update

Call update() in onCameraIsChanging as well.

Result

after

OttyLab commented 4 years ago

@Chaoba Thanks! Sure, I'll do the test. BTW, do you have any metrics about performance? If no, then I'll just check if I can see a laggy behavior on some Android physical devices (Nexus 5 and Pixel 4a would be candidates)

Chaoba commented 4 years ago

@OttyLab AFAIK, we don't have any metrics for makerview.
Yes, please check on your device.

OttyLab commented 4 years ago

@Chaoba Here's the result of physical device test. If the device is not powerful, this update makes the animation a bit laggy. But it's not critical, I suppose.

Pixel 4a

w/o update

1000

o_1000

10000

o_10000

w/ update

1000

u_1000

10000

u_10000

Nexus 7

w/o update

1000

no_1000

w/ update

1000

nu_1000

g4rb4g3 commented 3 years ago

Could you guys please make a new release for MarkerViewPlugin too? The latest MarkerViewPlugin v0.4.0 release doesn't include this fix.