Open JesseCrocker opened 23 hours ago
Could you check if it's not just the Demotiles style?
In the last screenshot it shows the full detail loaded after zooming out and in, so it's not that style not having detail. The same repro steps also show the same problem with the BuildingLight example, and I'm also seeing this same issue in my app.
I'm seeing the same issue. Weird, I never noticed that before. hmm
I tried a few things to get the style to reload as a workaround, but no luck. It's almost like those tiles that failed to load offline are stuck or something.
I tried to follow the code where mbgl::NetworkStatus::Reachable();
is set, but didn't see/find a place where it actually fetches the current tiles being displayed in the current visible bounds (if they aren't in cache).
I also see one test TEST(OnlineFileSource, TEST_REQUIRES_SERVER(NetworkStatusChangePreempt))
in /test/storage/online_file_source.test.cpp
that might be related.
Oh yea, and I did verify kMLNReachabilityChangedNotification
is getting fired:
extension Notification.Name {
static let kMLNReachabilityChangedNotification = Notification.Name("kMLNReachabilityChangedNotification")
}
NotificationCenter.default.addObserver(self, selector: #selector(kittens), name: Notification.Name.kMLNReachabilityChangedNotification, object: nil)
@objc func kittens() {
print("Yep")
}
Could probably do something hacky to reload the map there... 🙀 but best to fix it right
Describe the bug According to the docs
but my testing indicates that this does not happen, either in my application or the sample app.
To Reproduce Steps to reproduce the behavior:
Expected behavior Tiles will load when device comes back online and full detail will show
Actual behavior Detail does not show
Screenshots WIfi off, zoom in
Wifi back on
Zoom out and in
Platform information (please complete the following information):
Additional context
I spent a few minutes debugging this in code, MLNMapView.reachabilityChanged does get called properly when connectivity changes, and mbgl::NetworkStatus::Reachable() is called properly when the network comes back online.