Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapViewDidFinishLoadingMap and mapViewDidFinishRenderingMap MLNMapViewDelegate methods are not called in 6.10.0 #3202

Open
r3econ opened this issue Feb 7, 2025 · 0 comments

Comments

@r3econ
Copy link

r3econ commented Feb 7, 2025

MapLibre iOS Version

6.10.0

iOS Version

18.X.X

Device

iPhone 14, iPhone Simulators

What happened?

Some of the MLNMapViewDelegate methods are not being called.

Steps to reproduce

Scenario

  • iOS Swift UI app with 2 tabs. Each app has a separate MLNMapView view, separate delegates.
  • Style is set at runtime, not in init.
  • Delegates implement the following methods:
func mapViewWillStartLoadingMap(_ mapView: MLNMapView) {
  print("mapViewWillStartLoadingMap")
}

func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) {
  print("didFinishLoadingStyle")
}

func mapViewDidFinishLoadingMap(_ mapView: MLNMapView) {
  print("mapViewDidFinishLoadingMap")
}

func mapViewDidFinishRenderingMap(_ mapView: MLNMapView, fullyRendered: Bool) {
  print("mapViewDidFinishRenderingMap")
}

Test results

App starts, first tab is shown. All 4 delegate methods are called.

 func mapViewWillStartLoadingMap(_ mapView: MLNMapView)
 func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle)
 func mapViewDidFinishLoadingMap(_ mapView: MLNMapView)
 func mapViewDidFinishRenderingMap(_ mapView: MLNMapView, fullyRendered: Bool)

User switches to the second tab. Only 2 delegate methods are called.

 func mapViewWillStartLoadingMap(_ mapView: MLNMapView)
 func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle)
🔴 func mapViewDidFinishLoadingMap(_ mapView: MLNMapView)
🔴 func mapViewDidFinishRenderingMap(_ mapView: MLNMapView, fullyRendered: Bool)

The expected behaviour is that all 4 methods would be called again. This is a regression of #2993.

Relevant log output

Additional context

Downgrading to 6.6.0 fixes the issue. All 4 methods are called.

@r3econ r3econ changed the title mapViewDidFinishLoadingMap and mapViewDidFinishRenderingMap MLNMapViewDelegate methods are not called mapViewDidFinishLoadingMap and mapViewDidFinishRenderingMap MLNMapViewDelegate methods are not called in 6.10.0 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant