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.

Can't find sprite named 'com.mapbox.sprites.USTATION' #2326

Closed

Description

@maciekish

Hi,
I'm returning UIImages to MapBox using the following method:

[MGLAnnotationImage annotationImageWithImage:[HITLocation imageForPOIType:location.poiType] reuseIdentifier:location.firstPOIString];

This works initially and displays subway entrances on the map. When i enable the real estate map which draws multiple polygons on the map the subway entrances disappear and the console log is spammed with the following message:

[INFO] {Worker}[Sprite]: Can't find sprite named 'com.mapbox.sprites.USTATION'

Is this a bug or am i doing it wrong? I'm currently at 8f37502.

Activity

  1. friedbunny commented on Sep 15, 2015

    @friedbunny
    Contributor

    I'm returning UIImages to MapBox using the following method:

    Are you using the reuse identifier or returning a new UIImage for each annotation? If the latter, here is the recommended flow which checks if the resource can be reused.

    When i enable the real estate map which draws multiple polygons on the map

    Is this a different style?

  2. maciekish commented on Sep 16, 2015

    @maciekish
    ContributorAuthor

    I was returning a new UIImage for each annotation but i just changed it to leverage the reuse mechanism MapBox is offering. I still get the error message and the annotations still disappear though.

    The real estate "map" is a bunch of shape annotations, but we do change the style (sorry).

    Here is what happens: http://s.swic.name/d7M6

    And here is my new code:

    HITLocation *location = (HITLocation *)self.response;
    NSString *identifier = location.firstPOIString;
    MGLAnnotationImage *annotationImage = [mapView dequeueReusableAnnotationImageWithIdentifier:identifier];
    
    if (!annotationImage) {
        annotationImage = [MGLAnnotationImage annotationImageWithImage:[HITLocation imageForPOIType:location.poiType] reuseIdentifier:identifier];
    }
    
    return annotationImage;
    

    imageForPOIType: uses location.firstPOIString internally so they always match up.

  3. kristfal commented on Sep 16, 2015

    @kristfal

    @friedbunny: we're seeing this issue ios-v2.1.2 both when following the reuse flow and when setting a new UIImage for each annotation.

    Annotations load correctly on initial launch of the app, but if the app is closed and reopened, all loaded annotations disappear. If I pan to a new area with a new annotation not loaded during the previous launch, this new annotation will show – only to disappear on the next app launch.

  4. friedbunny commented on Sep 16, 2015

    @friedbunny
    Contributor

    I wonder if this is a regression from #2289, @incanus?

  5. robipresotto commented on Sep 16, 2015

    @robipresotto

    +1

  6. added
    iOS
    on Sep 16, 2015
  7. incanus commented on Sep 17, 2015

    @incanus
    Contributor

    Changing the style as you do in your video sounds like it is actually triggering #1488, a known issue.

  8. maciekish commented on Sep 17, 2015

    @maciekish
    ContributorAuthor

    I forgot that we switch to satellite mode which is a different style, sorry!

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

    bugiOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions