You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://www.bluemarblegeo.com/knowledgebase/global-mapper-21/Formats/World_Wind_Tiles.htm
hi mate, Whether to support and load offline tiles through the global mapper output web tiles format? i tried but file.exists always false.
global mapper When I choose to output web format, should I choose world wind tiles or TMS?
`
class Local2TitleLayer@JvmOverloads constructor(
serviceAddress: String = "https://worldwind25.arc.nasa.gov/wms"
): TiledImageLayer("Blue Marble & Landsat"), TileFactory {
private val blueMarbleTileFactory = WmsTileFactory(WmsLayerConfig(serviceAddress, "BlueMarble-200405").apply {
isTransparent = false // the BlueMarble layer is opaque
})
private val landsatTileFactory = WmsTileFactory(WmsLayerConfig(serviceAddress, "BlueMarble-200405,esat").apply {
isTransparent = false // combining BlueMarble and esat layers results in opaque images
})
init {
tiledSurfaceImage = TiledSurfaceImage(this, LevelSet(LevelSetConfig().apply {
// Configure this layer's level set to capture the entire globe at 15m resolution.
numLevels = numLevelsForResolution(15.0 / Ellipsoid.WGS84.semiMajorAxis)
})).apply {
// Reduce memory usage by using a 16-bit configuration with no alpha
imageOptions = ImageOptions(ImageConfig.RGB_565)
}
}
override fun createTile(sector: Sector, level: Level, row: Int, column: Int): Tile {
/*val radiansPerPixel = level.tileDelta.latitude.inRadians / level.tileHeight
val metersPerPixel = radiansPerPixel * Ellipsoid.WGS84.semiMajorAxis
// switch to Landsat at 2km resolution
return if (metersPerPixel < 2.0e3) landsatTileFactory.createTile(sector, level, row, column)
else blueMarbleTileFactory.createTile(sector, level, row, column)*/
val file = File(getTileFilePath(level, row, column))
Logger.logMessage(Logger.ERROR, "Local2TitleLayer", "createTile", "file.exists:${file.exists()} ${file.absolutePath}")
if (file.exists()) {
val imageTile = ImageTile(sector, level, row, column)
imageTile.imageSource = fromBitmap(BitmapFactory.decodeFile(file.absolutePath))
return imageTile
}
return blueMarbleTileFactory.createTile(sector, level, row, column)
}
private fun getTileFilePath(level: Level, row: Int, column: Int): String {
return baseUrl + "/" + level.levelNumber + "/" + row + "/" + row + "_" + column + ".jpg"
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
https://www.bluemarblegeo.com/knowledgebase/global-mapper-21/Formats/World_Wind_Tiles.htm
hi mate, Whether to support and load offline tiles through the global mapper output web tiles format? i tried but file.exists always false.
global mapper When I choose to output web format, should I choose world wind tiles or TMS?
`
class Local2TitleLayer@JvmOverloads constructor(
serviceAddress: String = "https://worldwind25.arc.nasa.gov/wms"
): TiledImageLayer("Blue Marble & Landsat"), TileFactory {
private val blueMarbleTileFactory = WmsTileFactory(WmsLayerConfig(serviceAddress, "BlueMarble-200405").apply {
isTransparent = false // the BlueMarble layer is opaque
})
private val landsatTileFactory = WmsTileFactory(WmsLayerConfig(serviceAddress, "BlueMarble-200405,esat").apply {
isTransparent = false // combining BlueMarble and esat layers results in opaque images
})
}
`
Beta Was this translation helpful? Give feedback.
All reactions