-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] [android] Update marker position and icon #3885
[core] [android] Update marker position and icon #3885
Conversation
@socketbind |
Hi @tobrun, I'm still trying to make things even faster as my application does a lot of marker updates in a short time but I think the code included here could be appropriate for basic functionality (given that it is actually correct and the design is acceptable). |
Thanks for the contribution @socketbind. I've merged the core C++ parts of this in #3933 (using your initial implementation rather than the more complex version in 23c357a5b210c8d4a45d32c947009ead1e18a057) and added a test. Can you rebase the Android changes and squash then down to a single commit for @tobrun to do a final review? |
2088ac3
to
6f8e9b9
Compare
6f8e9b9
to
2088ac3
Compare
2088ac3
to
2620354
Compare
Rebased changes as requested (messed up the first rebase on these commits, you might have received some strange emails, sorry about that). I have also removed 23c357a as it turned out to be unreliable. Still, I would l love to improve performance somehow. I have been experimenting with batched updates (using a window of 100 ms on the Java side to save on JNI calls and applying changes first then issuing a single update call) but it only helped slightly, |
@socketbind, np, I have fixed the rebase issue and pushed with #3943. For the Android code I'm also going to add some tests in that PR. Will also add an example activity demonstrating this awesome feature. |
@socketbind b395302 landed with #3943. Thank you again for contributing! |
Hi,
This pull request enables updating a marker's position and icon in place without resorting to workarounds like removing and adding the marker. I have implemented this functionality because I needed it for an application that displays neighboring cards, traffic lights with animated marker icons.
As my C++ knowledge is a bit rusty the code might be a little bit crude. I would love to improve it to be more performant (it can get really slow with a lot of markers even on powerful devices) and make it so that it conforms better to your design principles, code quality.
Relates to #3775 (change marker icon without workarounds) but also adds option for changing position.