Interface PanningInteriaOptions

All Superinterfaces:
Serializable
All Known Subinterfaces:
MapOptions
All Known Implementing Classes:
DefaultMapOptions

public interface PanningInteriaOptions extends Serializable
Leaflet map panning interria options
Since:
2020-03-14
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
  • Method Summary

    Modifier and Type
    Method
    Description
    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 how solid the max bounds are when dragging the map around.
    boolean
    Returns whether panning of the map has an inertia effect.
    boolean
    Returns whether the map jumps back to the original "copy" of the world when panning across the antimeridian.
    void
    setEaseLinearity(double easeLinearity)
    Sets the easing linearity applied to inertial panning animations.
    void
    setInertia(boolean inertia)
    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
    setMaxBoundsViscosity(double maxBoundsViscosity)
    If maxBounds is set, this option will control how solid the bounds are when dragging the map around.
    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.
  • Method Details

    • isInertia

      boolean isInertia()
      Returns whether panning of the map has an inertia effect.
      Returns:
      true if panning inertia is enabled
    • setInertia

      void setInertia(boolean inertia)
      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.
      Parameters:
      inertia - If enabled, panning of the map will have an inertia effect where the map builds momentum while dragging
    • getInertiaDeceleration

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

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

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

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

      double getEaseLinearity()
      Returns the easing linearity applied to inertial panning animations.
      Returns:
      the ease linearity value
    • setEaseLinearity

      void setEaseLinearity(double easeLinearity)
      Sets the easing linearity applied to inertial panning animations.
      Parameters:
      easeLinearity - the ease linearity value
    • isWorldCopyJump

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

      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.
      Parameters:
      worldCopyJump - if true the map tracks when you pan to another "copy" of the world
    • getMaxBoundsViscosity

      double getMaxBoundsViscosity()
      Returns how solid the max bounds are when dragging the map around.
      Returns:
      the maximum bounds viscosity
    • setMaxBoundsViscosity

      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.
      Parameters:
      maxBoundsViscosity - the value of maximum bounds when dragging the map