-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Prevent flickering when adding/removing annotations #1688
Comments
I'm still noticing this for both adding & removing annotations. (iOS) |
@jfirebaugh Would you have time to look into this sometime, at least to scope the work required? |
This is pretty satisfactory right now. See #1798 (comment). |
Regarding comment about #1798 demo seemingly addressing flickering, made a PR to Justin's sample project to show the flickering is still there. See here: incanus/UISyncedMap#1 which just zooms out the map to show the entire user route. Ideal outcomes, as far as I'd see, besides just "make it faster" which could always still have a visible flicker on old hardware or with enough complex data:
|
This is what GL JS does currently, which is good enough for use cases like mouse-driven polylines etc. |
We're still experiencing issues with flickering for our use case. We are drawing a polyline of about 100 points, and are constantly removing it and redrawing it with each update, though require updating the polyline so often as we are changing only the last few points of the line. |
Going to have to move this from the current iOS milestone as it's non-blocking. |
Having the same problem here, my map markers show a different image based on live data (availability of bikes and spaces on a bicycle hire scheme) and the only way to change the image is to add/remove, which causes flicker when more than a couple of markers are visible. |
This will be a lot easier after #2617 has landed, it introduces updatable tiles. We have to refactor Annotations so that the tiles themselves remain, but only their content is updated. |
@jfirebaugh Does this relate to your annotation work and/or is it on the near-term roadmap now that #2617 has landed? |
This is a really nice fix. Already have happy feedback from users. Thanks. |
🎉 |
I'm really excited for this fix. What's the best way for me to get this for the iOS SDK? I've already been using the latest version @ 2.1.2 with Cocoapods. Will the pod be ready to be updated soon, or do I need to start using a custom fork? |
@mitchellporter It's possible to use the pod 'Mapbox-iOS-SDK', :podspec => 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/master/ios/Mapbox-iOS-SDK.podspec' |
More closely to the impending release, you could use |
@friedbunny @incanus Thanks guys. I've already noticed some things with the update, both good and bad. Would you prefer me to post here or create a separate issue specifically for iOS? |
I’d say flag any specific issues, indicating the version tested against, as we near release. |
Hi. I'm facing this issue in version 3.3.4. I'm drawing a tracking path on map, and before adding annotations I remove the old ones, and as result the path is blinking. How to fix this? |
I have the same issue as @euroboy when removing MGLPolyline and re-adding it it flickers. |
MGLPolyline (MGLMultipoint) has setCoodinates method. I think it dynamically updates its coordinates without removing/re-adding. |
@t-yoshii thanks. |
@zivlevy How about replaceCoordinates? I made a mistake... |
@t-yoshii - Yes, that removes the flickering. |
I can confirm that the method @t-yoshii suggests of using |
When adding a new annotation, tiles that contain this annotation are flickering because we are removing the tile, and parsing the new tile may still take a frame or two. Instead of removing the tile, we should reparse the tile and update the bucket as required.
The text was updated successfully, but these errors were encountered: