Enum Class LocationDisplay.AutoPanMode
- All Implemented Interfaces:
Serializable
,Comparable<LocationDisplay.AutoPanMode>
,Constable
- Enclosing class:
LocationDisplay
OFF
. All
modes show current location using a symbol, and update the location when location updates are received from the
LocationDataSource.- Since:
- 100.9.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBest suited for waypoint navigation when the user is on foot, the location symbol is fixed at a specific point on the screen, and always points towards the top edge of the device.Best suited for in-vehicle navigation, the location symbol is fixed at a specific point on the screen, and always points towards the top of the screen.The location symbol is shown at the current location, and is updated when location updates are received.Keeps the location symbol on-screen by re-centering the location symbol when it moves outside a 'wander extent'. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationDisplay.AutoPanMode
Returns the enum constant of this class with the specified name.static LocationDisplay.AutoPanMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OFF
The location symbol is shown at the current location, and is updated when location updates are received. The map center and scale is unchanged, no auto-panning is performed. Therefore, it is possible that the location symbol may eventually move off the screen as location updates are received. This is the default AutoPanMode of the LocationDisplay.- Since:
- 100.9.0
-
RECENTER
Keeps the location symbol on-screen by re-centering the location symbol when it moves outside a 'wander extent'. The location may move freely within the wander extent, but as soon as the location exits the wander extent, the MapView re-centers the map on the symbol. TheLocationDisplay.getDefaultSymbol()
is used to indicate device location.Wander extent is set as a factor of the MapView's extent. By default the wander extent factor is 0.5, which represents half the size of the extent, but you can change its value using LocationDisplay#setWanderExtentFactor.
If the visible map extent is changed by the user navigating the map interactively, or by a programmatic navigation method, this will cause AutoPanMode to be reset to OFF. However, if the user double-taps or pinches to zoom the map only, the AutoPanMode remains as RECENTER while the map is zoomed in or out, allowing users to easily zoom the map while in this mode.
- Since:
- 100.9.0
-
NAVIGATION
Best suited for in-vehicle navigation, the location symbol is fixed at a specific point on the screen, and always points towards the top of the screen. The MapView pans and rotates the map based on location updates and the direction the device is traveling in (as opposed to magnetic north in COMPASS_NAVIGATION mode). Therefore, the location symbol appears stationary and always pointing towards the top of the screen, while the map underneath it appears to be moving and rotating.The position of the location symbol relative to the bottom edge of the MapView is set as a factor of the MapView's height. By default, the symbol is displayed 1/8th of the distance up the MapView (factor of 0.125), but you can change this by calling
LocationDisplay.setNavigationPointHeightFactor(float)
.If the visible map extent is changed by the user navigating the map interactively, or by a programmatic navigation method, this will cause AutoPanMode to be reset to OFF. However, if the user double-taps or pinches to zoom the map only, the AutoPanMode remains as NAVIGATION while the map is zoomed in or out, allowing users to easily zoom the map while in this mode.
- Since:
- 100.9.0
-
COMPASS_NAVIGATION
Best suited for waypoint navigation when the user is on foot, the location symbol is fixed at a specific point on the screen, and always points towards the top edge of the device. The MapView pans and rotates the map based on location updates and the device's heading relative to magnetic north (as opposed to the direction of travel in NAVIGATION mode). The map reflects what lies ahead of the user as the user pivots around their location.The position of the location symbol relative to the bottom edge of the MapView is set as a factor of the MapView's height. By default, the symbol is displayed 1/8th of the distance up the MapView (factor of 0.125), but you can change this by calling
LocationDisplay.setNavigationPointHeightFactor(float)
.If the visible map extent is changed by the user navigating the map interactively, or by a programmatic navigation method, this will cause AutoPanMode to be reset to OFF. However, if the user double-taps or pinches to zoom the map only, the AutoPanMode remains as COMPASS_NAVIGATION while the map is zoomed in or out, allowing users to easily zoom the map while in this mode.
- Since:
- 100.9.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-