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.
Is there no way to restrict the area which the user is allowed to navigate around? Since when you use offline maps, and the user goes out of the area, it just crashes det app.
suspend is asynchronous, and one reason the pack would proceed to completion might be that the resources required by the pack are already in another pack or the ambient cache (as a result of viewing the region on the map. What shouldn't happen is additional requests to the server after you suspend the pack. If you monitor the network activity gauge in Xcode, do you see continued network activity after suspending?
Is there no way to restrict the area which the user is allowed to navigate around?
Currently you'd need to implement -[MGLMapViewDelegate mapViewRegionIsChanging:] and -[MGLMapView mapView:regionDidChangeAnimated:] to reset the center coordinate if it's out of the desired bounds. #2457 would make this much easier.
Since when you use offline maps, and the user goes out of the area, it just crashes det app.
I'm unaware of such a crash. Can you file a separate bug with the stack trace so we can diagnose and address that issue? Thanks!
The problem is that my code uses an UIViewController to display the progress, If I cancel the pack and go back and try to download a new pack, it has to wait for that pack to be finished or else the UI will not fit the correct pack. I've tried fixing this with removePack, but that just crashes with "cannot change update progress of an invalid pack"
Would it be possible for you to remove the pack from your UI as soon as you try to cancel it, regardless of whether it’s still going? The SDK supports simultaneous downloads, so the next pack should start going even if the previous one doesn’t appear to be stopping yet.
Thats the problem, it still calls the didChangeProgress etc, with the old pack. Meaning my UI not being sync with the correct pack, and actually showing progress from the pack I cancelled
As a workaround until #5538 is implemented, perhaps your view controller could keep track of which packs it has already attempted to suspend and ignore those updates.
Yes, the problem with that. Is that when I suspend it keeps running the progressdidchange. Mening if I dismiss the viewcontroller and load it again with the new pack. It just continues the old one that should be suspended
Activity
1ec5 commentedon Jul 1, 2016
suspendis asynchronous, and one reason the pack would proceed to completion might be that the resources required by the pack are already in another pack or the ambient cache (as a result of viewing the region on the map. What shouldn't happen is additional requests to the server after you suspend the pack. If you monitor the network activity gauge in Xcode, do you see continued network activity after suspending?Currently you'd need to implement
-[MGLMapViewDelegate mapViewRegionIsChanging:]and-[MGLMapView mapView:regionDidChangeAnimated:]to reset the center coordinate if it's out of the desired bounds. #2457 would make this much easier.I'm unaware of such a crash. Can you file a separate bug with the stack trace so we can diagnose and address that issue? Thanks!
madsodgaard commentedon Jul 4, 2016
The problem is that my code uses an UIViewController to display the progress, If I cancel the pack and go back and try to download a new pack, it has to wait for that pack to be finished or else the UI will not fit the correct pack. I've tried fixing this with removePack, but that just crashes with "cannot change update progress of an invalid pack"
1ec5 commentedon Jul 5, 2016
Would it be possible for you to remove the pack from your UI as soon as you try to cancel it, regardless of whether it’s still going? The SDK supports simultaneous downloads, so the next pack should start going even if the previous one doesn’t appear to be stopping yet.
madsodgaard commentedon Jul 5, 2016
Thats the problem, it still calls the didChangeProgress etc, with the old pack. Meaning my UI not being sync with the correct pack, and actually showing progress from the pack I cancelled
1ec5 commentedon Jul 5, 2016
As a workaround until #5538 is implemented, perhaps your view controller could keep track of which packs it has already attempted to suspend and ignore those updates.
madsodgaard commentedon Jul 6, 2016
Yes, the problem with that. Is that when I suspend it keeps running the progressdidchange. Mening if I dismiss the viewcontroller and load it again with the new pack. It just continues the old one that should be suspended
1ec5 commentedon Jul 6, 2016
OK, let's track the fix in #5538.