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.
Update SymbolAnnotation, only visible after zoom #8833
In the Android test app we have a Dynamic marker activity where we update a SymbolAnnotation geometry and icon. This activity has been in our app for a while and has recently regressed.
Expected behavior:
icon + geometry is updated and moved instantly / is visible.
Actual behavior:
The SymbolAnnotation only becomes visible after zooming.
@tobrun, I think its unfair for not sharing my use case as reference in #8718. I am working on a client project and one of the main features of the app is to add pins. Although this could have been done via Runtime styling, I can't as this is not the client wants, instead I am getting the bitmap required for the looks of the pin from a server so I load the icon as bitmap.
If I have say, 100-500 markers, and I clicked on one, I will replace the marker look to its selected state. I will call IconFactory#fromBitmap and assign the resulting icon to MarkerOption (MarkerViews are good but the performance is bad for a lot of markers in the screen). Do this multiple times and the next time I clicked a marker, it goes away (as if it was deleted). I now try to add new Marker, nothing happens. Debug the MapboxMap and you will see it did increase its marker list size by 1.
This goes away after I restarted the app or I started mapBox with limited pins on the screen. This is not noticeable if I have ~100 pins but continuous call to IconFactory#fromBitmap and assigning resulting icon, as it appears in my investigation, seem to cause the problem. I try not to call IconFactory#fromBitmap anywhere and I can add/remove pins as necessary using the default icon with 500+ pins.
I also done showing pins within 1km range from the center of camera so as to limit pins and also prevent user from spamming pins. I also place bitmaps in on-memory LRU cache and only loads bitmap if necessary. My app hovers around ~40mb on RAM. I don't know how much I can stretch this to prevent this from happening.
The issue in OP will be resolved with #8954. @neonwarge04 apologies if you feel your use-case wasn't heard. I will look into before closing this issue though it seems to be from a different source as the issue in OP.
Activity
galacticappster04 commentedon May 4, 2017
@tobrun, I think its unfair for not sharing my use case as reference in #8718. I am working on a client project and one of the main features of the app is to add pins. Although this could have been done via Runtime styling, I can't as this is not the client wants, instead I am getting the bitmap required for the looks of the pin from a server so I load the icon as bitmap.
If I have say, 100-500 markers, and I clicked on one, I will replace the marker look to its selected state. I will call
IconFactory#fromBitmapand assign the resulting icon toMarkerOption(MarkerViews are good but the performance is bad for a lot of markers in the screen). Do this multiple times and the next time I clicked a marker, it goes away (as if it was deleted). I now try to add new Marker, nothing happens. Debug theMapboxMapand you will see it did increase its marker list size by 1.This goes away after I restarted the app or I started mapBox with limited pins on the screen. This is not noticeable if I have ~100 pins but continuous call to
IconFactory#fromBitmapand assigning resulting icon, as it appears in my investigation, seem to cause the problem. I try not to callIconFactory#fromBitmapanywhere and I can add/remove pins as necessary using the default icon with 500+ pins.I also done showing pins within 1km range from the center of camera so as to limit pins and also prevent user from spamming pins. I also place bitmaps in on-memory LRU cache and only loads bitmap if necessary. My app hovers around ~40mb on RAM. I don't know how much I can stretch this to prevent this from happening.
tobrun commentedon May 11, 2017
The issue in OP will be resolved with #8954. @neonwarge04 apologies if you feel your use-case wasn't heard. I will look into before closing this issue though it seems to be from a different source as the issue in OP.