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.
If a MGLMapView fails to load (due to not being able to fetch the styles, usually for network reasons), is there a recommended way of trying again, other than unsetting and setting the styleURL?
If MGLMapView fails to load the style due to network issues, it uses Reachability to try again when the network connection comes back. Is that not working for you?
I've seen situations where I end up with a blank, black map, and no way of explicitly retrying. Temporary DNS outages, etc. It might be handy to have an explicit method to retry for situations Reachability can't cover?
Mostly for my own memory: to reproduce this, start a MGLMapView on a device in airplane mode, wait for it to log that the internet connection appears to be offline, and then disable airplane mode. The map doesn't attempt to load the style.
@1ec5 is this expected? I'd have thought Reachability would cover this.
Until this is fixed, the workaround is to set the style URL to a bogus local relative URL, such as [NSURL URLWithString:@"issue-1302"], then set it back to the original style URL.
Activity
1ec5 commentedon Nov 23, 2015
If MGLMapView fails to load the style due to network issues, it uses Reachability to try again when the network connection comes back. Is that not working for you?
tomtaylor commentedon Nov 23, 2015
I've seen situations where I end up with a blank, black map, and no way of explicitly retrying. Temporary DNS outages, etc. It might be handy to have an explicit method to retry for situations Reachability can't cover?
1ec5 commentedon Nov 23, 2015
A general-purpose reload method could be helpful, especially in light of the offline features that @incanus is working on for #584.
tomtaylor commentedon Nov 23, 2015
Mostly for my own memory: to reproduce this, start a
MGLMapViewon a device in airplane mode, wait for it to log that the internet connection appears to be offline, and then disable airplane mode. The map doesn't attempt to load the style.@1ec5 is this expected? I'd have thought Reachability would cover this.
1ec5 commentedon Jan 8, 2016
This simple API exists in the Mapbox OS X SDK and needs to be ported over to the iOS version.
1ec5 commentedon Jan 30, 2016
Until this is fixed, the workaround is to set the style URL to a bogus local relative URL, such as
[NSURL URLWithString:@"issue-1302"], then set it back to the original style URL.