Interface MapGetStateFunctions

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

public interface MapGetStateFunctions extends ExecutableFunctions
Methods for Getting Map State
Since:
2020-03-15
Version:
1.1
Author:
Gabor Kokeny Email: kokeny19@gmail.com
  • Method Details

    • getCenter

      default CompletableFuture<LatLng> getCenter()
      Returns the geographical center of the map view
      Returns:
      the geographical center of the map view
    • getZoom

      default CompletableFuture<Integer> getZoom()
      Returns the current zoom level of the map view
      Returns:
      the current zoom level of the map view
    • getBounds

      default CompletableFuture<LatLngBounds> getBounds()
      Returns the geographical bounds visible in the current map view
      Returns:
      the geographical bounds visible in the current map view
    • getMinZoom

      default CompletableFuture<Double> getMinZoom()
      Returns the minimum zoom level of the map (if set in the minZoom option of the map or of any layers), or 0 by default.
      Returns:
      the minimum zoom level of the map
    • getMaxZoom

      default CompletableFuture<Double> getMaxZoom()
      Returns the maximum zoom level of the map (if set in the maxZoom option of the map or of any layers).
      Returns:
      the maximum zoom level of the map
    • getBoundsZoom

      default CompletableFuture<Double> getBoundsZoom(LatLngBounds bounds, boolean inside, Point padding)
      Returns the maximum zoom level on which the given bounds fit to the map view in its entirety. If inside (optional) is set to true, the method instead returns the minimum zoom level on which the map view fits into the given bounds in its entirety.
      Parameters:
      bounds - the bounds
      inside - the inside
      padding - the padding
      Returns:
      the maximum zoom level on which the given bounds fit to the map view in its entirety
    • getSize

      default CompletableFuture<Point> getSize()
      Returns the current size of the map container (in pixels).
      Returns:
      the current size of the map container
    • getPixelBounds

      default CompletableFuture<Bounds> getPixelBounds()
      Returns the bounds of the current map view in projected pixel coordinates (sometimes useful in layer and overlay implementations).
      Returns:
      the bounds of the current map view
    • getPixelOrigin

      default CompletableFuture<Point> getPixelOrigin()
      Returns the projected pixel coordinates of the top left point of the map layer (useful in custom layer and overlay implementations).
      Returns:
      the projected pixel coordinates of the top left point of the map
    • getPixelWorldBounds

      default CompletableFuture<Bounds> getPixelWorldBounds(Double zoom)
      Returns the world's bounds in pixel coordinates for zoom level zoom. If zoom is omitted, the map's current zoom level is used.
      Parameters:
      zoom - the value of zoom level
      Returns:
      the world's bounds in pixel coordinates for zoom level zoom