Interface MapView.OnReadyListener
Package com.here.sdk.mapview
Interface MapView.OnReadyListener
-
- Enclosing class:
- MapView
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface MapView.OnReadyListenerListener that gets notified when MapView is fully initialized and ready to handle all operations, which means that map scene is loaded and drawing surface is ready to render a map.
Whenever there is a need to call any map view related functions directly after the
Activityresumes,onMapViewReady()should be used for this purpose, as it guarantees that those operations will work. It is not recommended to call map view functionality directly fromActivity'sonResume().There are few typical moments in the lifecycle where it's useful to execute map view related operations:
- After map is shown for the very first time
- use
MapScene.LoadSceneCallbackthat is passed toMapScene.loadScene(MapScheme, MapScene.LoadSceneCallback). - After the Activity is resumed
- use
OnReadyListenerthat is registered from withinMapScene.LoadSceneCallbackthe first time map scene is loaded. - Every time the Activity is resumed, including after the map scene is first loaded
- this combines previous two cases. Use
OnReadyListenerthat is registered right after MapView is created, but before map scene is loaded.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonMapViewReady()Callback to be called when MapView is fully initialized and ready to handle all operations.
-