MapFragment
An Android fragment wrapping the TomTom MapView. This fragment handles a complete lifecycle of the underlying MapView. It can be instantiated either programmatically via MapFragment.newInstance(mapOptions: MapOptions) or via the XML view inflation. See MapResources to check what attributes can be configured via XML.
Functions
Sets a callback that will be triggered when the map instance is ready to use. The callback will be executed on the main thread. Note: You must call this method from the main thread. Otherwise an exception will be thrown.
Called on the fragment to instantiate its MapView. If there were some calls for getMapAsync(callback: OnMapReadyCallback), then the subscribed callbacks will be executed as soon as the MapView is created and the underlying TomTomMap is available.
This is called when the fragment's UI is created. This method parses the given attributes and sets the map options accordingly.
This handles the 'onSaveInstanceState' lifecycle event. It is called when the parent component saves its instance state. This stores the current state of the MapView component, ensuring that the state can be restored after a configuration change or other events that restart the component.
Properties
This represents the container view for any balloon markers on the map. When clicked, balloon markers typically show more information about a specific point on the map.
This represents the compass button on the map. This button provides a quick way for users to change the map to have a northern orientation.
This represents the button that shows the user's current location on the map.
This represents the adapter for the balloon views. The adapter determines how the content inside each balloon marker is displayed.
This represents the zoom controls on the map. These controls allow users to zoom in and out of the map view.