public class UserLocationMarkerManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
UserLocationMarkerManager.LocationAndAngleApplier
Interface for applying the location and angle to the marker.
|
static class |
UserLocationMarkerManager.MarkerMode
The interface for marker modes.
|
Modifier and Type | Method and Description |
---|---|
Marker |
getVisibleMarker()
Returns the currently displayed marker;
null if none. |
void |
resetToDefaultDirectionalMarker()
Resets the non-directional marker to the default one.
|
void |
resetToDefaultLocationApplier()
Resets to the default applier, which simply sets the location on the marker via
MapObjectBase.setPoint(LatLng) and the angle via MapObjectBase.setAngle(float) . |
void |
resetToDefaultNonDirectionalMarker()
Resets the non-directional marker to the default one.
|
void |
setDeviceDirectionSource(DeviceDirectionSource directionSource)
Sets the source for device direction.
|
void |
setDirectionalMarker(Marker marker)
Sets the marker to display when in
UserLocationMarkerManager.MarkerMode.DIRECTIONAL_MARKER_VISIBLE mode. |
void |
setLocationAndAngleApplier(UserLocationMarkerManager.LocationAndAngleApplier applier)
Sets the object responsible for applying the user locations and device direction to the user
location marker.
|
void |
setLocationSource(UserLocationSource locationSource)
Sets the source of user locations.
|
void |
setMarkerMode(UserLocationMarkerManager.MarkerMode markerMode)
Sets the mode of the user location marker.
|
void |
setNonDirectionalMarker(Marker marker)
Sets the marker to display when in
UserLocationMarkerManager.MarkerMode.NON_DIRECTIONAL_MARKER_VISIBLE mode. |
public void setLocationSource(UserLocationSource locationSource)
null
only while the marker mode is
UserLocationMarkerManager.MarkerMode.MARKER_HIDDEN
.public void setDeviceDirectionSource(DeviceDirectionSource directionSource)
null
only while the marker mode is
not UserLocationMarkerManager.MarkerMode.DIRECTIONAL_MARKER_VISIBLE
.public void setLocationAndAngleApplier(UserLocationMarkerManager.LocationAndAngleApplier applier)
UserLocationMarkerManager.resetToDefaultLocationApplier()
to use the default applier.public void resetToDefaultLocationApplier()
MapObjectBase.setPoint(LatLng)
and the angle via MapObjectBase.setAngle(float)
.public void setMarkerMode(UserLocationMarkerManager.MarkerMode markerMode)
UserLocationMarkerManager.MarkerMode.MARKER_HIDDEN
, you must first set a
non-null
user location source via UserLocationMarkerManager.setLocationSource(UserLocationSource)
.
Likewise, to use UserLocationMarkerManager.MarkerMode.DIRECTIONAL_MARKER_VISIBLE
, you must first set a
non-null
direction source via
UserLocationMarkerManager.setDeviceDirectionSource(DeviceDirectionSource)
public void setNonDirectionalMarker(Marker marker)
UserLocationMarkerManager.MarkerMode.NON_DIRECTIONAL_MARKER_VISIBLE
mode.
Use UserLocationMarkerManager.resetToDefaultNonDirectionalMarker()
to use the default one.public void resetToDefaultNonDirectionalMarker()
public void setDirectionalMarker(Marker marker)
UserLocationMarkerManager.MarkerMode.DIRECTIONAL_MARKER_VISIBLE
mode.
Use UserLocationMarkerManager.resetToDefaultDirectionalMarker()
to use the default one.public void resetToDefaultDirectionalMarker()
public Marker getVisibleMarker()
null
if none.