Class GeoImage

java.lang.Object
io.jmix.mapsui.component.layer.GeoImage

public class GeoImage extends Object
An image which can be used in ImageLayer.

Encapsulates an image Resource.

  • Constructor Details

    • GeoImage

      public GeoImage(com.vaadin.server.Resource imageResource)
      Creates a geo-image using the given Resource.
  • Method Details

    • fromPath

      public static GeoImage fromPath(String path)
      Creates a geo-image using the given path.

      Path should start with one of the following prefixes: "file:", "classpath:", "theme:", "url:", which define the source of an image. The remaining part of the path specifies the actual location of an image in the given source. For example: "classpath:/com/company/demo/web/image.png".

    • fromFile

      public static GeoImage fromFile(File imageFile)
      Creates a geo-image using the image from file system.
    • fromClasspath

      public static GeoImage fromClasspath(String imagePath)
      Creates a geo-image using the image from classpath.

      For example: "/com/company/demo/web/image.png".

    • fromTheme

      public static GeoImage fromTheme(String imagePath)
      Creates a geo-image using the image from the current theme directory.

      For example: "awesomeFolder/image.png".

    • fromUrl

      public static GeoImage fromUrl(String imageUrl)
      Creates a geo-image using the image located at the given URL.
    • getImageResource

      public com.vaadin.server.Resource getImageResource()
      Returns an image resource.