Enum LocationDisplay.AutoPanMode

    • Enum Constant Detail

      • OFF

        public static final LocationDisplay.AutoPanMode 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.
      • RECENTER

        public static final LocationDisplay.AutoPanMode 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. The LocationDisplay.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(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 RECENTER while the map is zoomed in or out, allowing users to easily zoom the map while in this mode.

      • NAVIGATION

        public static final LocationDisplay.AutoPanMode 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.

      • COMPASS_NAVIGATION

        public static final LocationDisplay.AutoPanMode 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.

    • Method Detail

      • values

        public static LocationDisplay.AutoPanMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LocationDisplay.AutoPanMode c : LocationDisplay.AutoPanMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LocationDisplay.AutoPanMode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null