You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[android] Change marker icon without remove/add workaround #3775
I'm using your map with more or less 500 - 1k markers at a time. There are few types of icons. Some of them are just made from resources and cached, but I'm using clustering as well. That’s why many of them have to be created as a new Bitmap.
My issue is about changing marker icon during the runtime. On Github I saw this thread: #3146. Does it mean it would be possible to change icon on Android in different way than removing/changing/adding new marker? In fact this solution is problematic - it can take up to 1000ms and looks awful (tested on Nexus 4, Android 5.1). It blocks UI thread so despite the fact clustering is slow and setting different icons according to zoom doesn’t work smooth it affects another views (ex. animations). Actually even this code can take up to 200ms:
I have been actually working on this (+ the ability to set the position also) but my code is a bit crude (see referenced pull request). I would love to improve upon it and make this happen.
Activity
1ec5 commentedon Feb 4, 2016
The iOS SDK supports changing marker images without adding and removing markers (#3146, #3320).
-[MGLMapView annotationImageNeedsRedisplay:]should be ported to the Android SDK.socketbind commentedon Feb 10, 2016
Hi,
I have been actually working on this (+ the ability to set the position also) but my code is a bit crude (see referenced pull request). I would love to improve upon it and make this happen.
[android] #3943 #3775 #3885 - added sample feature activity + espress…