-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clone WebImageLayer and WebElevationCoverage attributes.
- Loading branch information
1 parent
a7d9ec7
commit ca992db
Showing
16 changed files
with
165 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
worldwind/src/commonMain/kotlin/earth/worldwind/layer/mercator/WebMercatorImageLayer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package earth.worldwind.layer.mercator | ||
|
||
import earth.worldwind.layer.WebImageLayer | ||
|
||
class WebMercatorImageLayer( | ||
override val serviceAddress: String, | ||
override val imageFormat: String = "image/png", | ||
override val isTransparent: Boolean = false, | ||
name: String? = null, | ||
tiledSurfaceImage: MercatorTiledSurfaceImage? = null | ||
) : MercatorTiledImageLayer(name, tiledSurfaceImage), WebImageLayer { | ||
override val serviceType = SERVICE_TYPE | ||
|
||
override fun clone() = WebMercatorImageLayer( | ||
serviceAddress, imageFormat, isTransparent, displayName, tiledSurfaceImage?.clone() as? MercatorTiledSurfaceImage | ||
) | ||
|
||
companion object { | ||
const val SERVICE_TYPE = "XYZ" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
worldwind/src/commonMain/kotlin/earth/worldwind/ogc/WmsImageLayer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package earth.worldwind.ogc | ||
|
||
import earth.worldwind.layer.TiledImageLayer | ||
import earth.worldwind.layer.WebImageLayer | ||
import earth.worldwind.shape.TiledSurfaceImage | ||
|
||
class WmsImageLayer( | ||
override val serviceAddress: String, | ||
override val serviceMetadata: String, | ||
override val layerName: String, | ||
name: String? = null, | ||
tiledSurfaceImage: TiledSurfaceImage? = null | ||
) : TiledImageLayer(name, tiledSurfaceImage), WebImageLayer { | ||
override val serviceType = SERVICE_TYPE | ||
override val imageFormat get() = (tiledSurfaceImage?.tileFactory as? WmsTileFactory)?.imageFormat ?: "image/png" | ||
override val isTransparent get() = (tiledSurfaceImage?.tileFactory as? WmsTileFactory)?.isTransparent ?: true | ||
|
||
override fun clone() = WmsImageLayer( | ||
serviceAddress, serviceMetadata, layerName, displayName, tiledSurfaceImage?.clone() | ||
) | ||
|
||
companion object { | ||
const val SERVICE_TYPE = "WMS" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
worldwind/src/commonMain/kotlin/earth/worldwind/ogc/WmtsImageLayer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package earth.worldwind.ogc | ||
|
||
import earth.worldwind.layer.TiledImageLayer | ||
import earth.worldwind.layer.WebImageLayer | ||
import earth.worldwind.shape.TiledSurfaceImage | ||
|
||
class WmtsImageLayer( | ||
override val serviceAddress: String, | ||
override val serviceMetadata: String, | ||
override val layerName: String, | ||
name: String? = null, | ||
tiledSurfaceImage: TiledSurfaceImage? = null | ||
) : TiledImageLayer(name, tiledSurfaceImage), WebImageLayer { | ||
override val serviceType = SERVICE_TYPE | ||
override val imageFormat get() = (tiledSurfaceImage?.tileFactory as? WmtsTileFactory)?.imageFormat ?: "image/png" | ||
override val isTransparent = true // WMTS has no transparency data available | ||
|
||
override fun clone() = WmtsImageLayer( | ||
serviceAddress, serviceMetadata, layerName, displayName, tiledSurfaceImage?.clone() | ||
) | ||
|
||
companion object { | ||
const val SERVICE_TYPE = "WMTS" | ||
} | ||
} |
Oops, something went wrong.