mapbox / mapbox/mapbox-maps-flutter
Custom Assets partially displayed
まだ誰も着手していません。
- 主要言語
- Dart
- スター
- 380
- フォーク
- 204
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Here is the issue :
When we need to use some custom assets to display some symbol in the map, then we first need to declare the asset in the style using
mapboxMap.style.addStyleImage(...)
When we want to update a layer with some new data, we use some code like that :
final GeoJsonSource source = await mapboxMap.style.getSource(symbolSourceId) as GeoJsonSource;
source.updateGeoJSON(geoJsonData);
Most of the time we declare the asset before we use them by calling updateGoeJson. Everything is fine.
But in case you want to Overwrite an asset data ( so push new data using an already existing id ) then the asset are correctly display on the map only if we zoom in/out . the currently display part of the map is not updating.
It works fine as soon as we call back the UpdateGeoJson. (but in case the geojson do not change, it's like only updating with the exact same data.)
My question is : Is it Expected ( for performance related topic ? ) or is it something that can be fixed ?
I would like to not force refresh my layer with the same data.
here is some pieces of code to play with (I simply created a new page in the sample app ):
and the result in a video:
1 - start the empty map - declare the first custom assets ( dark blue vehicle icon )
2 - click on the arrow floating button to generate some data to display
3 - click on the red bug floating button to Replace the custom assets by a new one ( mapBox icon asset )
4 - play with the zoom :
the icon asset change while playing with the zoom
5 - finally click on the arrow again to update the layer data and always get the mapbox asset.
https://github.com/mapbox/mapbox-maps-flutter/assets/24452432/e8a6b97b-b0f1-4d79-9b5c-b418f5cb1285
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue に記載されているサンプルアプリのページと添付された Debug.txt から始め、style.addStyleImage、getSource、updateGeoJSON を使ってシーケンスを再現します。既存のアセットを置き換えたときに、現在表示されているマップにどのような影響があるかを追跡します。ズームしたり変更されていない GeoJSON を送信したりせずに新しいアセットが表示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100