Interface MapModifyStateFunctions

All Superinterfaces:
ExecutableFunctions, Identifiable
All Known Implementing Classes:
LeafletMap

public interface MapModifyStateFunctions extends ExecutableFunctions
Methods for modifying map state
Since:
2020-02-06
Version:
1.1
Author:
Gabor Kokeny Email: kokeny19@gmail.com
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
    default void
    Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
    default void
    Sets a map view that mostly contains the whole world with the maximum zoom level possible.
    default void
    Sets a map view that mostly contains the whole world with the maximum zoom level possible.
    default void
    flyTo(LatLng latlng)
    Sets the view of the map (geographical center and zoom)
    default void
    flyTo(LatLng latlng, int zoom)
    Sets the view of the map (geographical center and zoom)
    default void
    flyTo(LatLng latlng, int zoom, PanOptions options)
    Sets the view of the map (geographical center and zoom) performing a smooth pan animation.
    default void
    flyTo(LatLng latlng, int zoom, ZoomOptions options)
    Sets the view of the map (geographical center and zoom) performing a smooth zoom animation.
    default void
    Sets the view of the map with a smooth animation like flyTo, but takes a bounds parameter like fitBounds.
    default void
    Sets the view of the map with a smooth animation like flyTo, but takes a bounds parameter like fitBounds.
    default void
    Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default.
    default void
    invalidateSize(boolean animate)
    Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default.
    default void
    Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default.
    default void
    Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default.
    default void
    panBy(Point offset)
    Pans the map by a given number of pixels (animated).
    default void
    panBy(Point offset, PanOptions options)
    Pans the map by a given number of pixels (animated).
    default void
    panInside(LatLng latlng)
    Pans the map the minimum amount to make the latlng visible.
    default void
    panInside(LatLng latlng, PanOptions options)
    Pans the map the minimum amount to make the latlng visible.
    default void
    Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.
    default void
    Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.
    default void
    panTo(LatLng latlng)
    Pans the map to a given center.
    default void
    panTo(LatLng latlng, PanOptions options)
    Pans the map to a given center.
    default void
    Restricts the map view to the given bounds (see the maxBounds option).
    default void
    setMaxZoom(int maxZoom)
    Sets the upper limit for the available zoom levels (see the maxZoom option).
    default void
    setMinZoom(int minZoom)
    Sets the lower limit for the available zoom levels (see the minZoom option).
    default void
    setView(LatLng center, int zoom)
    Sets the view of the map (geographical center and zoom)
    default void
    setView(LatLng center, int zoom, PanOptions options)
    Sets the view of the map (geographical center and zoom) with the given animation options.
    default void
    setView(LatLng center, int zoom, ZoomOptions options)
    Sets the view of the map (geographical center and zoom) with the given animation options.
    default void
    setZoom(int zoom)
    Sets the zoom of the map.
    default void
    setZoom(int zoom, PanOptions options)
    Sets the zoom of the map.
    default void
    setZoomAround(LatLng latlng, int zoom)
    Zooms the map while keeping a specified geographical point on the map stationary (e.g.
    default void
    setZoomAround(Point offset, int zoom, ZoomOptions options)
    Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
    default void
    Stops the currently running panTo or flyTo animation, if any.
    default void
    zoomIn(int delta)
    Increases the zoom of the map by delta (zoomDelta by default).
    default void
    zoomIn(int delta, ZoomOptions options)
    Increases the zoom of the map by delta (zoomDelta by default).
    default void
    zoomOut(int delta)
    Decreases the zoom of the map by delta (zoomDelta by default).
    default void
    zoomOut(int delta, ZoomOptions options)
    Decreases the zoom of the map by delta (zoomDelta by default).

    Methods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.map.functions.ExecutableFunctions

    call, call, executeJs, executeJs

    Methods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.Identifiable

    getUuid
  • Method Details

    • flyTo

      default void flyTo(LatLng latlng)
      Sets the view of the map (geographical center and zoom)
      Parameters:
      latlng - the new center coordiantes
    • flyTo

      default void flyTo(LatLng latlng, int zoom)
      Sets the view of the map (geographical center and zoom)
      Parameters:
      latlng - the new center coordiantes
      zoom - the new zoom level
    • flyTo

      default void flyTo(LatLng latlng, int zoom, PanOptions options)
      Sets the view of the map (geographical center and zoom) performing a smooth pan animation.
      Parameters:
      latlng - the new center coordiantes
      zoom - the new zoom level
      options - the pan animation options
    • flyTo

      default void flyTo(LatLng latlng, int zoom, ZoomOptions options)
      Sets the view of the map (geographical center and zoom) performing a smooth zoom animation.
      Parameters:
      latlng - the new center coordiantes
      zoom - the new zoom level
      options - the zoom animation options
    • panTo

      default void panTo(LatLng latlng)
      Pans the map to a given center.
      Parameters:
      latlng - pans the map to a given latlng.
    • panTo

      default void panTo(LatLng latlng, PanOptions options)
      Pans the map to a given center.
      Parameters:
      latlng - pans the map to a given latlng.
      options - the pan animation options
    • setView

      default void setView(LatLng center, int zoom)
      Sets the view of the map (geographical center and zoom)
      Parameters:
      center - the new center coordiantes
      zoom - the new zoom level
    • setView

      default void setView(LatLng center, int zoom, ZoomOptions options)
      Sets the view of the map (geographical center and zoom) with the given animation options.
      Parameters:
      center - the new center coordiantes
      zoom - the new zoom level
      options - the zoom animation options
    • setView

      default void setView(LatLng center, int zoom, PanOptions options)
      Sets the view of the map (geographical center and zoom) with the given animation options.
      Parameters:
      center - the new center coordiantes
      zoom - the new zoom level
      options - the pan animation options
    • setZoom

      default void setZoom(int zoom)
      Sets the zoom of the map.
      Parameters:
      zoom - the new zoom level
    • setZoom

      default void setZoom(int zoom, PanOptions options)
      Sets the zoom of the map.
      Parameters:
      zoom - the new zoom level
      options - the pan animation options
    • zoomIn

      default void zoomIn(int delta)
      Increases the zoom of the map by delta (zoomDelta by default).
      Parameters:
      delta - increases the zoom of the map by delta
    • zoomIn

      default void zoomIn(int delta, ZoomOptions options)
      Increases the zoom of the map by delta (zoomDelta by default).
      Parameters:
      delta - increases the zoom of the map by delta
      options - the zoom animation options
    • zoomOut

      default void zoomOut(int delta)
      Decreases the zoom of the map by delta (zoomDelta by default).
      Parameters:
      delta - decreases the zoom of the map by delta
    • zoomOut

      default void zoomOut(int delta, ZoomOptions options)
      Decreases the zoom of the map by delta (zoomDelta by default).
      Parameters:
      delta - decreases the zoom of the map by delta
      options - the pan animation options
    • setZoomAround

      default void setZoomAround(LatLng latlng, int zoom)
      Zooms the map while keeping a specified geographical point on the map stationary (e.g. used internally for scroll zoom and double-click zoom).
      Parameters:
      latlng - the geographical point
      zoom - the zoom level
    • setZoomAround

      default void setZoomAround(Point offset, int zoom, ZoomOptions options)
      Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
      Parameters:
      offset - the offset relative to the top-left corner
      zoom - the zoom level
      options - the zoom animation options
    • fitBounds

      default void fitBounds(LatLngBounds bounds)
      Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
      Parameters:
      bounds - the bounds
    • fitBounds

      default void fitBounds(LatLngBounds bounds, FitBoundsOptions options)
      Sets a map view that contains the given geographical bounds with the maximum zoom level possible.
      Parameters:
      bounds - the bounds
      options - the fit bounds options
    • fitWorld

      default void fitWorld()
      Sets a map view that mostly contains the whole world with the maximum zoom level possible.
    • fitWorld

      default void fitWorld(FitBoundsOptions options)
      Sets a map view that mostly contains the whole world with the maximum zoom level possible.
      Parameters:
      options - the fit bounds options
    • panBy

      default void panBy(Point offset)
      Pans the map by a given number of pixels (animated).
      Parameters:
      offset - number of pixels
    • panBy

      default void panBy(Point offset, PanOptions options)
      Pans the map by a given number of pixels (animated).
      Parameters:
      offset - number of pixels
      options - the pan options
    • flyToBounds

      default void flyToBounds(LatLngBounds bounds)
      Sets the view of the map with a smooth animation like flyTo, but takes a bounds parameter like fitBounds.
      Parameters:
      bounds - the bounds
    • flyToBounds

      default void flyToBounds(LatLngBounds bounds, FitBoundsOptions options)
      Sets the view of the map with a smooth animation like flyTo, but takes a bounds parameter like fitBounds.
      Parameters:
      bounds - the bounds
      options - the fit bounds options
    • setMaxBounds

      default void setMaxBounds(LatLngBounds bounds)
      Restricts the map view to the given bounds (see the maxBounds option).
      Parameters:
      bounds - the bounds
    • setMinZoom

      default void setMinZoom(int minZoom)
      Sets the lower limit for the available zoom levels (see the minZoom option).
      Parameters:
      minZoom - the lower limit for the available zoom levels
    • setMaxZoom

      default void setMaxZoom(int maxZoom)
      Sets the upper limit for the available zoom levels (see the maxZoom option).
      Parameters:
      maxZoom - the upper limit for the available zoom levels
    • panInsideBounds

      default void panInsideBounds(LatLngBounds bounds)
      Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.
      Parameters:
      bounds - the bounds
    • panInsideBounds

      default void panInsideBounds(LatLngBounds bounds, PanOptions options)
      Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.
      Parameters:
      bounds - the bounds
      options - the pan options
    • panInside

      default void panInside(LatLng latlng)
      Pans the map the minimum amount to make the latlng visible. Use padding, paddingTopLeft and paddingTopRight options to fit the display to more restricted bounds, like fitBounds. If latlng is already within the (optionally padded) display bounds, the map will not be panned.
      Parameters:
      latlng - the latlng
    • panInside

      default void panInside(LatLng latlng, PanOptions options)
      Pans the map the minimum amount to make the latlng visible. Use padding, paddingTopLeft and paddingTopRight options to fit the display to more restricted bounds, like fitBounds. If latlng is already within the (optionally padded) display bounds, the map will not be panned.
      Parameters:
      latlng - the latlng
      options - the pan options
    • invalidateSize

      default void invalidateSize()
      Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default. If options.pan is false, panning will not occur. If options.debounceMoveend is true, it will delay moveend event so that it doesn't happen often even if the method is called many times in a row.
    • invalidateSize

      default void invalidateSize(PanOptions options)
      Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default. If options.pan is false, panning will not occur. If options.debounceMoveend is true, it will delay moveend event so that it doesn't happen often even if the method is called many times in a row.
      Parameters:
      options - the pan options
    • invalidateSize

      default void invalidateSize(ZoomOptions options)
      Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default. If options.pan is false, panning will not occur. If options.debounceMoveend is true, it will delay moveend event so that it doesn't happen often even if the method is called many times in a row.
      Parameters:
      options - the zoom options
    • invalidateSize

      default void invalidateSize(boolean animate)
      Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default.
      Parameters:
      animate - set true to animating
    • stop

      default void stop()
      Stops the currently running panTo or flyTo animation, if any.