Package-level declarations

Types

Link copied to clipboard
class CanvasRenderer(canvas: Canvas, pixelRatio: Float) : RendererFrontend
Link copied to clipboard
data class ClientOptions(val name: String = "MapLibre Native for JVM", val version: String = "TODO")

Configuration options for client identification. This is a simple data holder that identifies the client application.

Link copied to clipboard
Link copied to clipboard
class MapCanvas(mapObserver: MapObserver, mapOptions: MapOptions = MapOptions(), resourceOptions: ResourceOptions = ResourceOptions(), clientOptions: ClientOptions = ClientOptions(), onMapReady: (MapLibreMap, MapCanvas) -> Unit = { _, _ -> }) : Canvas

A Canvas that automatically initializes and manages a MapLibre map. This class encapsulates all the initialization logic and provides a callback when the map is ready for configuration.

Link copied to clipboard

Handles user interactions (mouse and keyboard) for a MapLibre map.

Link copied to clipboard
value class MapDebugOptions(val value: Int = 0)

Debug options for the map renderer. Each property represents a debug feature that can be enabled. Multiple options can be enabled simultaneously.

Link copied to clipboard
class MapLibreMap(frontend: RendererFrontend, observer: MapObserver, options: MapOptions, resourceOptions: ResourceOptions, clientOptions: ClientOptions)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface MapObserver
Link copied to clipboard
data class MapOptions(val mapMode: MapMode = MapMode.CONTINUOUS, val constrainMode: ConstrainMode = ConstrainMode.HEIGHT_ONLY, val viewportMode: ViewportMode = ViewportMode.DEFAULT, val crossSourceCollisions: Boolean = true, val northOrientation: NorthOrientation = NorthOrientation.UPWARDS, val size: Size = Size(64, 64), val pixelRatio: Float = 1.0f)

Configuration options for initializing a Map. This is a simple data holder that specifies various map settings.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class RenderFrameStatus(val mode: RenderMode, val needsRepaint: Boolean, val placementChanged: Boolean)
Link copied to clipboard
Link copied to clipboard
data class ResourceOptions(val apiKey: String = "", val tileServerOptions: TileServerOptions = TileServerOptions.DemoTiles, val cachePath: String = "maplibre-cache", val assetPath: String = "", val maximumCacheSize: Long = 50 * 1024 * 1024)
Link copied to clipboard
data class TileServerOptions(val baseURL: String = "https://api.mapbox.com", val uriSchemeAlias: String = "mapbox://", val apiKeyParameterName: String = "access_token", val requiresApiKey: Boolean = false, val sourceTemplate: TileServerTemplate = TileServerTemplate("https://api.mapbox.com"), val styleTemplate: TileServerTemplate = TileServerTemplate("/styles/v1/{user}/{style}"), val spritesTemplate: TileServerTemplate = TileServerTemplate("/styles/v1/{user}/{style}/sprite"), val glyphsTemplate: TileServerTemplate = TileServerTemplate("/fonts/v1/{user}/{fontstack}/{range}.pbf"), val tileTemplate: TileServerTemplate = TileServerTemplate("/v4/{tileset}/{z}/{x}/{y}{ratio}.{format}"), val defaultStyle: String = "")

Configuration for tile server endpoints and URL templates. This configures how MapLibre connects to map data providers.

Link copied to clipboard
data class TileServerTemplate(val template: String, val domainName: String = "", val versionPrefix: String? = null)
Link copied to clipboard