mapbox / mapbox/mapbox-plugins-android

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

オープン
#1,115 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
242
フォーク
116
PR マージ指標
30日以内にマージされた PR はありません

説明

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](https://i.imgur.com/MfsZelV.gif)

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

I then tried using `MapboxMap.OnCameraMoveListener` with better results:
![okish](https://i.imgur.com/ZNweZfQ.gif)
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず MarkerViewManager とその MapView.OnCameraDidChangeListener の実装を特定し、その動作をレポートで言及されているカメラリスナーと比較します。リンクされている React Native と Lottie のセットアップでマーカーの再配置が遅い状態を再現します。許容できない GPU コストを発生させずに更新がより滑らかになれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, java
領域
mobile
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。