java.lang.Object
org.vaadin.addons.componentfactory.leaflet.layer.map.options.DefaultMapOptions
All Implemented Interfaces:
Serializable, Identifiable, AnimationOptions, ControlOptions, InteractionOptions, KeyboardNavigationOptions, MapOptions, MapStateOptions, MousewheelOptions, PanningInteriaOptions, TouchInteractionOptions

public class DefaultMapOptions extends Object implements MapOptions
Map options with leaflet default values
Since:
2020-03-06
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new set of map options initialized with the Leaflet default values and a randomly generated unique identifier.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the geographical bounds visible in the current map view
    Returns the initial geographic center of the map.
    double
    Returns the easing linearity applied to inertial panning animations.
    double
    Returns the rate with which the inertial movement slows down, in pixels/second².
    double
    Returns the maximum speed of the inertial movement, in pixels/second.
    double
    Returns the amount of pixels the map pans when pressing an arrow key.
    Returns the geographical bounds the map view is restricted to.
    double
    Returns how solid the max bounds are when dragging the map around.
    Returns the maximum zoom level of the map.
    Returns the minimum zoom level of the map.
    int
    Returns the max number of pixels a user can shift a finger during touch for it to still be considered a valid tap.
    Returns whether the map can be zoomed by touch-dragging with two fingers.
    double
    Returns the maximum size of a CSS translation transform.
    Returns the unique identifier of this object.
    double
    Returns the rate at which a mouse wheel can fire, in milliseconds.
    double
    Returns how many scroll pixels mean a change of one full zoom level.
    Returns the initial map zoom level.
    double
    Returns the zoom difference above which zoom will not be animated.
    double
    Returns how much the map's zoom level changes after a zoomIn(), zoomOut(), pressing + or - on the keyboard, or using the zoom controls.
    double
    Returns the value the map's zoom level is forced to be a multiple of.
    boolean
    Returns whether the default attribution control is added to the map.
    boolean
    Returns whether the map bounces back when pinch-zooming beyond the min/max zoom limits.
    boolean
    Returns whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing the shift key.
    boolean
    Returns whether popups are closed when the user clicks the map.
    boolean
    Returns whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift.
    boolean
    Returns whether the map is draggable with mouse/touch.
    boolean
    Returns whether the tile fade animation is enabled.
    boolean
    Returns whether panning of the map has an inertia effect.
    boolean
    Returns whether keyboard navigation of the map is enabled.
    boolean
    Returns whether markers animate their zoom with the zoom animation.
    boolean
    Returns whether Paths are rendered on a Canvas renderer instead of the default SVG renderer.
    boolean
    Returns whether the map can be zoomed by using the mouse wheel.
    boolean
    Returns whether the mobile tap hacks are enabled.
    boolean
    Returns whether the map automatically handles browser window resize to update itself.
    boolean
    Returns whether the map jumps back to the original "copy" of the world when panning across the antimeridian.
    boolean
    Returns whether the map zoom animation is enabled.
    boolean
    Returns whether the default zoom control is added to the map.
    void
    setAttributionControl(boolean attributionControl)
    Whether a attribution control is added to the map by default.
    void
    setBounceAtZoomLimits(boolean bounceAtZoomLimits)
    Set it to false if you don't want the map to zoom beyond min/max zoom and then bounce back when pinch-zooming.
    void
    Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
    void
    setBoxZoom(boolean boxZoom)
    Whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing the shift key.
    void
    setCenter(LatLng center)
    Initial geographic center of the map
    void
    setClosePopupOnClick(boolean closePopupOnClick)
    Set it to false if you don't want popups to close when user clicks the map.
    void
    setDoubleClickZoom(boolean doubleClickZoom)
    Whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift.
    void
    setDragging(boolean dragging)
    Whether the map be draggable with mouse/touch or not.
    void
    setEaseLinearity(double easeLinearity)
    Sets the easing linearity applied to inertial panning animations.
    void
    setFadeAnimation(boolean fadeAnimation)
    Whether the tile fade animation is enabled.
    void
    setInertia(boolean interia)
    If enabled, panning of the map will have an inertia effect where the map builds momentum while dragging and continues moving in the same direction for some time.
    void
    setInertiaDeceleration(double inertiaDeceleration)
    The rate with which the inertial movement slows down, in pixels/second².
    void
    setInertiaMaxSpeed(double inertiaMaxSpeed)
    Max speed of the inertial movement, in pixels/second.
    void
    setKeyboard(boolean keyboard)
    Makes the map focusable and allows users to navigate the map with keyboard arrows and +/- keys.
    void
    setKeyboardPanDelta(double keyboardPanDelta)
    Amount of pixels to pan when pressing an arrow key.
    void
    setMarkerZoomAnimation(boolean markerZoomAnimation)
    Whether markers animate their zoom with the zoom animation, if disabled they will disappear for the length of the animation.
    void
    When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back if the user tries to pan outside the view.
    void
    setMaxBoundsViscosity(double maxBoundsViscosity)
    If maxBounds is set, this option will control how solid the bounds are when dragging the map around.
    void
    Maximum zoom level of the map.
    void
    Minimum zoom level of the map.
    void
    setPreferCanvas(boolean preferCanvas)
    Whether Paths should be rendered on a Canvas renderer.
    void
    setScrollWheelZoom(boolean scrollWheelZoom)
    Whether the map can be zoomed by using the mouse wheel.
    void
    setTap(boolean tap)
    Enables mobile hacks for supporting instant taps (fixing 200ms click delay on iOS/Android) and touch holds (fired as contextmenu events).
    void
    setTaptolerance(int tapTolerance)
    The max number of pixels a user can shift his finger during touch for it to be considered a valid tap.
    void
    setTouchZoom(String touchZoom)
    Whether the map can be zoomed by touch-dragging with two fingers.
    void
    setTrackResize(boolean trackResize)
    Whether the map automatically handles browser window resize to update itself.
    void
    setTransform3DLimit(double transform3dLimit)
    Defines the maximum size of a CSS translation transform.
    void
    setWheelDebounceTime(double wheelDebounceTime)
    Limits the rate at which a wheel can fire (in milliseconds).
    void
    setWheelPxPerZoomLevel(double wheelPxPerZoomLevel)
    How many scroll pixels (as reported by L.DomEvent.getWheelDelta) mean a change of one full zoom level.
    void
    setWorldCopyJump(boolean worldCopyJump)
    With this option enabled, the map tracks when you pan to another "copy" of the world and seamlessly jumps to the original one so that all overlays like markers and vector layers are still visible.
    void
    Initial map zoom level
    void
    setZoomAnimation(boolean zoomAnimation)
    Whether the map zoom animation is enabled.
    void
    setZoomAnimationThreshold(double zoomAnimationThreshold)
    Won't animate zoom if the zoom difference exceeds this value.
    void
    setZoomControl(boolean zoomControl)
    Whether a zoom control is added to the map by default.
    void
    setZoomDelta(double zoomDelta)
    Controls how much the map's zoom level will change after a zoomIn(), zoomOut(), pressing + or - on the keyboard, or using the zoom controls.
    void
    setZoomSnap(double zoomSnap)
    Forces the map's zoom level to always be a multiple of this, particularly right after a fitBounds() or a pinch-zoom.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultMapOptions

      public DefaultMapOptions()
      Creates a new set of map options initialized with the Leaflet default values and a randomly generated unique identifier.
  • Method Details

    • getCenter

      public LatLng getCenter()
      Returns the initial geographic center of the map.
      Specified by:
      getCenter in interface MapStateOptions
      Returns:
      the geographic center of the map
    • setCenter

      public void setCenter(LatLng center)
      Initial geographic center of the map
      Specified by:
      setCenter in interface MapStateOptions
      Parameters:
      center - the intial center of the map
    • getZoom

      public Integer getZoom()
      Returns the initial map zoom level.
      Specified by:
      getZoom in interface MapStateOptions
      Returns:
      the initial map zoom level
    • setZoom

      public void setZoom(Integer zoom)
      Initial map zoom level
      Specified by:
      setZoom in interface MapStateOptions
      Parameters:
      zoom - the initial map zoom level
    • isZoomAnimation

      public boolean isZoomAnimation()
      Returns whether the map zoom animation is enabled.
      Specified by:
      isZoomAnimation in interface AnimationOptions
      Returns:
      true if the map zoom animation is enabled
    • setZoomAnimation

      public void setZoomAnimation(boolean zoomAnimation)
      Whether the map zoom animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android.
      Specified by:
      setZoomAnimation in interface AnimationOptions
      Parameters:
      zoomAnimation - whether the map zoom animation is enabled
    • getBounds

      public LatLngBounds getBounds()
      Returns the geographical bounds visible in the current map view
      Specified by:
      getBounds in interface MapStateOptions
      Returns:
      the geographical bounds of the map
    • setBounds

      public void setBounds(LatLngBounds bounds)
      Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
      Specified by:
      setBounds in interface MapStateOptions
      Parameters:
      bounds - the geographical bounds of the map
    • isPreferCanvas

      public boolean isPreferCanvas()
      Returns whether Paths are rendered on a Canvas renderer instead of the default SVG renderer.
      Specified by:
      isPreferCanvas in interface MapOptions
      Returns:
      true if Paths are rendered on a Canvas renderer
    • setPreferCanvas

      public void setPreferCanvas(boolean preferCanvas)
      Whether Paths should be rendered on a Canvas renderer. By default, all Paths are rendered in a SVG renderer.
      Specified by:
      setPreferCanvas in interface MapOptions
      Parameters:
      preferCanvas - whether Paths should be rendered on a Canvas renderer
    • getMinZoom

      public Integer getMinZoom()
      Returns the minimum zoom level of the map.
      Specified by:
      getMinZoom in interface MapStateOptions
      Returns:
      the minimum zoom level of the map
    • setMinZoom

      public void setMinZoom(Integer minZoom)
      Minimum zoom level of the map. If not specified and at least one GridLayer or TileLayer is in the map, the lowest of their minZoom options will be used instead.
      Specified by:
      setMinZoom in interface MapStateOptions
      Parameters:
      minZoom - the minimum zoom level of the map
    • getMaxZoom

      public Integer getMaxZoom()
      Returns the maximum zoom level of the map.
      Specified by:
      getMaxZoom in interface MapStateOptions
      Returns:
      the maximum zoom level of the map
    • setMaxZoom

      public void setMaxZoom(Integer maxZoom)
      Maximum zoom level of the map. If not specified and at least one GridLayer or TileLayer is in the map, the highest of their maxZoom options will be used instead.
      Specified by:
      setMaxZoom in interface MapStateOptions
      Parameters:
      maxZoom - the maximum zoom level of the map
    • isAttributionControl

      public boolean isAttributionControl()
      Returns whether the default attribution control is added to the map.
      Specified by:
      isAttributionControl in interface ControlOptions
      Returns:
      true if the default attribution control is added to the map
    • setAttributionControl

      public void setAttributionControl(boolean attributionControl)
      Whether a attribution control is added to the map by default.
      Specified by:
      setAttributionControl in interface ControlOptions
      Parameters:
      attributionControl - set false if yuo want to hide the default attribution control
    • isZoomControl

      public boolean isZoomControl()
      Returns whether the default zoom control is added to the map.
      Specified by:
      isZoomControl in interface ControlOptions
      Returns:
      true if the default zoom control is added to the map
    • setZoomControl

      public void setZoomControl(boolean zoomControl)
      Whether a zoom control is added to the map by default.
      Specified by:
      setZoomControl in interface ControlOptions
      Parameters:
      zoomControl - set false if yuo want to hide the default zoom control
    • getUuid

      public String getUuid()
      Returns the unique identifier of this object.
      Specified by:
      getUuid in interface Identifiable
      Returns:
      the UUID of this object
    • getMaxBounds

      public LatLngBounds getMaxBounds()
      Returns the geographical bounds the map view is restricted to.
      Specified by:
      getMaxBounds in interface MapStateOptions
      Returns:
      the maximum geographical bounds of the map view
    • setMaxBounds

      public void setMaxBounds(LatLngBounds maxBounds)
      When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back if the user tries to pan outside the view. To set the restriction dynamically, use setMaxBounds method.
      Specified by:
      setMaxBounds in interface MapStateOptions
      Parameters:
      maxBounds - restricts the view to the given bounds
    • isClosePopupOnClick

      public boolean isClosePopupOnClick()
      Returns whether popups are closed when the user clicks the map.
      Specified by:
      isClosePopupOnClick in interface InteractionOptions
      Returns:
      true if popups close when the user clicks the map
    • setClosePopupOnClick

      public void setClosePopupOnClick(boolean closePopupOnClick)
      Set it to false if you don't want popups to close when user clicks the map.
      Specified by:
      setClosePopupOnClick in interface InteractionOptions
      Parameters:
      closePopupOnClick - set to false if you don't want popups to close when user clicks the map
    • getZoomSnap

      public double getZoomSnap()
      Returns the value the map's zoom level is forced to be a multiple of.
      Specified by:
      getZoomSnap in interface InteractionOptions
      Returns:
      the zoom snap value
    • setZoomSnap

      public void setZoomSnap(double zoomSnap)
      Forces the map's zoom level to always be a multiple of this, particularly right after a fitBounds() or a pinch-zoom. By default, the zoom level snaps to the nearest integer; lower values (e.g. 0.5 or 0.1) allow for greater granularity. A value of 0 means the zoom level will not be snapped after fitBounds or a pinch-zoom.
      Specified by:
      setZoomSnap in interface InteractionOptions
      Parameters:
      zoomSnap - the value of zoom snap
    • getZoomDelta

      public double getZoomDelta()
      Returns how much the map's zoom level changes after a zoomIn(), zoomOut(), pressing + or - on the keyboard, or using the zoom controls.
      Specified by:
      getZoomDelta in interface InteractionOptions
      Returns:
      the zoom delta value
    • setZoomDelta

      public void setZoomDelta(double zoomDelta)
      Controls how much the map's zoom level will change after a zoomIn(), zoomOut(), pressing + or - on the keyboard, or using the zoom controls. Values smaller than 1 (e.g. 0.5) allow for greater granularity.
      Specified by:
      setZoomDelta in interface InteractionOptions
      Parameters:
      zoomDelta - the value how much the map's zoom level will change after a zoomIn(), zoomOut()
    • isTrackResize

      public boolean isTrackResize()
      Returns whether the map automatically handles browser window resize to update itself.
      Specified by:
      isTrackResize in interface InteractionOptions
      Returns:
      true if the map automatically handles browser window resize
    • setTrackResize

      public void setTrackResize(boolean trackResize)
      Whether the map automatically handles browser window resize to update itself.
      Specified by:
      setTrackResize in interface InteractionOptions
      Parameters:
      trackResize - if true automatically handles browser window resize
    • isBoxZoom

      public boolean isBoxZoom()
      Returns whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing the shift key.
      Specified by:
      isBoxZoom in interface InteractionOptions
      Returns:
      true if box (shift-drag) zoom is enabled
    • setBoxZoom

      public void setBoxZoom(boolean boxZoom)
      Whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing the shift key.
      Specified by:
      setBoxZoom in interface InteractionOptions
      Parameters:
      boxZoom - if true the map can be zoomed to a rectangular area specified by dragging
    • isDoubleClickZoom

      public boolean isDoubleClickZoom()
      Returns whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift.
      Specified by:
      isDoubleClickZoom in interface InteractionOptions
      Returns:
      true if double-click zoom is enabled
    • setDoubleClickZoom

      public void setDoubleClickZoom(boolean doubleClickZoom)
      Whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift. If passed 'center', double-click zoom will zoom to the center of the view regardless of where the mouse was.
      Specified by:
      setDoubleClickZoom in interface InteractionOptions
      Parameters:
      doubleClickZoom - if true the map can be zoomed in by double clicking
    • isDragging

      public boolean isDragging()
      Returns whether the map is draggable with mouse/touch.
      Specified by:
      isDragging in interface InteractionOptions
      Returns:
      true if the map is draggable
    • setDragging

      public void setDragging(boolean dragging)
      Whether the map be draggable with mouse/touch or not.
      Specified by:
      setDragging in interface InteractionOptions
      Parameters:
      dragging - if true the map will be draggable
    • isKeyboard

      public boolean isKeyboard()
      Returns whether keyboard navigation of the map is enabled.
      Specified by:
      isKeyboard in interface KeyboardNavigationOptions
      Returns:
      true if keyboard navigation is enabled
    • setKeyboard

      public void setKeyboard(boolean keyboard)
      Makes the map focusable and allows users to navigate the map with keyboard arrows and +/- keys.
      Specified by:
      setKeyboard in interface KeyboardNavigationOptions
      Parameters:
      keyboard - set true to enable keyboard navigation
    • getKeyboardPanDelta

      public double getKeyboardPanDelta()
      Returns the amount of pixels the map pans when pressing an arrow key.
      Specified by:
      getKeyboardPanDelta in interface KeyboardNavigationOptions
      Returns:
      the amount of pixels to pan when pressing an arrow key
    • setKeyboardPanDelta

      public void setKeyboardPanDelta(double keyboardPanDelta)
      Amount of pixels to pan when pressing an arrow key.
      Specified by:
      setKeyboardPanDelta in interface KeyboardNavigationOptions
      Parameters:
      keyboardPanDelta - amount of pixels
    • getZoomAnimationThreshold

      public double getZoomAnimationThreshold()
      Returns the zoom difference above which zoom will not be animated.
      Specified by:
      getZoomAnimationThreshold in interface AnimationOptions
      Returns:
      the maximum zoom difference that will still be animated
    • setZoomAnimationThreshold

      public void setZoomAnimationThreshold(double zoomAnimationThreshold)
      Won't animate zoom if the zoom difference exceeds this value.
      Specified by:
      setZoomAnimationThreshold in interface AnimationOptions
      Parameters:
      zoomAnimationThreshold - the max zoom animation difference
    • isFadeAnimation

      public boolean isFadeAnimation()
      Returns whether the tile fade animation is enabled.
      Specified by:
      isFadeAnimation in interface AnimationOptions
      Returns:
      true if the tile fade animation is enabled
    • setFadeAnimation

      public void setFadeAnimation(boolean fadeAnimation)
      Whether the tile fade animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android.
      Specified by:
      setFadeAnimation in interface AnimationOptions
      Parameters:
      fadeAnimation - if true the tile fade animation will be enabled
    • isMarkerZoomAnimation

      public boolean isMarkerZoomAnimation()
      Returns whether markers animate their zoom with the zoom animation.
      Specified by:
      isMarkerZoomAnimation in interface AnimationOptions
      Returns:
      true if markers animate their zoom with the zoom animation
    • setMarkerZoomAnimation

      public void setMarkerZoomAnimation(boolean markerZoomAnimation)
      Whether markers animate their zoom with the zoom animation, if disabled they will disappear for the length of the animation. By default it's enabled in all browsers that support CSS3 Transitions except Android.
      Specified by:
      setMarkerZoomAnimation in interface AnimationOptions
      Parameters:
      markerZoomAnimation - if true markers will animate their zoom with the zoom animation
    • getTransform3DLimit

      public double getTransform3DLimit()
      Returns the maximum size of a CSS translation transform.
      Specified by:
      getTransform3DLimit in interface AnimationOptions
      Returns:
      the maximum size of a CSS translation transform
    • setTransform3DLimit

      public void setTransform3DLimit(double transform3dLimit)
      Defines the maximum size of a CSS translation transform. The default value should not be changed unless a web browser positions layers in the wrong place after doing a large panBy.
      Specified by:
      setTransform3DLimit in interface AnimationOptions
      Parameters:
      transform3dLimit - the maximum size of a CSS translation transform
    • isTap

      public boolean isTap()
      Returns whether the mobile tap hacks are enabled.
      Specified by:
      isTap in interface TouchInteractionOptions
      Returns:
      true if the tap hacks are enabled
    • setTap

      public void setTap(boolean tap)
      Enables mobile hacks for supporting instant taps (fixing 200ms click delay on iOS/Android) and touch holds (fired as contextmenu events).
      Specified by:
      setTap in interface TouchInteractionOptions
      Parameters:
      tap - set to true if you want to enable the hack
    • getTapTolerance

      public int getTapTolerance()
      Returns the max number of pixels a user can shift a finger during touch for it to still be considered a valid tap.
      Specified by:
      getTapTolerance in interface TouchInteractionOptions
      Returns:
      the tap tolerance in pixels
    • setTaptolerance

      public void setTaptolerance(int tapTolerance)
      The max number of pixels a user can shift his finger during touch for it to be considered a valid tap.
      Specified by:
      setTaptolerance in interface TouchInteractionOptions
      Parameters:
      tapTolerance - The max number of pixels a user can shift his finger during touch
    • getTouchZoom

      public String getTouchZoom()
      Returns whether the map can be zoomed by touch-dragging with two fingers.
      Specified by:
      getTouchZoom in interface TouchInteractionOptions
      Returns:
      the touch zoom setting, or "center" to zoom to the center of the view
    • setTouchZoom

      public void setTouchZoom(String touchZoom)
      Whether the map can be zoomed by touch-dragging with two fingers. If passed 'center', it will zoom to the center of the view regardless of where the touch events (fingers) were. Enabled for touch-capable web browsers except for old Androids.
      Specified by:
      setTouchZoom in interface TouchInteractionOptions
      Parameters:
      touchZoom - Whether the map can be zoomed by touch-dragging with two fingers
    • isBounceAtZoomLimits

      public boolean isBounceAtZoomLimits()
      Returns whether the map bounces back when pinch-zooming beyond the min/max zoom limits.
      Specified by:
      isBounceAtZoomLimits in interface TouchInteractionOptions
      Returns:
      true if the map bounces at the zoom limits
    • setBounceAtZoomLimits

      public void setBounceAtZoomLimits(boolean bounceAtZoomLimits)
      Set it to false if you don't want the map to zoom beyond min/max zoom and then bounce back when pinch-zooming.
      Specified by:
      setBounceAtZoomLimits in interface TouchInteractionOptions
      Parameters:
      bounceAtZoomLimits - Set it to false if you don't want the map to zoom
    • isInertia

      public boolean isInertia()
      Returns whether panning of the map has an inertia effect.
      Specified by:
      isInertia in interface PanningInteriaOptions
      Returns:
      true if panning inertia is enabled
    • setInertia

      public void setInertia(boolean interia)
      If enabled, panning of the map will have an inertia effect where the map builds momentum while dragging and continues moving in the same direction for some time. Feels especially nice on touch devices. Enabled by default unless running on old Android devices.
      Specified by:
      setInertia in interface PanningInteriaOptions
      Parameters:
      interia - If enabled, panning of the map will have an inertia effect where the map builds momentum while dragging
    • getInertiaDeceleration

      public double getInertiaDeceleration()
      Returns the rate with which the inertial movement slows down, in pixels/second².
      Specified by:
      getInertiaDeceleration in interface PanningInteriaOptions
      Returns:
      the inertia deceleration
    • setInertiaDeceleration

      public void setInertiaDeceleration(double inertiaDeceleration)
      The rate with which the inertial movement slows down, in pixels/second².
      Specified by:
      setInertiaDeceleration in interface PanningInteriaOptions
      Parameters:
      inertiaDeceleration - the value of interial deceleration
    • getInertiaMaxSpeed

      public double getInertiaMaxSpeed()
      Returns the maximum speed of the inertial movement, in pixels/second.
      Specified by:
      getInertiaMaxSpeed in interface PanningInteriaOptions
      Returns:
      the maximum speed of the inertial movement
    • setInertiaMaxSpeed

      public void setInertiaMaxSpeed(double inertiaMaxSpeed)
      Max speed of the inertial movement, in pixels/second.
      Specified by:
      setInertiaMaxSpeed in interface PanningInteriaOptions
      Parameters:
      inertiaMaxSpeed - the max speed of interial movement
    • getEaseLinearity

      public double getEaseLinearity()
      Returns the easing linearity applied to inertial panning animations.
      Specified by:
      getEaseLinearity in interface PanningInteriaOptions
      Returns:
      the ease linearity value
    • setEaseLinearity

      public void setEaseLinearity(double easeLinearity)
      Sets the easing linearity applied to inertial panning animations.
      Specified by:
      setEaseLinearity in interface PanningInteriaOptions
      Parameters:
      easeLinearity - the ease linearity value
    • isWorldCopyJump

      public boolean isWorldCopyJump()
      Returns whether the map jumps back to the original "copy" of the world when panning across the antimeridian.
      Specified by:
      isWorldCopyJump in interface PanningInteriaOptions
      Returns:
      true if world copy jump is enabled
    • setWorldCopyJump

      public void setWorldCopyJump(boolean worldCopyJump)
      With this option enabled, the map tracks when you pan to another "copy" of the world and seamlessly jumps to the original one so that all overlays like markers and vector layers are still visible.
      Specified by:
      setWorldCopyJump in interface PanningInteriaOptions
      Parameters:
      worldCopyJump - if true the map tracks when you pan to another "copy" of the world
    • getMaxBoundsViscosity

      public double getMaxBoundsViscosity()
      Returns how solid the max bounds are when dragging the map around.
      Specified by:
      getMaxBoundsViscosity in interface PanningInteriaOptions
      Returns:
      the maximum bounds viscosity
    • setMaxBoundsViscosity

      public void setMaxBoundsViscosity(double maxBoundsViscosity)
      If maxBounds is set, this option will control how solid the bounds are when dragging the map around. The default value of 0.0 allows the user to drag outside the bounds at normal speed, higher values will slow down map dragging outside bounds, and 1.0 makes the bounds fully solid, preventing the user from dragging outside the bounds.
      Specified by:
      setMaxBoundsViscosity in interface PanningInteriaOptions
      Parameters:
      maxBoundsViscosity - the value of maximum bounds when dragging the map
    • isScrollWheelZoom

      public boolean isScrollWheelZoom()
      Returns whether the map can be zoomed by using the mouse wheel.
      Specified by:
      isScrollWheelZoom in interface MousewheelOptions
      Returns:
      true if mouse wheel zoom is enabled
    • setScrollWheelZoom

      public void setScrollWheelZoom(boolean scrollWheelZoom)
      Whether the map can be zoomed by using the mouse wheel. If passed 'center', it will zoom to the center of the view regardless of where the mouse was.
      Specified by:
      setScrollWheelZoom in interface MousewheelOptions
      Parameters:
      scrollWheelZoom - whether the map can be zoomed by using the mouse wheel
    • getWheelDebounceTime

      public double getWheelDebounceTime()
      Returns the rate at which a mouse wheel can fire, in milliseconds.
      Specified by:
      getWheelDebounceTime in interface MousewheelOptions
      Returns:
      the wheel debounce time in milliseconds
    • setWheelDebounceTime

      public void setWheelDebounceTime(double wheelDebounceTime)
      Limits the rate at which a wheel can fire (in milliseconds). By default user can't zoom via wheel more often than once per 40 ms.
      Specified by:
      setWheelDebounceTime in interface MousewheelOptions
      Parameters:
      wheelDebounceTime - he bounce time in milliseconds
    • getWheelPxPerZoomLevel

      public double getWheelPxPerZoomLevel()
      Returns how many scroll pixels mean a change of one full zoom level.
      Specified by:
      getWheelPxPerZoomLevel in interface MousewheelOptions
      Returns:
      the number of scroll pixels per zoom level
    • setWheelPxPerZoomLevel

      public void setWheelPxPerZoomLevel(double wheelPxPerZoomLevel)
      How many scroll pixels (as reported by L.DomEvent.getWheelDelta) mean a change of one full zoom level. Smaller values will make wheel-zooming faster (and vice versa).
      Specified by:
      setWheelPxPerZoomLevel in interface MousewheelOptions
      Parameters:
      wheelPxPerZoomLevel - pixel per zoom level