Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Update SymbolAnnotation, only visible after zoom #8833

Closed

Description

@tobrun

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.

ezgif com-video-to-gif 45

Expected behavior:

icon + geometry is updated and moved instantly / is visible.

Actual behavior:

The SymbolAnnotation only becomes visible after zooming.

Activity

  1. added
    Core
    on Apr 27, 2017
  2. added this to the android-v5.1.0 milestone on Apr 27, 2017
  3. galacticappster04 commented on May 4, 2017

    @galacticappster04

    @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.

  4. tobrun commented on May 11, 2017

    @tobrun
    MemberAuthor

    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.

  5. removed this from the android-v5.1.0 milestone on May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions