mapbox / mapbox/mapbox-plugins-android

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

Open
#1,115 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
242
Forks
116
PR merge metrics
No merged PRs in 30d

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating MarkerViewManager and its MapView.OnCameraDidChangeListener implementation, then compare its behavior with the camera listeners mentioned in the report. Reproduce the sluggish marker repositioning with the linked React Native and Lottie setup; done means smoother updates without an unacceptable GPU cost.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.