All Implemented Interfaces:
Serializable, Evented, Identifiable, LayerPopupFunctions, LayerTooltipFunctions, ExecutableFunctions
Direct Known Subclasses:
Popup, Tooltip

public abstract class DivOverlay extends Layer
Base model for L.Popup and L.Tooltip. Inherit from it for custom popup like plugins.
Since:
2020-10-01
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Constructor Details

    • DivOverlay

      protected DivOverlay(String content)
      Creates a new overlay with the given HTML content.
      Parameters:
      content - the HTML content of the overlay
  • Method Details

    • getClassName

      public String getClassName()
      A custom CSS class name to assign to the overlay.
      Returns:
      the CSS class name to assign to the overlay.
    • setClassName

      public void setClassName(String className)
      Sets a custom CSS class name to assign to the overlay.
      Parameters:
      className - the CSS class name to assign to the overlay
    • getOffset

      public Point getOffset()
      The offset of the overlay position. Useful to control the anchor of the overlay when opening it on some overlays.
      Returns:
      the offset of the overlay position
    • setOffset

      public void setOffset(Point offset)
      Sets the offset of the overlay position. Useful to control the anchor of the overlay when opening it.
      Parameters:
      offset - the offset of the overlay position
    • getLatLng

      public CompletableFuture<LatLng> getLatLng()
      Returns the geographical point of popup.
      Returns:
      the geographical point of popup.
    • setLatLng

      public void setLatLng(LatLng latLng)
      Sets the geographical point where the overlay will open.
      Parameters:
      latLng - the geographical point where the overlay will open
    • getContent

      public String getContent()
      Returns the content of the overlay.
      Returns:
      the content of the overlay.
    • setContent

      public void setContent(String content)
      Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function.
      Parameters:
      content - the content of the overlay