Package-level declarations

Types

Link copied to clipboard

Error for a loaded native library with an unsupported C ABI version. The status is Status.UNSUPPORTED.

Link copied to clipboard

A rendered frame that the caller holds to read or show.

Link copied to clipboard
data class AnchoredMomentum(val velocity: Double? = null, val anchor: ScreenPoint? = null, val decay: MomentumDecay = MomentumDecay(), val snap: MomentumSnap? = null)

How a gesture's zoom, bearing, or pitch keeps changing after release.

Link copied to clipboard

Borrowed JNI reference to an Android android.content.Context.

Link copied to clipboard
class AndroidHardwareBufferFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, buffer: NativePointer)

The Android hardware buffer of an acquired frame.

Link copied to clipboard
data class AndroidHardwareBufferRingDescriptor(val logicalSize: LogicalSize, val bufferCount: UInt, val usage: ULong)

A ring of Android hardware buffers that the library allocates, for MapHandle.attachAndroidHardwareBufferRing().

Link copied to clipboard

Borrowed JNI environment address for the current Android host thread.

Link copied to clipboard
data class AndroidSurfaceDescriptor(val logicalSize: LogicalSize, val window: NativePointer, val jniEnv: NativePointer, val surface: NativePointer)

An Android window to present to, for MapHandle.attachAndroidSurface().

Link copied to clipboard
data class AndroidSurfaceReplacement(val logicalSize: LogicalSize, val window: NativePointer, val jniEnv: NativePointer, val surface: NativePointer)

A new Android window for RenderSessionHandle.setAndroidSurfaceTarget().

Link copied to clipboard
data class AnimationOptions(val durationMs: Double? = null, val velocity: Double? = null, val minZoom: Double? = null, val easing: UnitBezier? = null, val transitionId: ULong? = null, val endHandler: CameraTransitionHandler = CameraTransitionHandler())

How a camera change animates.

Link copied to clipboard
interface AsyncReleasable

An owner whose native release completes asynchronously.

Link copied to clipboard
data class BoundOptions(val bounds: LatLngBounds? = null, val minZoom: Double? = null, val maxZoom: Double? = null, val minPitch: Double? = null, val maxPitch: Double? = null, val unbounded: Boolean = false)

Limits on the camera, for MapHandle.setBounds().

Link copied to clipboard
class CacheDatabaseOperation(val rawValue: UInt)

A maintenance action on a runtime's cache database.

Link copied to clipboard

Reports an exception that a native callback threw, which native cannot receive. Native receives the callback's failure value instead, and the binding hands this exception to the platform's handler for exceptions that no caller can receive.

Link copied to clipboard
data class Camera(val center: LatLng = LatLng(), val centerAltitude: Double = 0.0, val padding: EdgeInsets = EdgeInsets(), val zoom: Double = 0.0, val bearing: Double = 0.0, val pitch: Double = 0.0, val roll: Double = 0.0, val fieldOfView: Double = 0.0)

A map's whole camera.

Link copied to clipboard
data class CameraBounds(val bounds: LatLngBounds, val unbounded: Boolean, val minZoom: Double, val maxZoom: Double, val minPitch: Double, val maxPitch: Double)

All the limits on a map's camera.

Link copied to clipboard
class CameraChangeMode(val rawValue: UInt)

Whether a camera change jumps or animates.

Link copied to clipboard
class CameraChangeSource(val rawValue: UInt)

What moved the camera.

Link copied to clipboard
data class CameraDelta(val offset: ScreenPoint? = null, val scale: Double? = null, val bearing: Double? = null, val pitch: Double? = null, val anchor: ScreenPoint? = null, val momentum: GestureMomentum? = null, val animation: AnimationOptions = AnimationOptions(), val gesturePhase: GesturePhase = GesturePhase.NONE)

A change to the camera from where it is now, for gestures.

Link copied to clipboard
data class CameraFitOptions(val padding: EdgeInsets? = null, val bearing: Double? = null, val pitch: Double? = null)

Options for finding the camera that fits an area.

Link copied to clipboard
data class CameraFitUpdate(val mode: CameraUpdateMode = CameraUpdateMode.JUMP, val fit: CameraFitOptions = CameraFitOptions(), val animation: AnimationOptions = AnimationOptions())

A camera change that fits an area, for MapHandle.fitCameraToLatLngBounds() and the other fit commands.

Link copied to clipboard
data class CameraOptions(val center: LatLng? = null, val centerAltitude: Double? = null, val padding: EdgeInsets? = null, val anchor: ScreenPoint? = null, val zoom: Double? = null, val bearing: Double? = null, val pitch: Double? = null, val roll: Double? = null, val fieldOfView: Double? = null)

A camera, with only the members that fields selects.

Link copied to clipboard
data class CameraQueryResult(val generation: ULong, val camera: Camera)

A map's camera, with the snapshot generation that it matches.

Link copied to clipboard
data class CameraTransitionEnd(val outcome: CameraTransitionOutcome, val generation: ULong, val velocity: CameraVelocity)

The end of a camera change.

Link copied to clipboard

Receives the end of a camera change.

Link copied to clipboard
data class CameraTransitionHandler(val callback: CameraTransitionEndCallback? = null)

A callback for the end of a camera change, for AnimationOptions.

Link copied to clipboard
class CameraTransitionOutcome(val rawValue: UInt)

How a camera change ended.

Link copied to clipboard
data class CameraUpdate(val mode: CameraUpdateMode = CameraUpdateMode.JUMP, val camera: CameraOptions = CameraOptions(), val animation: AnimationOptions = AnimationOptions(), val gesturePhase: GesturePhase = GesturePhase.NONE)

A camera change for MapHandle.updateCamera().

Link copied to clipboard
class CameraUpdateMode(val rawValue: UInt)

How a camera command moves the camera.

Link copied to clipboard
data class CameraVelocity(val pan: ScreenPoint, val zoom: Double, val bearing: Double, val pitch: Double)

How fast each part of a camera change moves.

Link copied to clipboard
data class CanonicalTileId(val z: UInt, val x: UInt, val y: UInt)

A tile's zoom level z, column x, and row y, with row 0 at the north.

Link copied to clipboard
data class CommandCompletion(val generation: ULong, val renderUpdateGeneration: ULong)

The generations that one committed ordered command published.

Link copied to clipboard
expect class Completion<T>

The result of an asynchronous call, which the library completes once.

actual class Completion<T> : CompletableFuture<T>

The result of an asynchronous call, which the library completes once.

actual class Completion<T>

The result of an asynchronous call, which the library completes once.

actual class Completion<T>

The result of an asynchronous call, which the library completes once.

Link copied to clipboard
class ConstrainMode(val rawValue: UInt)

How the map keeps the camera within the world or within its bounds.

Link copied to clipboard
data class CustomGeometrySourceOptions(val minZoom: Double? = null, val maxZoom: Double? = null, val tolerance: Double? = null, val tileSize: UInt? = null, val buffer: UInt? = null, val clip: Boolean? = null, val wrap: Boolean? = null, val fetchTile: CustomSourceFetchTileCallback, val cancelTile: CustomSourceCancelTileCallback? = null)

The callbacks and options of a custom geometry source.

Link copied to clipboard

Reports that a custom source no longer needs a tile.

Link copied to clipboard

Asks for the data of a tile in a custom source.

Link copied to clipboard
data class CustomVectorSourceOptions(val minZoom: Double? = null, val maxZoom: Double? = null, val fetchTile: CustomSourceFetchTileCallback, val cancelTile: CustomSourceCancelTileCallback? = null)

The callbacks and options of a custom vector source.

Link copied to clipboard
data class DmaBufFormat(val fourcc: UInt, val modifier: ULong)

A DRM format and modifier that you can import.

Link copied to clipboard
class DmaBufFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, val fourcc: UInt, val modifier: ULong, planes: List<DmaBufPlane>)

The dmabuf of an acquired frame.

Link copied to clipboard
data class DmaBufPlane(val fd: Int, val offset: UInt, val stride: UInt)

Where one plane of a dmabuf keeps its data.

Link copied to clipboard
data class DmaBufRingDescriptor(val logicalSize: LogicalSize, val bufferCount: UInt, val formats: List<DmaBufFormat>)

A ring of dmabufs that the library allocates, for MapHandle.attachDmaBufRing().

Link copied to clipboard
class DxgiSharedTextureFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, val format: UInt, handle: NativePointer)

The DXGI shared texture of an acquired frame.

Link copied to clipboard
data class DxgiSharedTextureRingDescriptor(val logicalSize: LogicalSize, val textureCount: UInt)

A ring of DXGI shared textures that the library allocates, for MapHandle.attachDxgiSharedTextureRing().

Link copied to clipboard
data class EdgeInsets(val top: Double = 0.0, val left: Double = 0.0, val bottom: Double = 0.0, val right: Double = 0.0)

Distances in logical pixels from each edge of the map.

Link copied to clipboard
data class EglContextDescriptor(val display: NativePointer, val config: NativePointer, val shareContext: NativePointer, val clientApi: OpenGlClientApi = OpenGlClientApi.UNSPECIFIED, val getProcAddress: NativePointer)

The EGL objects that a render session makes its OpenGL context from.

Link copied to clipboard
sealed interface FeatureId

The ID of a feature in a source, as the source's data gives it.

Link copied to clipboard
data class FeatureStateSelector(val sourceId: String, val sourceLayerId: String = "", val featureId: FeatureId? = null, val stateKey: String = "")

The features whose state to set, read, or remove.

Link copied to clipboard
data class FrameDemand(val flags: FrameDemandFlag = FrameDemandFlag.NONE, val token: ULong)

A demand for one frame.

Link copied to clipboard
class FrameDemandFlag(val rawValue: UInt)

How a frame demand behaves.

Link copied to clipboard

Demands render sessions' frames at a display's refreshes.

Link copied to clipboard
data class FramePacerOptions(val maximumFramesPerSecond: UInt? = null)

Options for creating a frame pacer.

Link copied to clipboard
data class FreeCamera(val position: Vec3, val orientation: Quaternion)

A map camera's whole position and orientation in three dimensions.

Link copied to clipboard
data class FreeCameraOptions(val position: Vec3? = null, val orientation: Quaternion? = null)

The camera's position and orientation in three dimensions.

Link copied to clipboard
data class GeoJsonSourceOptions(val minZoom: Double? = null, val maxZoom: Double? = null, val tolerance: Double? = null, val clusterMaxZoom: Double? = null, val clusterProperties: String = "", val buffer: UInt? = null, val clusterRadius: UInt? = null, val clusterMinPoints: ULong? = null, val lineMetrics: Boolean? = null, val cluster: Boolean? = null)

Options for a GeoJSON [source](https://maplibre.org/maplibre-style-spec/sources/#geojson).

Link copied to clipboard
data class GestureMomentum(val pan: PanMomentum = PanMomentum(), val zoom: AnchoredMomentum = AnchoredMomentum(), val bearing: AnchoredMomentum = AnchoredMomentum(), val pitch: AnchoredMomentum = AnchoredMomentum())

How a gesture keeps moving the camera after the user lets go.

Link copied to clipboard
class GesturePhase(val rawValue: UInt)

Where a camera change falls in a gesture that the user makes.

Link copied to clipboard
class GpuSync(val kind: GpuSyncKind = GpuSyncKind.CPU_COMPLETE, handle: ULong, val value: ULong)

A point in GPU work that the other side waits for before using a texture.

Link copied to clipboard
class GpuSyncKind(val rawValue: UInt)

How one side waits for the other's GPU work on a shared texture.

Link copied to clipboard
class GpuSyncKindFlag(val rawValue: UInt)

A GPU sync kind, as a bit in a set.

Link copied to clipboard
data class HttpHeader(val name: String, val value: String = "")

An HTTP header.

Link copied to clipboard
data class HttpHeaderRule(val kinds: ResourceKindFlag = ResourceKindFlag.NONE, val flags: UrlMatchFlag = UrlMatchFlag.NONE, val url: String = "", val headers: List<HttpHeader> = emptyList())

Headers to add to the HTTP requests whose URL matches a pattern.

Link copied to clipboard
data class HttpHeaderTransform(val rules: List<HttpHeaderRule> = emptyList(), val callback: HttpHeaderTransformCallback? = null)

Headers to add to HTTP requests, for RuntimeHandle.setHttpHeaderTransform(). Kotlin/Wasm takes HttpHeaderTransformRules in its place.

Link copied to clipboard

Sets the headers of an HTTP request before the library sends it.

Link copied to clipboard

The headers that an HTTP header transform callback sets.

Link copied to clipboard
data class HttpHeaderTransformRules(val rules: List<HttpHeaderRule> = emptyList())

Headers to add to HTTP requests, for RuntimeHandle.setHttpHeaderTransform(). This is the Kotlin/Wasm form, which holds only native header rules, because the page cannot run Kotlin while native waits for an answer. The JVM, Android, and Kotlin/Native take HttpHeaderTransform.

Link copied to clipboard
data class ImageContent(val left: Float = 0.0f, val top: Float = 0.0f, val right: Float = 0.0f, val bottom: Float = 0.0f)

The area of an image, in image pixels, that text fits inside.

Link copied to clipboard
data class ImageStretch(val from: Float = 0.0f, val to: Float = 0.0f)

A range of image pixels, from from to to, that stretches to fit text.

Link copied to clipboard

A WebGPU object of the page, imported into the browser module by WebGraphics. Close it only after every session that names pointer has completed its detach or been destroyed: close releases the module's reference at once, and the JavaScript object stays usable.

Link copied to clipboard
class IoSurfaceFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, surface: NativePointer)

The IOSurface of an acquired frame.

Link copied to clipboard
data class IoSurfaceRingDescriptor(val logicalSize: LogicalSize, val bufferCount: UInt, val context: MetalContextDescriptor)

A ring of IOSurfaces that the library allocates, for MapHandle.attachIoSurfaceRing().

Link copied to clipboard
data class LatLng(val latitude: Double = 0.0, val longitude: Double = 0.0)

A geographic coordinate, in degrees.

Link copied to clipboard
data class LatLngBounds(val southwest: LatLng = LatLng(), val northeast: LatLng = LatLng())

A rectangle of coordinates, from its southwest to its northeast corner.

Link copied to clipboard
fun interface LogCallback

Receives a log message.

Link copied to clipboard
class LogEvent(val rawValue: UInt)

The part of the library that logged a message.

Link copied to clipboard
data class LogHandler(val platformSeverities: LogSeverityFlag = LogSeverityFlag.NONE, val callback: LogCallback)

A log callback, for setLogCallback().

Link copied to clipboard
data class LogicalExtent(val width: UInt, val height: UInt, val scaleFactor: Double = 0.0)

A size in logical pixels, and the physical pixels in each logical pixel.

Link copied to clipboard
data class LogicalExtentPhysicalSizeResult(val width: UInt, val height: UInt)
Link copied to clipboard
data class LogicalSize(val width: UInt, val height: UInt)

A size in logical pixels, which the map's scale factor turns into pixels.

Link copied to clipboard
class LogSeverity(val rawValue: UInt)

The severity of a log message.

Link copied to clipboard
class LogSeverityFlag(val rawValue: UInt)

A log severity, as a bit in a set.

Link copied to clipboard
class MapDebugFlag(val rawValue: UInt)

A debug overlay that the map draws.

Link copied to clipboard

The commands of a MapHandle that drop their completions.

Link copied to clipboard

A map, with its style and camera.

Link copied to clipboard

Error for a status that the native MapLibre C ABI reported, or that the binding raised.

Link copied to clipboard
class MapLoadError(val rawValue: UInt)

Why a map failed to load a style.

Link copied to clipboard
class MapMode(val rawValue: UInt)

When a map renders.

Link copied to clipboard
data class MapOptions(val initialExtent: LogicalExtent, val mapMode: MapMode = MapMode.CONTINUOUS, val fastPforEnabled: Boolean = false, val eventMask: RuntimeEventFlag? = null, val tileCacheEnabled: Boolean? = null)

Options for RuntimeHandle.createMap().

Link copied to clipboard
data class MapProjectionCameraResult(val camera: Camera)

A projection's camera, as MapProjectionHandle.getCamera() reports it.

Link copied to clipboard

A camera view for converting between screen points and coordinates.

Link copied to clipboard
data class MapSnapshot(val debugFlags: MapDebugFlag, val generation: ULong, val fullyLoaded: Boolean, val renderingStatsViewEnabled: Boolean, val gestureInProgress: Boolean, val transitionInProgress: Boolean, val eventMask: RuntimeEventFlag, val latestRenderUpdateGeneration: ULong, val tile: MapTileSettings, val bounds: CameraBounds, val freeCamera: FreeCamera, val view: MapView)

A map's state, as MapHandle.getSnapshot() reads it.

Link copied to clipboard
data class MapTileOptions(val prefetchZoomDelta: UInt? = null, val lodMinRadius: Double? = null, val lodScale: Double? = null, val lodPitchThreshold: Double? = null, val lodZoomShift: Double? = null, val lodMode: TileLodMode? = null)

How the map picks the tiles to load.

Link copied to clipboard
data class MapTileSettings(val prefetchZoomDelta: UInt, val lodMinRadius: Double, val lodScale: Double, val lodPitchThreshold: Double, val lodZoomShift: Double, val lodMode: TileLodMode)

All the settings for how a map picks the tiles to load.

Link copied to clipboard
data class MapView(val camera: Camera = Camera(), val extent: LogicalExtent = LogicalExtent(), val projectionMode: ProjectionMode = ProjectionMode(), val viewport: MapViewport = MapViewport())

One view of a map: its camera, size, and projection.

Link copied to clipboard
data class MapViewport(val northOrientation: NorthOrientation = NorthOrientation.UP, val constrainMode: ConstrainMode = ConstrainMode.NONE, val viewportMode: ViewportMode = ViewportMode.DEFAULT, val frustumOffset: EdgeInsets = EdgeInsets())

A map's whole viewport.

Link copied to clipboard
data class MapViewportOptions(val northOrientation: NorthOrientation? = null, val constrainMode: ConstrainMode? = null, val viewportMode: ViewportMode? = null, val frustumOffset: EdgeInsets? = null)

How the map orients and constrains its view.

Link copied to clipboard
data class MetalBorrowedTexture(val texture: NativePointer)

A Metal texture of a borrowed ring.

Link copied to clipboard
data class MetalBorrowedTextureDescriptor(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val textures: List<MetalBorrowedTexture>, val commandQueue: NativePointer)

A ring of your Metal textures, for MapHandle.attachMetalBorrowedTexture().

Link copied to clipboard
data class MetalBorrowedTextureReplacement(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val textures: List<MetalBorrowedTexture>)

New Metal textures for a borrowed ring, for RenderSessionHandle.setMetalBorrowedTextureTarget().

Link copied to clipboard
data class MetalContextDescriptor(val device: NativePointer)

The Metal device that a render session uses.

Link copied to clipboard
data class MetalSurfaceDescriptor(val logicalSize: LogicalSize, val context: MetalContextDescriptor, val layer: NativePointer)

A Metal layer to render to, for MapHandle.attachMetalSurface().

Link copied to clipboard
data class MetalSurfaceReplacement(val logicalSize: LogicalSize, val layer: NativePointer)

A new Metal layer for RenderSessionHandle.setMetalSurfaceTarget().

Link copied to clipboard
class MetalTextureFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, texture: NativePointer, device: NativePointer, val pixelFormat: ULong)

The Metal texture of an acquired frame.

Link copied to clipboard
data class MomentumDecay(val model: MomentumDecayModel? = null, val halfLifeMs: Double? = null, val stopSpeed: Double? = null, val distance: Double? = null, val durationMs: Double? = null, val easing: UnitBezier? = null, val minSpeed: Double? = null, val maxSpeed: Double? = null, val maxDistance: Double? = null)

How one part of a gesture's momentum slows from its release speed.

Link copied to clipboard
class MomentumDecayModel(val rawValue: UInt)

How a part of a gesture's momentum slows from its release speed.

Link copied to clipboard
data class MomentumSnap(val spacing: Double? = null, val offset: Double? = null, val tolerance: Double? = null, val durationMs: Double? = null)

Where a part settles after a gesture that changed it.

Link copied to clipboard

Opaque borrowed native address value used for backend interop handles.

Link copied to clipboard
class NetworkStatus(val rawValue: UInt)

Whether the library may use the network.

Link copied to clipboard
class NorthOrientation(val rawValue: UInt)

The screen direction that north points to when the bearing is 0.

Link copied to clipboard
data class OfflineGeometryRegionDefinition(val styleUrl: String = "", val geometry: String, val minZoom: Double = 0.0, val maxZoom: Double = 0.0, val pixelRatio: Float = 0.0f, val includeIdeographs: Boolean = false)

An offline region that covers a GeoJSON geometry.

Link copied to clipboard
sealed interface OfflineRegionDefinition

The area, zoom range, and style that an offline region covers.

Link copied to clipboard
class OfflineRegionDownloadState(val rawValue: UInt)

Whether an offline region is downloading.

Link copied to clipboard
data class OfflineRegionInfo(val id: Long, val definition: OfflineRegionDefinition, val metadata: ByteArray)

An offline region in the runtime's cache file.

Link copied to clipboard
data class OfflineRegionStatus(val downloadState: OfflineRegionDownloadState, val completedResourceCount: ULong, val completedResourceSize: ULong, val completedTileCount: ULong, val requiredTileCount: ULong, val completedTileSize: ULong, val requiredResourceCount: ULong, val requiredResourceCountIsPrecise: Boolean, val complete: Boolean)

The download progress of an offline region.

Link copied to clipboard
data class OfflineTilePyramidRegionDefinition(val styleUrl: String = "", val bounds: LatLngBounds = LatLngBounds(), val minZoom: Double = 0.0, val maxZoom: Double = 0.0, val pixelRatio: Float = 0.0f, val includeIdeographs: Boolean = false)

An offline region that covers a rectangle of the map.

Link copied to clipboard
data class OffscreenDescriptor(val logicalSize: LogicalSize)

The image that MapHandle.attachOffscreen() renders. The session renders it at the map's scale factor.

Link copied to clipboard

A GPU device that the library creates to render maps offscreen.

Link copied to clipboard
data class OffscreenDeviceOptions(val adapterIndex: UInt? = null, val singleContext: Boolean? = null, val clientApi: OpenGlClientApi? = null)

Options for OffscreenDeviceHandle.create().

Link copied to clipboard
data class OpenGlBorrowedTexture(val texture: UInt)

An OpenGL texture of a borrowed ring.

Link copied to clipboard
data class OpenGlBorrowedTextureDescriptor(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val context: OpenGlContextDescriptor, val textures: List<OpenGlBorrowedTexture>, val target: UInt)

A ring of your OpenGL textures, for MapHandle.attachOpenGlBorrowedTexture().

Link copied to clipboard
data class OpenGlBorrowedTextureReplacement(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val textures: List<OpenGlBorrowedTexture>)

New OpenGL textures for a borrowed ring, for RenderSessionHandle.setOpenGlBorrowedTextureTarget().

Link copied to clipboard
class OpenGlClientApi(val rawValue: UInt)

The OpenGL API that a context renders with.

Link copied to clipboard
data class OpenGlContextDescriptor(val ownership: OpenGlContextOwnership = OpenGlContextOwnership.SHARED, val data: OpenGlContextDescriptorData)

How a render session gets the OpenGL context that it renders with.

Link copied to clipboard

The WGL, EGL, or WebGL part of an OpenGL context descriptor.

Link copied to clipboard
class OpenGlContextOwnership(val rawValue: UInt)

Whether a render session's OpenGL context shares objects with yours.

Link copied to clipboard
class OpenGlContextProviderFlag(val rawValue: UInt)

An OpenGL context platform, as a bit in a set.

Link copied to clipboard
data class OpenGlSurfaceDescriptor(val logicalSize: LogicalSize, val context: OpenGlContextDescriptor, val surface: NativePointer)

An OpenGL surface to present to, for MapHandle.attachOpenGlSurface().

Link copied to clipboard
data class OpenGlSurfaceReplacement(val logicalSize: LogicalSize, val surface: NativePointer)

A new OpenGL surface for RenderSessionHandle.setOpenGlSurfaceTarget().

Link copied to clipboard
class OpenGlTextureFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, texture: UInt, val target: UInt)

The OpenGL texture of an acquired frame.

Link copied to clipboard
data class PanMomentum(val velocity: ScreenPoint? = null, val decay: MomentumDecay = MomentumDecay())

How a gesture's pan keeps moving the map's content after release.

Link copied to clipboard
data class PremultipliedRgba8Image(val width: UInt, val height: UInt, val stride: UInt, val pixels: ByteArray)

An image of 8-bit RGBA pixels whose colors are multiplied by their alpha.

Link copied to clipboard
data class ProjectedMeters(val northing: Double = 0.0, val easting: Double = 0.0)

A point in the Web Mercator projection, in meters.

Link copied to clipboard
data class ProjectionMode(val axonometric: Boolean = false, val xSkew: Double = 0.0, val ySkew: Double = 0.0)

A map's whole projection mode.

Link copied to clipboard
data class ProjectionModeOptions(val axonometric: Boolean? = null, val xSkew: Double? = null, val ySkew: Double? = null)

Settings that skew the map or draw it without perspective.

Link copied to clipboard
data class Quaternion(val x: Double = 0.0, val y: Double = 0.0, val z: Double = 0.0, val w: Double = 0.0)

A rotation, as a quaternion.

Link copied to clipboard
data class QueueLock

Your lock on a Vulkan queue that you and a render session both submit to.

Link copied to clipboard
fun interface QueueLockCallback

Locks or unlocks the Vulkan queue that you share with a render session.

Link copied to clipboard

A WebGL 2 context of the page, registered with the browser module by WebGraphics. Close it only after every session that names context has completed its detach or been destroyed: close removes the registration at once, and the JavaScript context stays usable.

Link copied to clipboard
class RenderAbandonDisposition(val rawValue: UInt)

What RenderSessionHandle.abandon() did with a session's graphics objects.

Link copied to clipboard
data class RenderAbandonResult(val disposition: RenderAbandonDisposition, val quarantinedResourceCount: UInt)

The outcome of RenderSessionHandle.abandon().

Link copied to clipboard
class RenderBackendFlag(val rawValue: UInt)

A render backend, as a bit in a set.

Link copied to clipboard
class RenderDriverKind(val rawValue: UInt)

The thread that runs a render session's graphics work.

Link copied to clipboard
data class RenderedFeature(val feature: String, val layerId: String, val sourceId: String, val sourceLayerId: String, val state: String)

A feature that a rendered feature query found.

Link copied to clipboard
data class RenderedFeatureQueryOptions(val layerIds: List<String>? = null, val filter: String = "")

Options for a rendered feature query.

Link copied to clipboard
sealed interface RenderedQueryGeometry

The screen area that a rendered feature query covers.

Link copied to clipboard
data class RenderFrameResult(val disposition: RenderResult, val token: ULong, val mapUpdateGeneration: ULong, val generation: ULong, val frameGeneration: ULong, val needsRepaint: Boolean, val view: MapView, val mode: RenderMode)

How one frame demand finished.

Link copied to clipboard
data class RenderingStats(val encodingTimeMs: Double, val renderingTimeMs: Double, val frameCount: Long, val drawCallCount: Long, val totalDrawCallCount: Long)

Statistics about the frames that a map renders.

Link copied to clipboard
class RenderMode(val rawValue: UInt)

Whether a frame drew the map complete, or lacked resources that are still loading.

Link copied to clipboard
class RenderResult(val rawValue: UInt)

How a frame demand finished.

Link copied to clipboard
data class RenderSessionAttachOptions(val driver: RenderDriverKind, val producerSyncKinds: GpuSyncKindFlag = GpuSyncKindFlag.NONE, val frameWake: Wake = Wake(), val redrawWake: Wake = Wake(), val driverWorkWake: Wake = Wake(), val queueLock: QueueLock = QueueLock())

Options for attaching a render session to a map.

Link copied to clipboard
data class RenderSessionCapabilities(val driver: RenderDriverKind, val textureRingDepth: UInt, val flags: RenderSessionCapabilityFlag, val producerSyncKind: GpuSyncKind, val consumerSyncKinds: GpuSyncKindFlag)

What an attached render session supports.

Link copied to clipboard
class RenderSessionCapabilityFlag(val rawValue: UInt)

Something that a render session can do.

Link copied to clipboard

The commands of a RenderSessionHandle that drop their completions.

Link copied to clipboard

A render session draws a map into a surface or a texture.

Link copied to clipboard
data class RenderSessionSnapshot(val state: RenderSessionState, val extent: LogicalExtent, val generation: ULong, val frameGeneration: ULong, val acquiredFrameCount: UInt, val failureStatus: Status, val hasTarget: Boolean)

The state of a render session at one moment.

Link copied to clipboard
class RenderSessionState(val rawValue: UInt)

Where a render session is in its life.

Link copied to clipboard
class ResourceErrorReason(val rawValue: UInt)

Why a resource request failed.

Link copied to clipboard
class ResourceKind(val rawValue: UInt)

The kind of a resource that the library loads.

Link copied to clipboard
class ResourceKindFlag(val rawValue: UInt)

A resource kind, as a bit in a set.

Link copied to clipboard
class ResourceLoadingMethod(val rawValue: UInt)

Where a request may load its resource from.

Link copied to clipboard
class ResourcePriority(val rawValue: UInt)

The priority of a resource request.

Link copied to clipboard
data class ResourceProvider(val routes: List<ResourceRoute> = emptyList(), val callback: ResourceProviderCallback)

A resource provider, for RuntimeHandle.setResourceProvider().

Link copied to clipboard

Serves a network request in place of the library.

Link copied to clipboard
data class ResourceRange(val start: ULong, val end: ULong)

The bytes from start to end of a resource, both included.

Link copied to clipboard

Reports that the library no longer needs a resource request.

Link copied to clipboard

A cancel callback, for ResourceRequestHandle.setCancelCallback().

Link copied to clipboard

A resource load that a resource provider answers.

Link copied to clipboard
data class ResourceRequestInfo(val requestedUrl: String, val resolvedUrl: String, val kind: ResourceKind, val loadingMethod: ResourceLoadingMethod, val priority: ResourcePriority, val usage: ResourceUsage, val storagePolicy: ResourceStoragePolicy, val range: ResourceRange?, val priorModifiedUnixMs: Long?, val priorExpiresUnixMs: Long?, val priorEtag: String, val priorData: ByteArray)

A request that a resource provider serves.

Link copied to clipboard
data class ResourceResponse(val status: ResourceResponseStatus = ResourceResponseStatus.OK, val errorReason: ResourceErrorReason = ResourceErrorReason.OTHER, val bytes: ByteArray = byteArrayOf(), val errorMessage: String = "", val mustRevalidate: Boolean = false, val modifiedUnixMs: Long? = null, val expiresUnixMs: Long? = null, val etag: String = "", val retryAfterUnixMs: Long? = null)

The answer to a resource request.

Link copied to clipboard
class ResourceResponseStatus(val rawValue: UInt)

The outcome of a resource request.

Link copied to clipboard
data class ResourceRoute(val kinds: ResourceKindFlag = ResourceKindFlag.NONE, val flags: UrlMatchFlag = UrlMatchFlag.NONE, val url: String = "")

The requests that a resource provider serves.

Link copied to clipboard
class ResourceStoragePolicy(val rawValue: UInt)

Whether the library keeps a loaded resource in its cache.

Link copied to clipboard
data class ResourceTransform(val rules: List<ResourceTransformRule> = emptyList(), val callback: ResourceTransformCallback? = null)

How to rewrite request URLs, for RuntimeHandle.setResourceTransform().

Link copied to clipboard

Rewrites the URL of a network request before the library sends it.

Link copied to clipboard
data class ResourceTransformError(val reason: ResourceErrorReason = ResourceErrorReason.OTHER, val message: String = "", val retryAfterUnixMs: Long? = null)

Why a resource transform fails a request.

Link copied to clipboard

A URL rewrite that a resource transform answers with the URL to load.

Link copied to clipboard
data class ResourceTransformRule(val kinds: ResourceKindFlag = ResourceKindFlag.NONE, val flags: UrlMatchFlag = UrlMatchFlag.NONE, val url: String = "", val parameters: List<UrlQueryParameter> = emptyList())

Query parameters to add to the URLs of requests that match a pattern.

Link copied to clipboard
class ResourceUsage(val rawValue: UInt)

Whether a request loads a resource for a map or an offline region.

Link copied to clipboard

The commands of a RuntimeHandle that drop their completions.

Link copied to clipboard
data class RuntimeEvent(val type: RuntimeEventType, val sourceType: RuntimeEventSourceType, val source: ULong, val generation: ULong, val message: String, val payload: RuntimeEventPayload)

An event that a runtime or one of its maps raised.

Link copied to clipboard
fun interface RuntimeEventCallback

Receives a batch of events.

Link copied to clipboard

The details of RuntimeEventType.MAP_CAMERA_WILL_CHANGE and RuntimeEventType.MAP_CAMERA_DID_CHANGE.

Link copied to clipboard
class RuntimeEventFlag(val rawValue: ULong)

An event type, as a bit in a set.

Link copied to clipboard
data class RuntimeEventGlyphs(val fontStack: List<String>, val first: UInt, val last: UInt, val fontFace: Boolean)

The details of a glyph event.

Link copied to clipboard
data class RuntimeEventHandler(val callback: RuntimeEventCallback)

An event callback, for RuntimeHandle.setEventHandler().

Link copied to clipboard

The details of RuntimeEventType.MAP_LOADING_FAILED.

Link copied to clipboard
data class RuntimeEventOfflineRegionResponseError(val regionId: Long, val reason: ResourceErrorReason)

The details of RuntimeEventType.OFFLINE_REGION_RESPONSE_ERROR.

Link copied to clipboard
data class RuntimeEventOfflineRegionStatus(val regionId: Long, val status: OfflineRegionStatus)

The details of RuntimeEventType.OFFLINE_REGION_STATUS_CHANGED.

Link copied to clipboard
data class RuntimeEventOfflineRegionTileCountLimit(val regionId: Long, val limit: ULong)

The details of RuntimeEventType.OFFLINE_REGION_TILE_COUNT_LIMIT_EXCEEDED.

Link copied to clipboard
sealed interface RuntimeEventPayload

The details of an event, in the member that its payload_type names.

Link copied to clipboard
data class RuntimeEventRenderFrame(val mode: RenderMode, val needsRepaint: Boolean, val placementChanged: Boolean, val stats: RenderingStats)

The details of RuntimeEventType.MAP_RENDER_FRAME_FINISHED.

Link copied to clipboard
data class RuntimeEventSourceChanged(val sourceId: String)

The details of RuntimeEventType.MAP_SOURCE_CHANGED.

Link copied to clipboard
class RuntimeEventSourceType(val rawValue: UInt)

The kind of handle that raised an event.

Link copied to clipboard
data class RuntimeEventSprite(val id: String, val url: String)

The details of a sprite event.

Link copied to clipboard
data class RuntimeEventStyleImage(val imageId: String)

The details of RuntimeEventType.MAP_STYLE_IMAGE_MISSING.

Link copied to clipboard
data class RuntimeEventTileAction(val sourceId: String, val operation: TileOperation, val tileId: TileId)

The details of RuntimeEventType.MAP_TILE_ACTION.

Link copied to clipboard
class RuntimeEventType(val rawValue: UInt)

The kind of an event.

Link copied to clipboard

A runtime owns maps and the network and cache settings that they share.

Link copied to clipboard
data class RuntimeOptions(val assetPath: String = "", val cachePath: String = "")

Options for RuntimeHandle.create().

Link copied to clipboard
data class ScreenBox(val min: ScreenPoint = ScreenPoint(), val max: ScreenPoint = ScreenPoint())

A rectangle of the screen, from its min corner to its max corner.

Link copied to clipboard
data class ScreenLineString(val points: List<ScreenPoint> = emptyList())

A line through points on the screen.

Link copied to clipboard
data class ScreenPoint(val x: Double = 0.0, val y: Double = 0.0)

A point on the screen, in logical pixels from the map's top-left corner.

Link copied to clipboard
data class SourceFeature(val feature: String, val sourceLayerId: String)

A feature that a source feature query found.

Link copied to clipboard
data class SourceFeatureQueryOptions(val sourceLayerIds: List<String>? = null, val filter: String = "")

Options for a source feature query.

Link copied to clipboard
class Status(val rawValue: Int)

The result of a call or of asynchronous work.

Link copied to clipboard

A parsed style expression.

Link copied to clipboard
data class StyleExpressionInfo(val isFeatureConstant: Boolean, val isZoomConstant: Boolean)

What a style expression's result depends on.

Link copied to clipboard
data class StyleExpressionInputs(val zoom: Double? = null, val colorRampParameter: Double? = null, val feature: String = "", val featureState: String = "", val globalState: String = "", val canonicalTileId: CanonicalTileId? = null, val availableImages: List<String> = emptyList())

The inputs that a style expression reads while it evaluates.

Link copied to clipboard
data class StyleExpressionOptions(val expectedType: StyleExpressionType? = null)

Options for parsing a style expression.

Link copied to clipboard
data class StyleExpressionType(val kind: StyleExpressionTypeKind = StyleExpressionTypeKind.VALUE, val itemKind: StyleExpressionTypeKind = StyleExpressionTypeKind.VALUE, val itemCount: UInt)

The type of a style expression's result.

Link copied to clipboard
class StyleExpressionTypeKind(val rawValue: UInt)

The type of a style expression's result, or of the items of an array result.

Link copied to clipboard
data class StyleImageInfo(val width: UInt, val height: UInt, val pixels: ByteArray, val stretchX: List<ImageStretch>, val stretchY: List<ImageStretch>, val content: ImageContent?, val textFitWidth: StyleImageTextFit?, val textFitHeight: StyleImageTextFit?, val pixelRatio: Float, val sdf: Boolean, val keepUnused: Boolean)

An image in the map's style.

Link copied to clipboard
data class StyleImageOptions(val stretchX: List<ImageStretch>? = null, val stretchY: List<ImageStretch>? = null, val content: ImageContent? = null, val textFitWidth: StyleImageTextFit? = null, val textFitHeight: StyleImageTextFit? = null, val pixelRatio: Float? = null, val sdf: Boolean? = null, val keepUnused: Boolean? = null)

Options for a style image, as the [sprite](https://maplibre.org/maplibre-style-spec/sprite/) spec describes them.

Link copied to clipboard
class StyleImageTextFit(val rawValue: UInt)

How an image stretches to fit text along one axis.

Link copied to clipboard
data class StyleLayerInfo(val id: String, val type: String, val sourceId: String, val sourceLayer: String, val minZoom: Double, val maxZoom: Double, val visibility: StyleLayerVisibility)

A layer in the map's style.

Link copied to clipboard
class StyleLayerVisibility(val rawValue: UInt)

Whether a layer shows.

Link copied to clipboard
class StyleRasterDemEncoding(val rawValue: UInt)

How a raster DEM tile encodes elevation in its colors.

Link copied to clipboard
data class StyleSourceInfo(val id: String, val type: StyleSourceType, val isVolatile: Boolean, val attribution: String, val url: String, val tileJson: StyleSourceTileInfo?, val bounds: LatLngBounds?, val tileSize: UInt?, val vectorEncoding: StyleVectorTileEncoding?, val rasterEncoding: StyleRasterDemEncoding?, val geoJson: GeoJsonSourceOptions?)

A source in the map's style.

Link copied to clipboard
data class StyleSourceTileInfo(val tileUrls: List<String>, val minZoom: Double, val maxZoom: Double, val scheme: StyleTileScheme)

The tiles of a source, as the style lists them.

Link copied to clipboard
class StyleSourceType(val rawValue: UInt)

The type of a style source.

Link copied to clipboard
class StyleTileScheme(val rawValue: UInt)

Whether a tileset counts tile rows from the north (XYZ) or the south (TMS).

Link copied to clipboard
data class StyleTransitionOptions(val durationMs: Double? = null, val delayMs: Double? = null, val enablePlacementTransitions: Boolean? = null)

The default [transition](https://maplibre.org/maplibre-style-spec/transition/) for changes to a style's paint properties.

Link copied to clipboard
class StyleVectorTileEncoding(val rawValue: UInt)

The format of vector tiles.

Link copied to clipboard
data class TextureImageInfo(val width: UInt, val height: UInt, val stride: UInt, val byteLength: ULong)

The layout of the pixels that RenderSessionHandle.readTexture() reads.

Link copied to clipboard
data class TextureReadbackResult(val data: ByteArray, val info: TextureImageInfo)

The pixels that RenderSessionHandle.readTexture() reads.

Link copied to clipboard
data class TileId(val overscaledZ: UInt, val wrap: Int, val canonicalZ: UInt, val canonicalX: UInt, val canonicalY: UInt)

The ID of a tile.

Link copied to clipboard
class TileLodMode(val rawValue: UInt)

How the map picks the level of detail of its tiles.

Link copied to clipboard
class TileOperation(val rawValue: UInt)

A step in loading a tile.

Link copied to clipboard
data class UnitBezier(val x1: Double = 0.0, val y1: Double = 0.0, val x2: Double = 0.0, val y2: Double = 0.0)

A timing curve from (0, 0) to (1, 1), with the control points (x1, y1) and (x2, y2).

Link copied to clipboard
class UrlMatchFlag(val rawValue: UInt)

How a URL pattern matches a request's URL.

Link copied to clipboard
data class UrlQueryParameter(val name: String, val value: String = "")

A query parameter that a resource transform rule adds to a URL.

Link copied to clipboard
data class Vec3(val x: Double = 0.0, val y: Double = 0.0, val z: Double = 0.0)

A vector in three dimensions.

Link copied to clipboard
class ViewportMode(val rawValue: UInt)

The vertical direction of the image that the map renders.

Link copied to clipboard
data class VulkanBorrowedTexture(val image: ULong, val imageView: ULong)

A Vulkan image of a borrowed ring.

Link copied to clipboard
data class VulkanBorrowedTextureDescriptor(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val context: VulkanContextDescriptor, val textures: List<VulkanBorrowedTexture>, val format: UInt, val finalLayout: UInt, val owner: VulkanImageOwner = VulkanImageOwner.GRAPHICS_QUEUE)

A ring of your Vulkan images, for MapHandle.attachVulkanBorrowedTexture().

Link copied to clipboard
data class VulkanBorrowedTextureReplacement(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val textures: List<VulkanBorrowedTexture>)

New Vulkan images for a borrowed ring, for RenderSessionHandle.setVulkanBorrowedTextureTarget().

Link copied to clipboard
data class VulkanContextDescriptor(val instance: NativePointer, val physicalDevice: NativePointer, val device: NativePointer, val graphicsQueue: NativePointer, val graphicsQueueFamilyIndex: UInt, val getInstanceProcAddr: NativePointer, val getDeviceProcAddr: NativePointer)

The Vulkan device and queue that a render session uses.

Link copied to clipboard

A Vulkan device's context, as VulkanDeviceHandle.getContext() reports it.

Link copied to clipboard

A Vulkan instance, device, and queue that the library creates and owns.

Link copied to clipboard
data class VulkanDeviceOptions(val presentation: Boolean? = null, val deviceUuid: ByteArray? = null, val deviceLuid: ByteArray? = null)

Options for VulkanDeviceHandle.create().

Link copied to clipboard
class VulkanImageOwner(val rawValue: UInt)

The queue family that a borrowed image goes to after each frame.

Link copied to clipboard
data class VulkanSurfaceDescriptor(val logicalSize: LogicalSize, val context: VulkanContextDescriptor, val surface: ULong)

A Vulkan surface to present to, for MapHandle.attachVulkanSurface().

Link copied to clipboard
data class VulkanSurfaceReplacement(val logicalSize: LogicalSize, val surface: ULong)

A new Vulkan surface for RenderSessionHandle.setVulkanSurfaceTarget().

Link copied to clipboard
class VulkanTextureFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, image: ULong, imageView: ULong, device: NativePointer, val format: UInt, val layout: UInt)

The Vulkan image of an acquired frame.

Link copied to clipboard
data class Wake

A callback that tells the caller when work is ready.

Link copied to clipboard
fun interface WakeCallback

Tells the caller that work is ready for it.

Link copied to clipboard
data class WaylandSurfaceDescriptor(val logicalSize: LogicalSize, val display: NativePointer, val surface: NativePointer)

A Wayland surface to present to, for MapHandle.attachWaylandSurface().

Link copied to clipboard
data class WaylandSurfaceReplacement(val logicalSize: LogicalSize, val surface: NativePointer)

A new Wayland surface for RenderSessionHandle.setWaylandSurfaceTarget().

Link copied to clipboard
data class WebGlContextDescriptor(val kind: WebGlContextKind = WebGlContextKind.EXISTING, val context: Int = 0, val canvasSelector: String = "")

The WebGL context or canvas that a render session uses.

Link copied to clipboard
class WebGlContextKind(val rawValue: UInt)

How a render session gets its WebGL context.

Link copied to clipboard
data class WebGpuBorrowedTexture(val texture: NativePointer, val textureView: NativePointer)

A WebGPU texture of a borrowed ring.

Link copied to clipboard
data class WebGpuBorrowedTextureDescriptor(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val context: WebGpuContextDescriptor, val textures: List<WebGpuBorrowedTexture>, val format: UInt)

A ring of your WebGPU textures, for MapHandle.attachWebGpuBorrowedTexture().

Link copied to clipboard
data class WebGpuBorrowedTextureReplacement(val logicalSize: LogicalSize, val physicalWidth: UInt, val physicalHeight: UInt, val textures: List<WebGpuBorrowedTexture>)

New WebGPU textures for a borrowed ring, for RenderSessionHandle.setWebGpuBorrowedTextureTarget().

Link copied to clipboard
data class WebGpuContextDescriptor(val instance: NativePointer, val device: NativePointer, val queue: NativePointer)

The WebGPU device that a render session uses.

Link copied to clipboard
data class WebGpuSurfaceDescriptor(val logicalSize: LogicalSize, val context: WebGpuContextDescriptor, val surface: NativePointer, val format: UInt)

A WebGPU surface to present to, for MapHandle.attachWebGpuSurface().

Link copied to clipboard
data class WebGpuSurfaceReplacement(val logicalSize: LogicalSize, val surface: NativePointer)

A new WebGPU surface for RenderSessionHandle.setWebGpuSurfaceTarget().

Link copied to clipboard
class WebGpuTextureFrame(val width: UInt, val height: UInt, val scaleFactor: Double, val slot: UInt, texture: NativePointer, textureView: NativePointer, device: NativePointer, val format: UInt)

The WebGPU texture of an acquired frame.

Link copied to clipboard

Browser-only graphics interop entry points.

Link copied to clipboard
data class WglContextDescriptor(val deviceContext: NativePointer, val shareContext: NativePointer, val getProcAddress: NativePointer)

The WGL objects that a render session makes its OpenGL context from.

Link copied to clipboard
data class Win32WindowDescriptor(val logicalSize: LogicalSize, val window: NativePointer)

A Win32 window to present to, for MapHandle.attachWin32Window().

Link copied to clipboard
data class Win32WindowReplacement(val logicalSize: LogicalSize, val window: NativePointer)

A new Win32 window for RenderSessionHandle.setWin32WindowTarget().

Properties

Link copied to clipboard

The size of a diagnostic message in bytes, with its terminator.

Link copied to clipboard

The C ABI version that this binding requires; loading fails on any other.

Link copied to clipboard

The token of the frame results that a session adds when it renders an image for MapHandle.requestStillImage(). Your own demands can't use it.

Link copied to clipboard

The most textures that a render session's texture ring can have.

Link copied to clipboard

The null Vulkan non-dispatchable handle.

Functions

androidFramePacerCreate
Link copied to clipboard
fun androidFramePacerCreate(options: FramePacerOptions? = null): FramePacerHandle

Creates a frame pacer that follows the display through the calling thread's AChoreographer.

fun androidFramePacerCreate(options: FramePacerOptions? = null): FramePacerHandle

Creates a frame pacer that follows the display through the calling thread's AChoreographer.

appleFramePacerCreate
Link copied to clipboard
fun appleFramePacerCreate(options: FramePacerOptions? = null): FramePacerHandle

Creates a frame pacer that follows the display through a CADisplayLink.

fun appleFramePacerCreate(options: FramePacerOptions? = null): FramePacerHandle

Creates a frame pacer that follows the display through a CADisplayLink.

attachAndroidHardwareBufferRing
Link copied to clipboard
fun MapHandle.attachAndroidHardwareBufferRing(descriptor: AndroidHardwareBufferRingDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of Android hardware buffers that the library allocates.

fun MapHandle.attachAndroidHardwareBufferRing(descriptor: AndroidHardwareBufferRingDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of Android hardware buffers that the library allocates.

attachAndroidSurface
Link copied to clipboard
fun MapHandle.attachAndroidSurface(descriptor: AndroidSurfaceDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to an Android window, with a graphics context that the library creates.

fun MapHandle.attachAndroidSurface(surface: Surface, logicalSize: LogicalSize, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to surface's window, with a graphics context that the library creates.

fun MapHandle.attachAndroidSurface(descriptor: AndroidSurfaceDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to an Android window, with a graphics context that the library creates.

attachDmaBufRing
Link copied to clipboard
fun MapHandle.attachDmaBufRing(descriptor: DmaBufRingDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of dmabufs that the library allocates.

fun MapHandle.attachDmaBufRing(descriptor: DmaBufRingDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of dmabufs that the library allocates.

attachDxgiSharedTextureRing
Link copied to clipboard
fun MapHandle.attachDxgiSharedTextureRing(descriptor: DxgiSharedTextureRingDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of DXGI shared textures that the library allocates.

fun MapHandle.attachDxgiSharedTextureRing(descriptor: DxgiSharedTextureRingDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of DXGI shared textures that the library allocates.

attachIoSurfaceRing
Link copied to clipboard
fun MapHandle.attachIoSurfaceRing(descriptor: IoSurfaceRingDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of IOSurfaces that the library allocates.

fun MapHandle.attachIoSurfaceRing(descriptor: IoSurfaceRingDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of IOSurfaces that the library allocates.

attachMetalBorrowedTexture
Link copied to clipboard
fun MapHandle.attachMetalBorrowedTexture(descriptor: MetalBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Metal textures.

fun MapHandle.attachMetalBorrowedTexture(descriptor: MetalBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Metal textures.

attachMetalSurface
Link copied to clipboard
fun MapHandle.attachMetalSurface(descriptor: MetalSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Metal layer.

fun MapHandle.attachMetalSurface(descriptor: MetalSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Metal layer.

attachVulkanBorrowedTexture
Link copied to clipboard
fun MapHandle.attachVulkanBorrowedTexture(descriptor: VulkanBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Vulkan images.

fun MapHandle.attachVulkanBorrowedTexture(descriptor: VulkanBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Vulkan images.

fun MapHandle.attachVulkanBorrowedTexture(descriptor: VulkanBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Vulkan images.

fun MapHandle.attachVulkanBorrowedTexture(descriptor: VulkanBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Vulkan images.

fun MapHandle.attachVulkanBorrowedTexture(descriptor: VulkanBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your Vulkan images.

attachVulkanSurface
Link copied to clipboard
fun MapHandle.attachVulkanSurface(descriptor: VulkanSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Vulkan surface.

fun MapHandle.attachVulkanSurface(descriptor: VulkanSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Vulkan surface.

fun MapHandle.attachVulkanSurface(descriptor: VulkanSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Vulkan surface.

fun MapHandle.attachVulkanSurface(descriptor: VulkanSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Vulkan surface.

fun MapHandle.attachVulkanSurface(descriptor: VulkanSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a Vulkan surface.

attachWaylandSurface
Link copied to clipboard
fun MapHandle.attachWaylandSurface(descriptor: WaylandSurfaceDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to a Wayland surface, with a graphics context that the library creates.

fun MapHandle.attachWaylandSurface(descriptor: WaylandSurfaceDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to a Wayland surface, with a graphics context that the library creates.

Link copied to clipboard
fun MapHandle.attachWebGpuBorrowedTexture(descriptor: WebGpuBorrowedTextureDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map into a ring of your WebGPU textures.

Link copied to clipboard
fun MapHandle.attachWebGpuSurface(descriptor: WebGpuSurfaceDescriptor, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that renders the map to a WebGPU surface.

attachWin32Window
Link copied to clipboard
fun MapHandle.attachWin32Window(descriptor: Win32WindowDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to a Win32 window, with a graphics context that the library creates.

fun MapHandle.attachWin32Window(descriptor: Win32WindowDescriptor, device: VulkanDeviceHandle? = null, options: RenderSessionAttachOptions): RenderSessionHandle

Creates a session that presents the map to a Win32 window, with a graphics context that the library creates.

Link copied to clipboard

Computes the camera that shows exactly one tile on a square map.

Link copied to clipboard

Sends log messages to the platform's log again, instead of a callback.

create
Link copied to clipboard
fun VulkanDeviceHandle.Companion.create(options: VulkanDeviceOptions? = null): VulkanDeviceHandle

Creates a Vulkan instance, device, and graphics queue for render sessions.

fun VulkanDeviceHandle.Companion.create(options: VulkanDeviceOptions? = null): VulkanDeviceHandle

Creates a Vulkan instance, device, and graphics queue for render sessions.

fun VulkanDeviceHandle.Companion.create(options: VulkanDeviceOptions? = null): VulkanDeviceHandle

Creates a Vulkan instance, device, and graphics queue for render sessions.

fun VulkanDeviceHandle.Companion.create(options: VulkanDeviceOptions? = null): VulkanDeviceHandle

Creates a Vulkan instance, device, and graphics queue for render sessions.

fun VulkanDeviceHandle.Companion.create(options: VulkanDeviceOptions? = null): VulkanDeviceHandle

Creates a Vulkan instance, device, and graphics queue for render sessions.

Link copied to clipboard
@JvmName(name = "cVersion")
fun cVersion(): UInt

Returns the API epoch of the library.

getContext
Link copied to clipboard
fun VulkanDeviceHandle.getContext(): VulkanDeviceContextResult

Gets the context to attach render sessions to the device with.

fun VulkanDeviceHandle.getContext(): VulkanDeviceContextResult

Gets the context to attach render sessions to the device with.

fun VulkanDeviceHandle.getContext(): VulkanDeviceContextResult

Gets the context to attach render sessions to the device with.

fun VulkanDeviceHandle.getContext(): VulkanDeviceContextResult

Gets the context to attach render sessions to the device with.

fun VulkanDeviceHandle.getContext(): VulkanDeviceContextResult

Gets the context to attach render sessions to the device with.

Link copied to clipboard

Gets the hardware buffer of an acquired frame as a HardwareBuffer, such as for Bitmap.wrapHardwareBuffer.

Link copied to clipboard

Reads whether the library may use the network.

Link copied to clipboard

Returns the function that registers a plugin's style layer types.

Link copied to clipboard
fun initAndroid(context: Context)

Initializes Android platform services.

Initializes Android platform services using JNI handles from the host.

Link copied to clipboard

Converts meters in the Web Mercator projection to a coordinate.

Link copied to clipboard
actual fun loadNativeLibrary()

Loads the native library, or verifies it where the platform links it, and checks its C ABI version.

expect fun loadNativeLibrary()

Loads the native library, or verifies it where the platform links it, and checks its C ABI version.

actual fun loadNativeLibrary()

Loads the native library from a runtime JAR on the classpath, or else with System.loadLibrary("maplibre-native-c"), which searches java.library.path.

fun loadNativeLibrary(libraryPath: Path)

Loads the native library from an exact file path, after the graphics libraries that sit beside it.

actual fun loadNativeLibrary()

Checks the C ABI version of the library that the runtime KLIB links into the binary.

actual fun loadNativeLibrary()

Verifies that loadWasmModule loaded the browser module, which no call can do synchronously.

Link copied to clipboard
suspend fun loadWasmModule(pthreadPoolSize: Int? = null)

Loads the browser module bundled by the selected maplibre-native-ffi-runtime-opengl or maplibre-native-ffi-runtime-webgpu dependency. The runtime and binding must have the same version. This checks the module's C ABI version. Every other call throws an IllegalStateException until this returns. A later call returns once the first load finishes, and ignores its own arguments. Cancelling a caller ends only that caller's wait, and the load goes on for the others.

Link copied to clipboard

Computes the size in pixels of a target with a logical size and scale factor.

Link copied to clipboard
fun Wake.Companion.native(callback: NativePointer, userData: NativePointer = NativePointer.NULL_POINTER, releaseUserData: NativePointer = NativePointer.NULL_POINTER): Wake

Creates a Wake of the host's native functions, which the binding copies to native code unchanged. Each function has the C type of the record field that it fills, and native code calls each with userData. A null pointer leaves its field null.

fun QueueLock.Companion.native(lock: NativePointer, unlock: NativePointer, userData: NativePointer = NativePointer.NULL_POINTER, releaseUserData: NativePointer = NativePointer.NULL_POINTER): QueueLock

Creates a QueueLock of the host's native functions, which the binding copies to native code unchanged. Each function has the C type of the record field that it fills, and native code calls each with userData. A null pointer leaves its field null.

Link copied to clipboard

Reports the OpenGL context platforms that this build of the library has.

Link copied to clipboard

Converts a coordinate to meters in the Web Mercator projection.

setAndroidSurfaceTarget
Link copied to clipboard
fun RenderSessionHandle.setAndroidSurfaceTarget(replacement: AndroidSurfaceReplacement): Completion<Unit>

Replaces the Android window that the session presents to.

fun RenderSessionHandle.setAndroidSurfaceTarget(surface: Surface, logicalSize: LogicalSize): Completion<Unit>

Replaces the window that the session presents to with surface's.

fun RenderSessionHandle.setAndroidSurfaceTarget(replacement: AndroidSurfaceReplacement): Completion<Unit>

Replaces the Android window that the session presents to.

Link copied to clipboard

Sets a header on the request that an HTTP header transform callback handles.

Link copied to clipboard

RuntimeHandle.setHttpHeaderTransform without its completion.

Adds headers to the runtime's HTTP requests.

Link copied to clipboard

Selects the severities that the library logs on a background thread.

Link copied to clipboard

Sends the log messages of every runtime in the process to a callback.

setMetalBorrowedTextureTarget
Link copied to clipboard
fun RenderSessionHandle.setMetalBorrowedTextureTarget(replacement: MetalBorrowedTextureReplacement): Completion<Unit>

Replaces the Metal textures that a borrowed ring renders into.

fun RenderSessionHandle.setMetalBorrowedTextureTarget(replacement: MetalBorrowedTextureReplacement): Completion<Unit>

Replaces the Metal textures that a borrowed ring renders into.

setMetalSurfaceTarget
Link copied to clipboard
fun RenderSessionHandle.setMetalSurfaceTarget(replacement: MetalSurfaceReplacement): Completion<Unit>

Replaces the Metal layer that the session renders to.

fun RenderSessionHandle.setMetalSurfaceTarget(replacement: MetalSurfaceReplacement): Completion<Unit>

Replaces the Metal layer that the session renders to.

Link copied to clipboard

Tells the library whether it may use the network.

setVulkanBorrowedTextureTarget
Link copied to clipboard
fun RenderSessionHandle.setVulkanBorrowedTextureTarget(replacement: VulkanBorrowedTextureReplacement): Completion<Unit>

Replaces the Vulkan images that a borrowed ring renders into.

fun RenderSessionHandle.setVulkanBorrowedTextureTarget(replacement: VulkanBorrowedTextureReplacement): Completion<Unit>

Replaces the Vulkan images that a borrowed ring renders into.

fun RenderSessionHandle.setVulkanBorrowedTextureTarget(replacement: VulkanBorrowedTextureReplacement): Completion<Unit>

Replaces the Vulkan images that a borrowed ring renders into.

fun RenderSessionHandle.setVulkanBorrowedTextureTarget(replacement: VulkanBorrowedTextureReplacement): Completion<Unit>

Replaces the Vulkan images that a borrowed ring renders into.

fun RenderSessionHandle.setVulkanBorrowedTextureTarget(replacement: VulkanBorrowedTextureReplacement): Completion<Unit>

Replaces the Vulkan images that a borrowed ring renders into.

setVulkanSurfaceTarget
Link copied to clipboard
fun RenderSessionHandle.setVulkanSurfaceTarget(replacement: VulkanSurfaceReplacement): Completion<Unit>

Replaces the Vulkan surface that the session presents to.

fun RenderSessionHandle.setVulkanSurfaceTarget(replacement: VulkanSurfaceReplacement): Completion<Unit>

Replaces the Vulkan surface that the session presents to.

fun RenderSessionHandle.setVulkanSurfaceTarget(replacement: VulkanSurfaceReplacement): Completion<Unit>

Replaces the Vulkan surface that the session presents to.

fun RenderSessionHandle.setVulkanSurfaceTarget(replacement: VulkanSurfaceReplacement): Completion<Unit>

Replaces the Vulkan surface that the session presents to.

fun RenderSessionHandle.setVulkanSurfaceTarget(replacement: VulkanSurfaceReplacement): Completion<Unit>

Replaces the Vulkan surface that the session presents to.

setWaylandSurfaceTarget
Link copied to clipboard
fun RenderSessionHandle.setWaylandSurfaceTarget(replacement: WaylandSurfaceReplacement): Completion<Unit>

Replaces the Wayland surface that the session presents to.

fun RenderSessionHandle.setWaylandSurfaceTarget(replacement: WaylandSurfaceReplacement): Completion<Unit>

Replaces the Wayland surface that the session presents to.

Link copied to clipboard
fun RenderSessionHandle.setWebGpuBorrowedTextureTarget(replacement: WebGpuBorrowedTextureReplacement): Completion<Unit>

Replaces the WebGPU textures that a borrowed ring renders into.

Link copied to clipboard
fun RenderSessionHandle.setWebGpuSurfaceTarget(replacement: WebGpuSurfaceReplacement): Completion<Unit>

Replaces the WebGPU surface that the session presents to.

setWin32WindowTarget
Link copied to clipboard
fun RenderSessionHandle.setWin32WindowTarget(replacement: Win32WindowReplacement): Completion<Unit>

Replaces the Win32 window that the session presents to.

fun RenderSessionHandle.setWin32WindowTarget(replacement: Win32WindowReplacement): Completion<Unit>

Replaces the Win32 window that the session presents to.

Link copied to clipboard

Returns the render backends that this build of the library draws with.

Link copied to clipboard
inline suspend fun <T : AsyncReleasable, R> T.useReleasing(block: suspend (T) -> R): R

Runs block, then releases this owner and suspends until the release finishes. An owner that block already released or disposed is left as it is. A release failure propagates, or, when block throws, is added to its throwable as suppressed, as with use.

withAndroidHardwareBuffer
Link copied to clipboard
fun <T> AcquiredFrameHandle.withAndroidHardwareBuffer(block: (AndroidHardwareBufferFrame) -> T): T

Gets the Android hardware buffer of an acquired frame.

fun <T> AcquiredFrameHandle.withAndroidHardwareBuffer(block: (AndroidHardwareBufferFrame) -> T): T

Gets the Android hardware buffer of an acquired frame.

withDmaBuf
Link copied to clipboard
fun <T> AcquiredFrameHandle.withDmaBuf(block: (DmaBufFrame) -> T): T

Gets the dmabuf of an acquired frame.

fun <T> AcquiredFrameHandle.withDmaBuf(block: (DmaBufFrame) -> T): T

Gets the dmabuf of an acquired frame.

withDxgiSharedTexture
Link copied to clipboard
fun <T> AcquiredFrameHandle.withDxgiSharedTexture(block: (DxgiSharedTextureFrame) -> T): T

Gets the DXGI shared texture of an acquired frame.

fun <T> AcquiredFrameHandle.withDxgiSharedTexture(block: (DxgiSharedTextureFrame) -> T): T

Gets the DXGI shared texture of an acquired frame.

withIoSurface
Link copied to clipboard
fun <T> AcquiredFrameHandle.withIoSurface(block: (IoSurfaceFrame) -> T): T

Gets the IOSurface of an acquired frame.

fun <T> AcquiredFrameHandle.withIoSurface(block: (IoSurfaceFrame) -> T): T

Gets the IOSurface of an acquired frame.

withMetalTexture
Link copied to clipboard
fun <T> AcquiredFrameHandle.withMetalTexture(block: (MetalTextureFrame) -> T): T

Gets the Metal texture of an acquired frame.

fun <T> AcquiredFrameHandle.withMetalTexture(block: (MetalTextureFrame) -> T): T

Gets the Metal texture of an acquired frame.

withVulkanTexture
Link copied to clipboard
fun <T> AcquiredFrameHandle.withVulkanTexture(block: (VulkanTextureFrame) -> T): T

Gets the Vulkan image of an acquired frame.

fun <T> AcquiredFrameHandle.withVulkanTexture(block: (VulkanTextureFrame) -> T): T

Gets the Vulkan image of an acquired frame.

fun <T> AcquiredFrameHandle.withVulkanTexture(block: (VulkanTextureFrame) -> T): T

Gets the Vulkan image of an acquired frame.

fun <T> AcquiredFrameHandle.withVulkanTexture(block: (VulkanTextureFrame) -> T): T

Gets the Vulkan image of an acquired frame.

fun <T> AcquiredFrameHandle.withVulkanTexture(block: (VulkanTextureFrame) -> T): T

Gets the Vulkan image of an acquired frame.

Link copied to clipboard
fun <T> AcquiredFrameHandle.withWebGpuTexture(block: (WebGpuTextureFrame) -> T): T

Gets the WebGPU texture of an acquired frame.