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.
Annotations not shown when Internet connection is down #3817
In iOS, if I kill the app, disable Internet connection, and reopen the app, the annotations are not shown anymore.
The map is shown (at least the portion that is cached), but the annotations are not.
Everything works fine with Internet connection.
Minimal Working Example:
override func viewDidLoad() {
super.viewDidLoad()
mapView = MGLMapView(frame: view.bounds)
mapView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
let center = CLLocationCoordinate2D(latitude: 38.894368, longitude: -77.036487)
mapView.setCenterCoordinate(center, zoomLevel: 15, animated: false)
view.addSubview(mapView)
let annotation = MGLPointAnnotation()
annotation.coordinate = center
mapView.addAnnotation(annotation)
}
I also tried with a custom image (stored locally): the function "mapView(mapView: MGLMapView, imageForAnnotation annotation: MGLAnnotation)" is called correctly (if I set self as the mapView delegate), but the annotation is not shown.
SymbolLayer needs to pass its own SpriteAtlas into needsDependencies, so that needsDependencies checks the annotation sprite store for loaded state rather than the style sprite store. This requires rejiggering SpriteStore and SpriteAtlas types a bit. (I continue to think those two should be merged.)
changed the title [-][ios] Annotations not shown when Internet connection is down[/-][+]Annotations not shown when Internet connection is down[/+]on Feb 12, 2016
I've just tried installing version 3.1.0 on iOS, and annotations (with local images) seem to show up fine for me, even if Internet connection is down.
I haven't tested it extensively, I just confirmed they show up in a minimal working example like the one I posted.
Activity
jfirebaugh commentedon Feb 12, 2016
SymbolLayerneeds to pass its ownSpriteAtlasintoneedsDependencies, so thatneedsDependencieschecks the annotation sprite store for loaded state rather than the style sprite store. This requires rejiggeringSpriteStoreandSpriteAtlastypes a bit. (I continue to think those two should be merged.)[-][ios] Annotations not shown when Internet connection is down[/-][+]Annotations not shown when Internet connection is down[/+]jfirebaugh commentedon Feb 12, 2016
Updated title / tags to reflect that this bug is not iOS specific.
ferrarop commentedon Feb 12, 2016
I've just tried installing version 3.1.0 on iOS, and annotations (with local images) seem to show up fine for me, even if Internet connection is down.
I haven't tested it extensively, I just confirmed they show up in a minimal working example like the one I posted.