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

public interface MousewheelOptions extends Serializable
Leaflet map mouse wheel 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 rate at which a mouse wheel can fire, in milliseconds.
    double
    Returns how many scroll pixels mean a change of one full zoom level.
    boolean
    Returns whether the map can be zoomed by using the mouse wheel.
    void
    setScrollWheelZoom(boolean scrollWheelZoom)
    Whether the map can be zoomed by using the mouse wheel.
    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.
  • Method Details

    • isScrollWheelZoom

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

      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.
      Parameters:
      scrollWheelZoom - whether the map can be zoomed by using the mouse wheel
    • getWheelDebounceTime

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

      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.
      Parameters:
      wheelDebounceTime - he bounce time in milliseconds
    • getWheelPxPerZoomLevel

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

      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).
      Parameters:
      wheelPxPerZoomLevel - pixel per zoom level