Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations disappear when popped back to view #82

Closed
vitaminwater opened this issue Aug 27, 2015 · 5 comments
Closed

Annotations disappear when popped back to view #82

vitaminwater opened this issue Aug 27, 2015 · 5 comments

Comments

@vitaminwater
Copy link

When I have a view with a mapview, and I push another view on top of it with the navigator, if I pop back to the view containing the mapview, all annotations are gone.

Only thing I see in xcode's logs is: Can't find sprite named 'com.mapbox.sprites.marker0', 'marker0' being one the ids of my annotations.

@robipresotto
Copy link

+1

1 similar comment
@olofd
Copy link

olofd commented Sep 21, 2015

+1

@bsudekum
Copy link

Do you think you could make a sample like https://rnplay.org/apps/YmkqXg or put a little sample code here so I can check this bug out?

@olofd
Copy link

olofd commented Sep 21, 2015

@bsudekum The easiest way to recreate for me is to just rotate the device. canät do that on the playground it seams.

@olofd
Copy link

olofd commented Sep 21, 2015

It has something to do with the properties set in updateMap(). When I change the code in layoutSubViews to:

  • (void)layoutSubviews
    {
    NSLog(@"Layout subviews");
    if(_annotations.count == 0){
    [self updateMap];

    }
    _map.frame = self.bounds;
    }

The annotations stays after a device-rotation.

emerson233 pushed a commit to studyroz/react-native-mapbox-gl that referenced this issue Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants