Class MapNavigation
- All Implemented Interfaces:
Serializable
A collection of options for zooming and panning in a map.
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for MapNavigation.MapNavigation(Boolean enabled) Constructor for MapNavigation. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldbuttonOptions.Getter for the fieldbuttons.Getter for the fieldenableButtons.Getter for the fieldenabled.Getter for the fieldenableDoubleClickZoom.Getter for the fieldenableDoubleClickZoomTo.Getter for the fieldenableMouseWheelZoom.Getter for the fieldenableTouchZoom.Getter for the fieldmouseWheelSensitivity.voidsetButtonOptions(ButtonOptions buttonOptions) General options for the map navigation buttons.voidsetButtons(MapNavigationButtons buttons) The individual buttons for the map navigation.voidsetEnableButtons(Boolean enableButtons) Whether to enable navigation buttons.voidsetEnabled(Boolean enabled) Whether to enable map navigation.voidsetEnableDoubleClickZoom(Boolean enableDoubleClickZoom) Enables zooming in on an area on double clicking in the map.voidsetEnableDoubleClickZoomTo(Boolean enableDoubleClickZoomTo) Whether to zoom in on an area when that area is double clicked.voidsetEnableMouseWheelZoom(Boolean enableMouseWheelZoom) Enables zooming by mouse wheel.voidsetEnableTouchZoom(Boolean enableTouchZoom) Whether to enable multitouch zooming.voidsetMouseWheelSensitivity(Number mouseWheelSensitivity) Sensitivity of mouse wheel or trackpad scrolling. 1 is no sensitivity, while with 2, one mousewheel delta will zoom in 50%.
-
Constructor Details
-
MapNavigation
public MapNavigation()Constructor for MapNavigation.
-
MapNavigation
Constructor for MapNavigation.
- Parameters:
enabled- aBooleanobject.
-
-
Method Details
-
getButtonOptions
Getter for the field
buttonOptions.- Returns:
- a
ButtonOptionsobject. - See Also:
-
setButtonOptions
General options for the map navigation buttons. Individual options can be given from the mapNavigation.buttons option set.- Parameters:
buttonOptions- aButtonOptionsobject.
-
getButtons
Getter for the field
buttons.- Returns:
- a
MapNavigationButtonsobject. - See Also:
-
getEnableButtons
Getter for the field
enableButtons.- Returns:
- a
Booleanobject. - See Also:
-
setEnableButtons
Whether to enable navigation buttons. By default it inherits the enabled setting.- Parameters:
enableButtons- aBooleanobject.
-
getEnableDoubleClickZoom
Getter for the field
enableDoubleClickZoom.- Returns:
- a
Booleanobject. - See Also:
-
setEnableDoubleClickZoom
Enables zooming in on an area on double clicking in the map. By default it inherits the enabled setting.- Parameters:
enableDoubleClickZoom- aBooleanobject.
-
getEnableDoubleClickZoomTo
Getter for the field
enableDoubleClickZoomTo.- Returns:
- a
Booleanobject. - See Also:
-
setEnableDoubleClickZoomTo
Whether to zoom in on an area when that area is double clicked.Defaults to: false
- Parameters:
enableDoubleClickZoomTo- aBooleanobject.
-
getEnableMouseWheelZoom
Getter for the field
enableMouseWheelZoom.- Returns:
- a
Booleanobject. - See Also:
-
setEnableMouseWheelZoom
Enables zooming by mouse wheel. By default it inherits the enabled setting.- Parameters:
enableMouseWheelZoom- aBooleanobject.
-
getEnableTouchZoom
Getter for the field
enableTouchZoom.- Returns:
- a
Booleanobject. - See Also:
-
setEnableTouchZoom
Whether to enable multitouch zooming. Note that if the chart covers the viewport, this prevents the user from using multitouch and touchdrag on the web page, so you should make sure the user is not trapped inside the chart. By default it inherits the enabled setting.- Parameters:
enableTouchZoom- aBooleanobject.
-
getEnabled
Getter for the field
enabled.- Returns:
- a
Booleanobject. - See Also:
-
setEnabled
Whether to enable map navigation. The default is not to enable navigation, as many choropleth maps are simple and don't need it. Additionally, when touch zoom and mousewheel zoom is enabled, it breaks the default behaviour of these interactions in the website, and the implementer should be aware of this.
Individual interactions can be enabled separately, namely buttons, multitouch zoom, double click zoom, double click zoom to element and mousewheel zoom.
Defaults to: false
- Parameters:
enabled- aBooleanobject.
-
getMouseWheelSensitivity
Getter for the field
mouseWheelSensitivity.- Returns:
- a
Numberobject. - See Also:
-
setMouseWheelSensitivity
Sensitivity of mouse wheel or trackpad scrolling. 1 is no sensitivity, while with 2, one mousewheel delta will zoom in 50%.Defaults to: 1.1
- Parameters:
mouseWheelSensitivity- aNumberobject.
-