googlemaps / googlemaps/android-maps-compose

Compose GoogleMap without jank

Aperta
#141 17 commenti 16 reazioni 1 assegnatario Vedi su GitHub

@barbeau ci sta già lavorando.

Dal 9/6/2022.

priority: p3 type: feature request
Lingua principale
Kotlin
Stelle
1.3k
Fork
181
Merge medio
2g 23h
PR unite (30g)
18

Descrizione

Adding GoogleMap to the composition causes huge amounts of jank. The UI thread can be blocked on the order of seconds.

When incorporating MapView via AndroidView directly, a developer has some control and flexibility about working around MapView's jank issues upon initialization/loading. When incorporating GoogleMap via android-maps-compose, the library should offer options to reign in jank; I as a developer have less control over mitigating jank directly. Otherwise please point out jank mitigation strategies.

My jankiest use case displays GoogleMap in an accompanist HorizontalPager. Once GoogleMap enters the composition the pager stops in the middle of flipping through pages, for one or two seconds on emulator. The best mitigation I have found so far displays a "Loading...." page initially and waits with adding GoogleMap to the composition until the "Loading...." page is displayed with 0 horizontallOffset, meaning the user stopped flipping through pages to patiently stare at the "Loading...." screen. It sounds ridiculous, because it is. However, this way the jank is largely obscured.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.