WmsLayer

open class WmsLayer @JvmOverloads constructor(displayName: String = "WMS Layer") : TiledImageLayer

Displays imagery from OGC Web Map Service (WMS) layers.
WMSLayer's configuration may be specified at construction or by calling setConfiguration, and must include the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
WmsLayer defaults to retrieving imagery in the PNG format. This may be configured by calling setImageFormat.

Inheritors

Constructors

Link copied to clipboard
constructor(displayName: String = "WMS Layer")
constructor(sector: Sector, metersPerPixel: Double, config: WmsLayerConfig, ellipsoid: Ellipsoid? = null)

Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.

Properties

Link copied to clipboard

Cache identity of this layer's tile source, or null when the layer isn't wired through a cache (network-only). Walks the layer's tile factory chain, looking for a CachedSourceInfoProvider — typically a CachedTileSource that wraps an IDB / gpkg / filesystem TileStore.

Link copied to clipboard
val count: Int
Link copied to clipboard
open override var displayName: String?
Link copied to clipboard
open override var isDynamic: Boolean
Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard
open override var maxActiveAltitude: Double
Link copied to clipboard
open override var minActiveAltitude: Double
Link copied to clipboard
open override var opacity: Float
Link copied to clipboard
Link copied to clipboard
val type: String?

Functions

Link copied to clipboard
Link copied to clipboard
fun addRenderable(renderable: Renderable)
fun addRenderable(index: Int, renderable: Renderable)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

One-stop accessor for "this image layer's content view." Lookup order:

Link copied to clipboard
Link copied to clipboard
open override fun getUserProperty(key: Any): Any?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
fun indexOfRenderable(renderable: Renderable): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open operator override fun iterator(): MutableIterator<Renderable>
Link copied to clipboard
fun TiledImageLayer.launchBulkRetrieval(sector: Sector, resolution: ClosedRange<Angle>, scope: CoroutineScope = GlobalScope, maxRetries: Int = 3, retryTimeoutShort: Duration = 5.seconds, retryTimeoutLong: Duration = 15.seconds, overrideCache: Boolean = false, onProgress: (downloaded: Long, skipped: Long, total: Long) -> Unit? = null): Job?

Download every tile within sector across the resolution range into the layer's underlying TileStore (when the layer was constructed with a CachedTileSource). Returns the launched Job for cancellation; returns null when the layer's tile factory isn't backed by a TileSourceFactoryAdapter (i.e. no source-based wiring, so bulk-via-source is impossible).

Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)
Link copied to clipboard
fun setConfiguration(sector: Sector, metersPerPixel: Double, config: WmsLayerConfig, ellipsoid: Ellipsoid? = null)

Specifies this Web Map Service (WMS) layer's configuration. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.

Link copied to clipboard
fun TiledImageLayer.setOfflineOnly(offlineOnly: Boolean = true)

Toggle the cache-only flag on a cache-attached layer or coverage.

Link copied to clipboard
fun setRenderable(index: Int, renderable: Renderable): Renderable