[core, darwin, android] Add onDidEnterIdle to MapObserver.
didEnterIdle fires whenever render completes and no repaint is scheduled.
This commit is contained in:
@@ -934,6 +934,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
- (void)mapViewDidEnterIdle {
|
||||
if (!_mbglMap) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ([self.delegate respondsToSelector:@selector(mapViewDidEnterIdle)]) {
|
||||
[self.delegate mapViewDidEnterIdle:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)mapViewDidFinishLoadingStyle {
|
||||
if (!_mbglMap) {
|
||||
return;
|
||||
@@ -3050,6 +3060,10 @@ public:
|
||||
bool fullyRendered = mode == mbgl::MapObserver::RenderMode::Full;
|
||||
[nativeView mapViewDidFinishRenderingMapFullyRendered:fullyRendered];
|
||||
}
|
||||
|
||||
void onDidEnterIdle() override {
|
||||
[nativeView mapViewDidEnterIdle];
|
||||
}
|
||||
|
||||
void onDidFinishLoadingStyle() override {
|
||||
[nativeView mapViewDidFinishLoadingStyle];
|
||||
|
||||
@@ -151,6 +151,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (void)mapViewDidFinishRenderingFrame:(MGLMapView *)mapView fullyRendered:(BOOL)fullyRendered;
|
||||
|
||||
/**
|
||||
Tells the delegate that the map view is entering an idle state, and no more
|
||||
drawing will be necessary until new data is loaded or there is some interaction
|
||||
with the map.
|
||||
|
||||
- No camera transitions are in progress
|
||||
- All currently requested tiles have loaded
|
||||
- All fade/transition animations have completed
|
||||
|
||||
@param mapView The map view that has just entered the idle state.
|
||||
*/
|
||||
- (void)mapViewDidEnterIdle:(MGLMapView *)mapView;
|
||||
|
||||
/**
|
||||
Tells the delegate that the map has just finished loading a style.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user