Table of Contents

Namespace Maplibre.NativeFfi

Classes

AbiVersionMismatchException

The loaded C library and this binding have different ABI versions, so the library is Unsupported.

AcquiredFrameHandle

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

AnchoredMomentum

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

AndroidHardwareBufferFrameView
AnimationOptions

How a camera change animates.

BoundOptions

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

CallbackExceptionEventArgs

An exception that a native callback threw, which native could not receive.

CameraDelta

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

CameraFitOptions

Options for finding the camera that fits an area.

CameraOptions

A camera, with only the members that fields selects.

CustomGeometrySourceOptions

The callbacks and options of a custom geometry source.

CustomVectorSourceOptions

The callbacks and options of a custom vector source.

DmaBufFrameView
DxgiSharedTextureFrameView
FeatureId

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

FeatureId.DoubleValue
FeatureId.IntValue
FeatureId.StringValue
FeatureId.UintValue
FeatureStateSelector

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

FramePacerHandle

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

FramePacerOptions

Options for creating a frame pacer.

FreeCameraOptions

The camera's position and orientation in three dimensions.

GeoJsonSourceOptions

Options for a GeoJSON source.

GpuSyncView
HttpHeaderTransformResponse

The headers that an HTTP header transform callback sets.

IoSurfaceFrameView
MapHandle

A map, with its style and camera.

MapOptions

Options for RuntimeHandle.CreateMap().

MapProjectionHandle

A camera view for converting between screen points and coordinates.

MapTileOptions

How the map picks the tiles to load.

MapViewportOptions

How the map orients and constrains its view.

MaplibreException

A native status and the diagnostic that native copied for it. A failed or cancelled command faults its task with this exception.

MaplibreNative

Process-global MapLibre Native FFI entry points.

MetalTextureFrameView
MomentumDecay

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

MomentumSnap

Where a part settles after a gesture that changed it.

OfflineRegionDefinition

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

OfflineRegionDefinition.Geometry
OfflineRegionDefinition.TilePyramid
OfflineRegionDefinition.Unknown
OffscreenDeviceHandle

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

OffscreenDeviceOptions

Options for OffscreenDeviceHandle.Create().

OpenGlContextDescriptor.DataValue
OpenGlContextDescriptor.DataValue.Egl
OpenGlContextDescriptor.DataValue.WebGl
OpenGlContextDescriptor.DataValue.Wgl
OpenGlTextureFrameView
PanMomentum

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

ProjectionModeOptions

Settings that skew the map or draw it without perspective.

RenderSessionHandle

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

RenderedFeatureQueryOptions

Options for a rendered feature query.

RenderedQueryGeometry

The screen area that a rendered feature query covers.

RenderedQueryGeometry.Box
RenderedQueryGeometry.LineString
RenderedQueryGeometry.Point
ResourceRequestHandle

A resource load that a resource provider answers.

ResourceRequestInfo

A request that a resource provider serves.

ResourceResponse

The answer to a resource request.

ResourceTransformError

Why a resource transform fails a request.

ResourceTransformRequestHandle

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

RuntimeEvent.PayloadValue
RuntimeEvent.PayloadValue.CameraChange
RuntimeEvent.PayloadValue.Glyphs
RuntimeEvent.PayloadValue.LoadingFailed
RuntimeEvent.PayloadValue.None
RuntimeEvent.PayloadValue.OfflineRegionResponseError
RuntimeEvent.PayloadValue.OfflineRegionStatus
RuntimeEvent.PayloadValue.OfflineRegionTileCountLimit
RuntimeEvent.PayloadValue.RenderFrame
RuntimeEvent.PayloadValue.SourceChanged
RuntimeEvent.PayloadValue.Sprite
RuntimeEvent.PayloadValue.StyleImage
RuntimeEvent.PayloadValue.TileAction
RuntimeEvent.PayloadValue.Unknown
RuntimeHandle

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

SourceFeatureQueryOptions

Options for a source feature query.

StyleExpressionHandle

A parsed style expression.

StyleExpressionInputs

The inputs that a style expression reads while it evaluates.

StyleExpressionOptions

Options for parsing a style expression.

StyleImageInfo

An image in the map's style.

StyleImageOptions

Options for a style image, as the sprite spec describes them.

StyleSourceInfo

A source in the map's style.

StyleTransitionOptions

The default transition for changes to a style's paint properties.

VulkanDeviceHandle

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

VulkanDeviceOptions

Options for VulkanDeviceHandle.Create().

VulkanTextureFrameView

Structs

AndroidHardwareBufferFrame

The Android hardware buffer of an acquired frame.

AndroidHardwareBufferRingDescriptor

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

AndroidSurfaceDescriptor

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

AndroidSurfaceReplacement

A new Android window for RenderSessionHandle.SetAndroidSurfaceTargetAsync().

Camera

A map's whole camera.

CameraBounds

All the limits on a map's camera.

CameraFitUpdate

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

CameraQueryResult

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

CameraTransitionEnd

The end of a camera change.

CameraTransitionHandler

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

CameraUpdate

A camera change for MapHandle.UpdateCameraAsync().

CameraVelocity

How fast each part of a camera change moves.

CanonicalTileId

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

CommandCompletion

The success value of an ordered command, which its task holds once the command committed. A failed or cancelled command faults its task with a MaplibreException that carries its status, diagnostic, and generation instead.

DmaBufFormat

A DRM format and modifier that you can import.

DmaBufFrame

The dmabuf of an acquired frame.

DmaBufPlane

Where one plane of a dmabuf keeps its data.

DmaBufRingDescriptor

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

DxgiSharedTextureFrame

The DXGI shared texture of an acquired frame.

DxgiSharedTextureRingDescriptor

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

EdgeInsets

Distances in logical pixels from each edge of the map.

EglContextDescriptor

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

FrameDemand

A demand for one frame.

FreeCamera

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

GestureMomentum

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

GpuSync

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

HttpHeader

An HTTP header.

HttpHeaderRule

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

HttpHeaderTransform

Headers to add to HTTP requests, for RuntimeHandle.SetHttpHeaderTransformAsync().

ImageContent

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

ImageStretch

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

IoSurfaceFrame

The IOSurface of an acquired frame.

IoSurfaceRingDescriptor

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

LatLng

A geographic coordinate, in degrees.

LatLngBounds

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

LogHandler

A log callback, for MaplibreNative.SetLogCallback().

LogicalExtent

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

LogicalSize

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

MapHandle.DiscardingCommands

The commands of a handle, each submitted without a completion. Native logs a failure as a warning, and the caller sees none.

MapProjectionCameraResult

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

MapSnapshot

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

MapTileSettings

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

MapView

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

MapViewport

A map's whole viewport.

MetalBorrowedTexture

A Metal texture of a borrowed ring.

MetalBorrowedTextureDescriptor

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

MetalBorrowedTextureReplacement

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

MetalContextDescriptor

The Metal device that a render session uses.

MetalSurfaceDescriptor

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

MetalSurfaceReplacement

A new Metal layer for RenderSessionHandle.SetMetalSurfaceTargetAsync().

MetalTextureFrame

The Metal texture of an acquired frame.

NativePointer

Borrowed opaque backend-native address.

OfflineGeometryRegionDefinition

An offline region that covers a GeoJSON geometry.

OfflineRegionInfo

An offline region in the runtime's cache file.

OfflineRegionStatus

The download progress of an offline region.

OfflineTilePyramidRegionDefinition

An offline region that covers a rectangle of the map.

OffscreenDescriptor

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

OpenGlBorrowedTexture

An OpenGL texture of a borrowed ring.

OpenGlBorrowedTextureDescriptor

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

OpenGlBorrowedTextureReplacement

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

OpenGlContextDescriptor

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

OpenGlSurfaceDescriptor

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

OpenGlSurfaceReplacement

A new OpenGL surface for RenderSessionHandle.SetOpenGlSurfaceTargetAsync().

OpenGlTextureFrame

The OpenGL texture of an acquired frame.

PremultipliedRgba8Image

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

ProjectedMeters

A point in the Web Mercator projection, in meters.

ProjectionMode

A map's whole projection mode.

Quaternion

A rotation, as a quaternion.

QueueLock

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

RenderAbandonResult

The outcome of RenderSessionHandle.Abandon().

RenderFrameResult

How one frame demand finished.

RenderSessionAttachOptions

Options for attaching a render session to a map.

RenderSessionCapabilities

What an attached render session supports.

RenderSessionHandle.DiscardingCommands

The commands of a handle, each submitted without a completion. Native logs a failure as a warning, and the caller sees none.

RenderSessionSnapshot

The state of a render session at one moment.

RenderedFeature

A feature that a rendered feature query found.

RenderingStats

Statistics about the frames that a map renders.

ResourceProvider

A resource provider, for RuntimeHandle.SetResourceProviderAsync().

ResourceRange

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

ResourceRequestCancelHandler

A cancel callback, for ResourceRequestHandle.SetCancelCallback().

ResourceRoute

The requests that a resource provider serves.

ResourceTransform

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

ResourceTransformRule

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

RuntimeEvent

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

RuntimeEventCameraChange

The details of RuntimeEventType.MapCameraWillChange and RuntimeEventType.MapCameraDidChange.

RuntimeEventGlyphs

The details of a glyph event.

RuntimeEventHandler

An event callback, for RuntimeHandle.SetEventHandlerAsync().

RuntimeEventLoadingFailed

The details of RuntimeEventType.MapLoadingFailed.

RuntimeEventOfflineRegionResponseError

The details of RuntimeEventType.OfflineRegionResponseError.

RuntimeEventOfflineRegionStatus

The details of RuntimeEventType.OfflineRegionStatusChanged.

RuntimeEventOfflineRegionTileCountLimit

The details of RuntimeEventType.OfflineRegionTileCountLimitExceeded.

RuntimeEventRenderFrame

The details of RuntimeEventType.MapRenderFrameFinished.

RuntimeEventSourceChanged

The details of RuntimeEventType.MapSourceChanged.

RuntimeEventSprite

The details of a sprite event.

RuntimeEventStyleImage

The details of RuntimeEventType.MapStyleImageMissing.

RuntimeEventTileAction

The details of RuntimeEventType.MapTileAction.

RuntimeHandle.DiscardingCommands

The commands of a handle, each submitted without a completion. Native logs a failure as a warning, and the caller sees none.

RuntimeOptions

Options for RuntimeHandle.Create().

ScreenBox

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

ScreenLineString

A line through points on the screen.

ScreenPoint

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

SourceFeature

A feature that a source feature query found.

StyleExpressionInfo

What a style expression's result depends on.

StyleExpressionType

The type of a style expression's result.

StyleLayerInfo

A layer in the map's style.

StyleSourceTileInfo

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

TextureImageInfo

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

TextureReadbackResult

The pixels that RenderSessionHandle.ReadTextureAsync() reads.

TileId

The ID of a tile.

UnitBezier

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

UrlQueryParameter

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

Vec3

A vector in three dimensions.

VulkanBorrowedTexture

A Vulkan image of a borrowed ring.

VulkanBorrowedTextureDescriptor

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

VulkanBorrowedTextureReplacement

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

VulkanContextDescriptor

The Vulkan device and queue that a render session uses.

VulkanDeviceContextResult

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

VulkanSurfaceDescriptor

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

VulkanSurfaceReplacement

A new Vulkan surface for RenderSessionHandle.SetVulkanSurfaceTargetAsync().

VulkanTextureFrame

The Vulkan image of an acquired frame.

Wake

A callback that tells the caller when work is ready.

WaylandSurfaceDescriptor

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

WaylandSurfaceReplacement

A new Wayland surface for RenderSessionHandle.SetWaylandSurfaceTargetAsync().

WebGlContextDescriptor

The WebGL context or canvas that a render session uses.

WglContextDescriptor

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

Win32WindowDescriptor

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

Win32WindowReplacement

A new Win32 window for RenderSessionHandle.SetWin32WindowTargetAsync().

Enums

CacheDatabaseOperation

A maintenance action on a runtime's cache database.

CameraChangeMode

Whether a camera change jumps or animates.

CameraChangeSource

What moved the camera.

CameraTransitionOutcome

How a camera change ended.

CameraUpdateMode

How a camera command moves the camera.

ConstrainMode

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

FrameDemandFlag

How a frame demand behaves.

GesturePhase

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

GpuSyncKind

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

GpuSyncKindFlag

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

LogEvent

The part of the library that logged a message.

LogSeverity

The severity of a log message.

LogSeverityFlag

A log severity, as a bit in a set.

MapDebugFlag

A debug overlay that the map draws.

MapLoadError

Why a map failed to load a style.

MapMode

When a map renders.

MomentumDecayModel

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

NetworkStatus

Whether the library may use the network.

NorthOrientation

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

OfflineRegionDownloadState

Whether an offline region is downloading.

OpenGlClientApi

The OpenGL API that a context renders with.

OpenGlContextOwnership

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

OpenGlContextProviderFlag

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

RenderAbandonDisposition

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

RenderBackendFlag

A render backend, as a bit in a set.

RenderDriverKind

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

RenderMode

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

RenderResult

How a frame demand finished.

RenderSessionCapabilityFlag

Something that a render session can do.

RenderSessionState

Where a render session is in its life.

ResourceErrorReason

Why a resource request failed.

ResourceKind

The kind of a resource that the library loads.

ResourceKindFlag

A resource kind, as a bit in a set.

ResourceLoadingMethod

Where a request may load its resource from.

ResourcePriority

The priority of a resource request.

ResourceResponseStatus

The outcome of a resource request.

ResourceStoragePolicy

Whether the library keeps a loaded resource in its cache.

ResourceUsage

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

RuntimeEventFlag

An event type, as a bit in a set.

RuntimeEventSourceType

The kind of handle that raised an event.

RuntimeEventType

The kind of an event.

Status

The result of a call or of asynchronous work.

StyleExpressionTypeKind

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

StyleImageTextFit

How an image stretches to fit text along one axis.

StyleLayerVisibility

Whether a layer shows.

StyleRasterDemEncoding

How a raster DEM tile encodes elevation in its colors.

StyleSourceType

The type of a style source.

StyleTileScheme

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

StyleVectorTileEncoding

The format of vector tiles.

TileLodMode

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

TileOperation

A step in loading a tile.

UrlMatchFlag

How a URL pattern matches a request's URL.

ViewportMode

The vertical direction of the image that the map renders.

VulkanImageOwner

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

WebGlContextKind

How a render session gets its WebGL context.

Delegates

CameraTransitionEndCallback

Receives the end of a camera change.

CustomSourceCancelTileCallback

Reports that a custom source no longer needs a tile.

CustomSourceFetchTileCallback

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

HttpHeaderTransformCallback

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

LogCallback

Receives a log message.

QueueLockCallback

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

ResourceProviderCallback

Serves a network request in place of the library.

ResourceRequestCancelCallback

Reports that the library no longer needs a resource request.

ResourceTransformCallback

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

RuntimeEventCallback

Receives a batch of events.

WakeCallback

Tells the caller that work is ready for it.