public interface

LocationSource

com.amazon.geo.mapsv2.LocationSource

Class Overview

Interface for replacing the map's built in location provider. The map activates this object when the "My Location" layer is enabled. While activated (between calls to activate(OnLocationChangedListener) and deactivate()), this object should provide location updates to be displayed on the map. It is the responsibility of the provider to register and unregister for location updates appropriately. See the Location Strategies API guide for details.

Summary

Nested Classes
interface LocationSource.OnLocationChangedListener An interface for receiving callbacks when the user's location changes. 
Public Methods
abstract void activate(LocationSource.OnLocationChangedListener listener)
Activate this LocationSource.
abstract void deactivate()
Deactivate this LocationSource.

Public Methods

public abstract void activate (LocationSource.OnLocationChangedListener listener)

Activate this LocationSource. After a call to activate, any location updates sent to the listener are displayed on the map.

Parameters
listener The listener to update with new locations.
Throws
IllegalArgumentException if listener is null.
IllegalStateException if this LocationSource is already active.

public abstract void deactivate ()

Deactivate this LocationSource. Called only after a call to activate(OnLocationChangedListener), when the "My Location" layer has been disabled.

Throws
IllegalStateException if this LocationSource has not been activated.