Class ImageLayer

java.lang.Object
io.jmix.mapsui.component.layer.RasterLayer
io.jmix.mapsui.component.layer.ImageLayer
All Implemented Interfaces:
Layer, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class ImageLayer extends RasterLayer
A layer displaying an image over specific bounds of a map.
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
  • Constructor Details

    • ImageLayer

      public ImageLayer(String id)
  • Method Details

    • getGeoImage

      public GeoImage getGeoImage()
      Returns a geo-image of the layer.
    • setGeoImage

      @StudioProperty(name="image", type=STRING) public void setGeoImage(GeoImage geoImage)
      Sets a geo-image of a layer.
    • getTopLeft

      public org.locationtech.jts.geom.Point getTopLeft()
      Returns the top left (NorthWest) point of an image.
    • setTopLeft

      public void setTopLeft(org.locationtech.jts.geom.Point topLeft)
      Sets the top left (NorthWest) point of an image.
    • getBottomRight

      public org.locationtech.jts.geom.Point getBottomRight()
      Returns the bottom right (SouthEast) point of an image.
    • setBottomRight

      public void setBottomRight(org.locationtech.jts.geom.Point bottomRight)
      Sets the bottom right (SouthEast) point of an image.
    • getGeoImageDelegate

      public Function<ImageLayer,GeoImage> getGeoImageDelegate()
      Returns a function which will be used to load geo-image of the layer.
    • setGeoImageDelegate

      public void setGeoImageDelegate(Function<ImageLayer,GeoImage> geoImageDelegate)
      Sets a function which will be used to load geo-image of the layer.

      If this function is specified along with geoImage, the geoImage will be ignored and this function will be used to obtain the image.

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setMaxZoom

      public void setMaxZoom(int maxZoom)
      Description copied from interface: Layer
      Sets maximum zoom level up to which the layer is visible (inclusive).
      Specified by:
      setMaxZoom in interface Layer
      Parameters:
      maxZoom - maximum layer zoom level
    • getMaxZoom

      public int getMaxZoom()
      Description copied from interface: Layer
      Returns maximum layer zoom level.
      Specified by:
      getMaxZoom in interface Layer
      Returns:
      maximum layer zoom level
    • setMinZoom

      public void setMinZoom(int minZoom)
      Description copied from interface: Layer
      Sets minimum zoom level down to which the layer is visible (inclusive).

      Default value: 0.

      Specified by:
      setMinZoom in interface Layer
      Parameters:
      minZoom - minimum layer zoom level
    • getMinZoom

      public int getMinZoom()
      Description copied from interface: Layer
      Returns minimum layer zoom level.
      Specified by:
      getMinZoom in interface Layer
      Returns:
      minimum layer zoom level
    • getId

      public String getId()
      Specified by:
      getId in interface Layer
      Returns:
      ID of a layer
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: Layer
      Sets whether the layer should be visible on a map.

      Default value: true.

      Specified by:
      setVisible in interface Layer
      Parameters:
      visible - true/false
    • isVisible

      public boolean isVisible()
      Description copied from interface: Layer
      Whether the layer is to be visible on a map.
      Specified by:
      isVisible in interface Layer
      Returns:
      true if the layer is set to be visible; otherwise false
    • setEditable

      public void setEditable(boolean editable)
      Description copied from interface: Layer
      Sets whether the layer is to be editable on a map.

      Default value: false.

      Specified by:
      setEditable in interface Layer
      Parameters:
      editable - true/false
    • isEditable

      public boolean isEditable()
      Description copied from interface: Layer
      Whether the layer is to be editable on a map.
      Specified by:
      isEditable in interface Layer
      Returns:
      true if the layer is set to be editable; otherwise false
    • fireLayerChangedEvent

      protected void fireLayerChangedEvent(LayerChangedEvent event)
    • refresh

      public void refresh()
      Description copied from interface: Layer
      Notify clients that the layer has changed and need to be redrawn.
      Specified by:
      refresh in interface Layer
    • toString

      public String toString()
      Overrides:
      toString in class Object