Interface Source.HasProjection

All Known Subinterfaces:
Source.HasSourceOptions
All Known Implementing Classes:
ImageStaticSource, ImageWmsSource, NoOpImageStaticSource, NoOpImageWmsSource, NoOpTileWmsSource, NoOpXyzSource, TileWmsSource, XyzSource
Enclosing class:
Source

public static interface Source.HasProjection
Interface to be implemented by sources that should provide projection management.

For more details see: Source docs

  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    setProjection(CRS projection)
    Sets the projection.
  • Method Details

    • getProjection

      CRS getProjection()
      Returns:
      projection or null if not set
    • setProjection

      void setProjection(CRS projection)
      Sets the projection. There are available two options:
      • CRS value - sets value as CRS constant, e.g. CRS.EPSG_4326 or as anonymous implementation, e.g. setProjection(() -> "EPSG:4326");.
      • Projection value - sets custom projection.
      If not set, default value is MapView projection.

      Note, projection attribute is set only at creation time and cannot be changed at runtime.

      For more details see: Source docs

      Parameters:
      projection - projection to set