Class MapHandle
Owner-thread map handle bound to a runtime.
public sealed class MapHandle : IDisposable
- Inheritance
-
MapHandle
- Implements
- Inherited Members
Properties
IsClosed
Whether this wrapper has successfully closed its native handle.
public bool IsClosed { get; }
Property Value
Methods
AddColorReliefLayer(string, string, string)
Adds a color-relief layer for a raster DEM source.
public void AddColorReliefLayer(string layerId, string sourceId, string beforeLayerId)
Parameters
AddCustomGeometrySource(string, CustomGeometrySourceOptions)
Adds a custom geometry source with tile callbacks.
public void AddCustomGeometrySource(string sourceId, CustomGeometrySourceOptions options)
Parameters
sourceIdstringoptionsCustomGeometrySourceOptions
Remarks
The upcall stubs this installs live until MapLibre stops referencing them: until the source is removed, until a style load leaves a style without it, or until this map closes. The binding releases them from the callback the C API invokes then, so nothing here depends on the events SetEventMask(RuntimeEventMask) selects.
AddGeoJsonSourceData(string, GeoJsonSourceDataHandle)
Adds a GeoJSON source backed by prepared data.
public void AddGeoJsonSourceData(string sourceId, GeoJsonSourceDataHandle data)
Parameters
sourceIdstringdataGeoJsonSourceDataHandle
Remarks
The call borrows data; the source adopts the options baked into it
when the data was prepared and keeps its own reference, so the handle may be released
afterward.
AddGeoJsonSourceUrl(string, string, GeoJsonSourceOptions?)
Adds a GeoJSON source that loads data from a URL.
public void AddGeoJsonSourceUrl(string sourceId, string url, GeoJsonSourceOptions? options)
Parameters
sourceIdstringurlstringoptionsGeoJsonSourceOptions
Remarks
options is fixed when the source is created;
SetGeoJsonSourceUrl(string, string) and SetGeoJsonSourceData(string, GeoJsonSourceDataHandle) keep it.
AddHillshadeLayer(string, string, string)
Adds a hillshade layer for a raster DEM source.
public void AddHillshadeLayer(string layerId, string sourceId, string beforeLayerId)
Parameters
AddImageSourceImage(string, IReadOnlyList<LatLng>, PremultipliedRgba8Image)
Adds an image source with inline premultiplied RGBA8 image data.
public void AddImageSourceImage(string sourceId, IReadOnlyList<LatLng> coordinates, PremultipliedRgba8Image image)
Parameters
sourceIdstringcoordinatesIReadOnlyList<LatLng>imagePremultipliedRgba8Image
AddImageSourceUrl(string, IReadOnlyList<LatLng>, string)
Adds an image source that loads image data from a URL.
public void AddImageSourceUrl(string sourceId, IReadOnlyList<LatLng> coordinates, string url)
Parameters
sourceIdstringcoordinatesIReadOnlyList<LatLng>urlstring
AddLocationIndicatorLayer(string, string)
Adds a source-free location indicator layer.
public void AddLocationIndicatorLayer(string layerId, string beforeLayerId)
Parameters
AddRasterDemSourceTiles(string, IReadOnlyList<string>, TileSourceOptions?)
Adds a raster DEM source from inline tile URL templates.
public void AddRasterDemSourceTiles(string sourceId, IReadOnlyList<string> tiles, TileSourceOptions? options)
Parameters
sourceIdstringtilesIReadOnlyList<string>optionsTileSourceOptions
AddRasterDemSourceUrl(string, string, TileSourceOptions?)
Adds a raster DEM source that loads TileJSON from a URL.
public void AddRasterDemSourceUrl(string sourceId, string url, TileSourceOptions? options)
Parameters
sourceIdstringurlstringoptionsTileSourceOptions
AddRasterSourceTiles(string, IReadOnlyList<string>, TileSourceOptions?)
Adds a raster source from inline tile URL templates.
public void AddRasterSourceTiles(string sourceId, IReadOnlyList<string> tiles, TileSourceOptions? options)
Parameters
sourceIdstringtilesIReadOnlyList<string>optionsTileSourceOptions
AddRasterSourceUrl(string, string, TileSourceOptions?)
Adds a raster source that loads TileJSON from a URL.
public void AddRasterSourceUrl(string sourceId, string url, TileSourceOptions? options)
Parameters
sourceIdstringurlstringoptionsTileSourceOptions
AddStyleLayerJson(byte[], string)
Adds a style layer from UTF-8 JSON bytes.
public void AddStyleLayerJson(byte[] layerJson, string beforeLayerId)
Parameters
AddStyleSourceJson(string, byte[])
Adds a style source from UTF-8 JSON bytes.
public void AddStyleSourceJson(string sourceId, byte[] sourceJson)
Parameters
AddVectorSourceTiles(string, IReadOnlyList<string>, TileSourceOptions?)
Adds a vector source from inline tile URL templates.
public void AddVectorSourceTiles(string sourceId, IReadOnlyList<string> tiles, TileSourceOptions? options)
Parameters
sourceIdstringtilesIReadOnlyList<string>optionsTileSourceOptions
AddVectorSourceUrl(string, string, TileSourceOptions?)
Adds a vector source that loads TileJSON from a URL.
public void AddVectorSourceUrl(string sourceId, string url, TileSourceOptions? options)
Parameters
sourceIdstringurlstringoptionsTileSourceOptions
CameraForGeometry(byte[], CameraFitOptions?)
Calculates a camera that fits geographic geometry and fit options.
public CameraOptions CameraForGeometry(byte[] geometry, CameraFitOptions? fitOptions)
Parameters
geometrybyte[]fitOptionsCameraFitOptions
Returns
CameraForLatLngBounds(LatLngBounds, CameraFitOptions?)
Calculates a camera that fits geographic bounds and fit options.
public CameraOptions CameraForLatLngBounds(LatLngBounds bounds, CameraFitOptions? fitOptions)
Parameters
boundsLatLngBoundsfitOptionsCameraFitOptions
Returns
CameraForLatLngs(IReadOnlyList<LatLng>, CameraFitOptions?)
Calculates a camera that fits geographic coordinates and fit options.
public CameraOptions CameraForLatLngs(IReadOnlyList<LatLng> coordinates, CameraFitOptions? fitOptions)
Parameters
coordinatesIReadOnlyList<LatLng>fitOptionsCameraFitOptions
Returns
CancelTransitions()
Cancels in-flight camera transitions.
public void CancelTransitions()
Close()
Destroys the map on its owner thread.
public void Close()
Remarks
Closing discards this map's queued runtime events and its recorded loading failure without a flush and without a terminal event.
CopyStyleImagePremultipliedRgba8(string)
Copies a style image as premultiplied RGBA8 pixels when it exists.
public StyleImage? CopyStyleImagePremultipliedRgba8(string imageId)
Parameters
imageIdstring
Returns
Create(RuntimeHandle, MapOptions)
Creates a map from a runtime on the runtime owner thread.
public static MapHandle Create(RuntimeHandle runtime, MapOptions options)
Parameters
runtimeRuntimeHandleoptionsMapOptions
Returns
CreateProjection()
Creates a standalone projection snapshot from the map's current camera state.
public MapProjectionHandle CreateProjection()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
DumpDebugLogs()
Asks the native map to write debug logs through the native log system.
public void DumpDebugLogs()
EaseTo(CameraOptions, AnimationOptions?)
Eases to the camera descriptor with animation options.
public void EaseTo(CameraOptions camera, AnimationOptions? animation)
Parameters
cameraCameraOptionsanimationAnimationOptions
Remarks
A null animation, or one with no
Duration, uses a duration of zero. Set Duration to animate.
FlyTo(CameraOptions, AnimationOptions?)
Flies to the camera descriptor with animation options.
public void FlyTo(CameraOptions camera, AnimationOptions? animation)
Parameters
cameraCameraOptionsanimationAnimationOptions
Remarks
Unlike the other camera commands, a null
animation, or one with no Duration, derives a
duration from the distance travelled at 1.2 rho-screenfuls per second.
GetBounds()
Gets map bounds constraints.
public BoundOptions GetBounds()
Returns
GetCamera()
Gets the current camera descriptor.
public CameraOptions GetCamera()
Returns
GetDebugOptions()
Gets native debug drawing options.
public DebugOptions GetDebugOptions()
Returns
GetEventMask()
Reports which map-originated event types this map queues.
public RuntimeEventMask GetEventMask()
Returns
Remarks
The value is the mask last set, including bits outside AllMapEvents that this map ignores. A map created with the default EventMask reports every event type this library selects by default, including any this binding does not declare.
GetFreeCameraOptions()
Gets free-camera options.
public FreeCameraOptions GetFreeCameraOptions()
Returns
GetImageSourceCoordinates(string)
Gets image source coordinates when the source exists.
public LatLng[]? GetImageSourceCoordinates(string sourceId)
Parameters
sourceIdstring
Returns
- LatLng[]
GetLayerFilter(string)
Gets one layer filter snapshot, or null when no filter exists.
public byte[]? GetLayerFilter(string layerId)
Parameters
layerIdstring
Returns
- byte[]
GetLayerMaxZoom(string)
Gets the highest zoom at which one layer draws.
public double GetLayerMaxZoom(string layerId)
Parameters
layerIdstring
Returns
Remarks
A layer with no upper bound reports double.PositiveInfinity.
GetLayerMinZoom(string)
Gets the lowest zoom at which one layer draws.
public double GetLayerMinZoom(string layerId)
Parameters
layerIdstring
Returns
Remarks
A layer with no lower bound reports double.NegativeInfinity.
GetLayerProperty(string, string)
Gets one layer property snapshot, or null when undefined.
public byte[]? GetLayerProperty(string layerId, string propertyName)
Parameters
Returns
- byte[]
GetLayerSourceId(string)
Gets one layer's source ID, empty when it carries none.
public string GetLayerSourceId(string layerId)
Parameters
layerIdstring
Returns
GetLayerSourceLayer(string)
Gets one layer's source-layer ID, empty when it carries none.
public string GetLayerSourceLayer(string layerId)
Parameters
layerIdstring
Returns
GetLayerVisibility(string)
Gets whether one layer draws.
public StyleLayerVisibility GetLayerVisibility(string layerId)
Parameters
layerIdstring
Returns
GetLoadedStyleJson()
Gets the style document this map's style was last parsed from.
public byte[] GetLoadedStyleJson()
Returns
- byte[]
Remarks
This is the loaded document, not a serialization of the live style: runtime mutations do not change it, and a failed parse leaves the previously parsed document in place. The result is empty when no document has been parsed.
GetProjectionMode()
Gets projection mode options.
public ProjectionModeOptions GetProjectionMode()
Returns
GetRenderingStatsViewEnabled()
Whether the built-in rendering statistics overlay is enabled.
public bool GetRenderingStatsViewEnabled()
Returns
GetSize()
Gets the map's logical viewport size in UI pixels and its pixel ratio. The scale factor is fixed for the lifetime of the map and is independent of any render target's scale factor.
public (uint Width, uint Height, double ScaleFactor) GetSize()
Returns
GetStyleLayerJson(string)
Gets a full style-spec layer JSON snapshot when the layer exists.
public byte[]? GetStyleLayerJson(string layerId)
Parameters
layerIdstring
Returns
- byte[]
GetStyleLightProperty(string)
Gets one style light property snapshot, or null when undefined.
public byte[]? GetStyleLightProperty(string propertyName)
Parameters
propertyNamestring
Returns
- byte[]
GetStyleTransitionOptions()
Gets the style's global transition options.
public StyleTransitionOptions GetStyleTransitionOptions()
Returns
GetStyleUrl()
Gets the URL this map's style was last requested from.
public string GetStyleUrl()
Returns
Remarks
SetStyleUrl(string) records the URL when the request is made, before the response arrives, and SetStyleJson(byte[]) clears it, so this can disagree with GetLoadedStyleJson(). The result is empty for inline JSON, for a map with no style, and for an empty URL alike.
GetTileOptions()
Gets tile tuning options.
public TileOptions GetTileOptions()
Returns
GetViewportOptions()
Gets the map's viewport options.
public ViewportOptions GetViewportOptions()
Returns
InvalidateCustomGeometrySourceRegion(string, LatLngBounds)
Invalidates custom geometry source tiles that intersect bounds.
public void InvalidateCustomGeometrySourceRegion(string sourceId, LatLngBounds bounds)
Parameters
sourceIdstringboundsLatLngBounds
InvalidateCustomGeometrySourceTile(string, CanonicalTileId)
Invalidates one custom geometry source tile.
public void InvalidateCustomGeometrySourceTile(string sourceId, CanonicalTileId tileId)
Parameters
sourceIdstringtileIdCanonicalTileId
IsFullyLoaded()
Whether the native map reports all required resources loaded.
public bool IsFullyLoaded()
Returns
IsGestureInProgress()
Whether a host-driven gesture is currently in progress.
public bool IsGestureInProgress()
Returns
JumpTo(CameraOptions)
Moves immediately to the camera descriptor, applying only non-null fields.
public void JumpTo(CameraOptions camera)
Parameters
cameraCameraOptions
LatLngBoundsForCamera(CameraOptions)
Computes geographic bounds for a camera from two viewport corners.
public LatLngBounds LatLngBoundsForCamera(CameraOptions camera)
Parameters
cameraCameraOptions
Returns
Remarks
The box is the hull of the top-left and bottom-right screen corners for that camera in the current viewport. When bearing and pitch are zero, the box equals the visible area. Those corners are the northwest and southeast of the viewport. Longitudes stay in -180 to 180.
LatLngBoundsForCameraUnwrapped(CameraOptions)
Computes geographic bounds for a camera from the four viewport corners.
public LatLngBounds LatLngBoundsForCameraUnwrapped(CameraOptions camera)
Parameters
cameraCameraOptions
Returns
Remarks
The axis-aligned hull of all four screen corners and the center encompasses the projected viewport. Longitudes unwrap onto the shortest path through the center. A viewport that crosses the antimeridian reports values outside -180 to 180.
LatLngForPixel(ScreenPoint)
Converts a screen pixel to a geographic coordinate using the current map projection.
public LatLng LatLngForPixel(ScreenPoint point)
Parameters
pointScreenPoint
Returns
LatLngsForPixels(IReadOnlyList<ScreenPoint>)
Converts screen pixels to geographic coordinates using the current map projection.
public LatLng[] LatLngsForPixels(IReadOnlyList<ScreenPoint> points)
Parameters
pointsIReadOnlyList<ScreenPoint>
Returns
- LatLng[]
MoveBy(double, double)
Moves the map by a screen delta.
public void MoveBy(double deltaX, double deltaY)
Parameters
MoveByAnimated(double, double, AnimationOptions?)
Moves the map by a screen delta with animation options.
public void MoveByAnimated(double deltaX, double deltaY, AnimationOptions? animation)
Parameters
deltaXdoubledeltaYdoubleanimationAnimationOptions
Remarks
A null animation, or one with no
Duration, applies the change instantly; see EaseTo(CameraOptions, AnimationOptions?).
MoveStyleLayer(string, string)
Moves a style layer before another layer, or to the top when beforeLayerId is empty.
public void MoveStyleLayer(string layerId, string beforeLayerId)
Parameters
PitchBy(double)
Pitches the map by a delta in degrees.
public void PitchBy(double pitch)
Parameters
pitchdouble
PitchByAnimated(double, AnimationOptions?)
Pitches the map by a delta in degrees with animation options.
public void PitchByAnimated(double pitch, AnimationOptions? animation)
Parameters
pitchdoubleanimationAnimationOptions
Remarks
A null animation, or one with no
Duration, applies the change instantly; see EaseTo(CameraOptions, AnimationOptions?).
PixelForLatLng(LatLng)
Converts a geographic coordinate to a screen pixel using the current map projection.
public ScreenPoint PixelForLatLng(LatLng coordinate)
Parameters
coordinateLatLng
Returns
PixelsForLatLngs(IReadOnlyList<LatLng>)
Converts geographic coordinates to screen pixels using the current map projection.
public ScreenPoint[] PixelsForLatLngs(IReadOnlyList<LatLng> coordinates)
Parameters
coordinatesIReadOnlyList<LatLng>
Returns
RemoveStyleImage(string)
Removes a style image and reports whether it existed.
public bool RemoveStyleImage(string imageId)
Parameters
imageIdstring
Returns
RemoveStyleLayer(string)
Removes a style layer and reports whether it existed.
public bool RemoveStyleLayer(string layerId)
Parameters
layerIdstring
Returns
RemoveStyleSource(string)
Removes a style source and reports whether it existed.
public bool RemoveStyleSource(string sourceId)
Parameters
sourceIdstring
Returns
RequestRepaint()
Requests a repaint for a continuous map.
public void RequestRepaint()
RequestStillImage()
Requests an asynchronous still-image render for a static map.
public void RequestStillImage()
RotateBy(ScreenPoint, ScreenPoint)
Rotates around two screen points.
public void RotateBy(ScreenPoint first, ScreenPoint second)
Parameters
firstScreenPointsecondScreenPoint
RotateByAnimated(ScreenPoint, ScreenPoint, AnimationOptions?)
Rotates around two screen points with animation options.
public void RotateByAnimated(ScreenPoint first, ScreenPoint second, AnimationOptions? animation)
Parameters
firstScreenPointsecondScreenPointanimationAnimationOptions
Remarks
A null animation, or one with no
Duration, applies the change instantly; see EaseTo(CameraOptions, AnimationOptions?).
ScaleBy(double, ScreenPoint?)
Scales the map around a screen anchor.
public void ScaleBy(double scale, ScreenPoint? anchor)
Parameters
scaledoubleanchorScreenPoint?
ScaleByAnimated(double, ScreenPoint?, AnimationOptions?)
Scales the map around a screen anchor with animation options.
public void ScaleByAnimated(double scale, ScreenPoint? anchor, AnimationOptions? animation)
Parameters
scaledoubleanchorScreenPoint?animationAnimationOptions
Remarks
A null animation, or one with no
Duration, applies the change instantly; see EaseTo(CameraOptions, AnimationOptions?).
SetBounds(BoundOptions)
Sets map bounds constraints, applying only non-null descriptor fields.
public void SetBounds(BoundOptions options)
Parameters
optionsBoundOptions
SetCustomGeometrySourceTileData(string, CanonicalTileId, byte[])
Sets custom geometry source tile data.
public void SetCustomGeometrySourceTileData(string sourceId, CanonicalTileId tileId, byte[] data)
Parameters
sourceIdstringtileIdCanonicalTileIddatabyte[]
SetDebugOptions(DebugOptions)
Sets native debug drawing options.
public void SetDebugOptions(DebugOptions options)
Parameters
optionsDebugOptions
SetEventMask(RuntimeEventMask)
Selects which map-originated event types this map queues.
public void SetEventMask(RuntimeEventMask mask)
Parameters
maskRuntimeEventMask
Remarks
The mask reads the bits in AllMapEvents and ignores the rest, so All selects every map-originated type. An event type this mask clears is never queued, so it neither reaches a batch nor wakes a parked Pump(TimeSpan, TimeSpan?). Select every event type the host reads, because MapRenderUpdateAvailable, the two still-image types, and MapCameraTransitionFinished carry state a host reaches no other way. Narrowing gates later events and keeps queued ones, so a host drains what it already caused.
SetFreeCameraOptions(FreeCameraOptions)
Sets free-camera options, applying only non-null descriptor fields.
public void SetFreeCameraOptions(FreeCameraOptions options)
Parameters
optionsFreeCameraOptions
SetGeoJsonSourceData(string, GeoJsonSourceDataHandle)
Updates a GeoJSON source with prepared data.
public void SetGeoJsonSourceData(string sourceId, GeoJsonSourceDataHandle data)
Parameters
sourceIdstringdataGeoJsonSourceDataHandle
Remarks
The call borrows data and fails when the options baked into it
differ from the source's, except for cluster properties.
SetGeoJsonSourceSynchronousTiling(string, bool)
Overrides synchronous tiling for a GeoJSON source.
public void SetGeoJsonSourceSynchronousTiling(string sourceId, bool enabled)
Parameters
Remarks
The effective behavior is the source's baked-in option OR this override.
SetGeoJsonSourceUrl(string, string)
Updates a GeoJSON source to load data from a URL.
public void SetGeoJsonSourceUrl(string sourceId, string url)
Parameters
SetGestureInProgress(bool)
Marks whether a host-driven gesture is in progress.
public void SetGestureInProgress(bool inProgress)
Parameters
inProgressbool
Remarks
SetImageSourceCoordinates(string, IReadOnlyList<LatLng>)
Updates image source coordinates.
public void SetImageSourceCoordinates(string sourceId, IReadOnlyList<LatLng> coordinates)
Parameters
sourceIdstringcoordinatesIReadOnlyList<LatLng>
SetImageSourceImage(string, PremultipliedRgba8Image)
Updates an image source with inline premultiplied RGBA8 image data.
public void SetImageSourceImage(string sourceId, PremultipliedRgba8Image image)
Parameters
sourceIdstringimagePremultipliedRgba8Image
SetImageSourceUrl(string, string)
Updates an image source to load image data from a URL.
public void SetImageSourceUrl(string sourceId, string url)
Parameters
SetLayerFilter(string, byte[]?)
Sets or clears one layer filter from UTF-8 JSON bytes.
public void SetLayerFilter(string layerId, byte[]? filter)
Parameters
SetLayerMaxZoom(string, double)
Sets the highest zoom at which one layer draws.
public void SetLayerMaxZoom(string layerId, double maxZoom)
Parameters
Remarks
Pass double.PositiveInfinity for no upper bound.
SetLayerMinZoom(string, double)
Sets the lowest zoom at which one layer draws.
public void SetLayerMinZoom(string layerId, double minZoom)
Parameters
Remarks
Pass double.NegativeInfinity for no lower bound.
SetLayerProperty(string, string, byte[])
Sets one layer property from UTF-8 JSON bytes.
public void SetLayerProperty(string layerId, string propertyName, byte[] value)
Parameters
SetLayerSourceId(string, string)
Sets one layer's source ID.
public void SetLayerSourceId(string layerId, string sourceId)
Parameters
Remarks
Layer types that take no source, such as background, are rejected. The named source need not exist yet.
SetLayerSourceLayer(string, string)
Sets one layer's source-layer ID.
public void SetLayerSourceLayer(string layerId, string sourceLayer)
Parameters
Remarks
Layer types that take no source, such as background, are rejected.
SetLayerVisibility(string, StyleLayerVisibility)
Sets whether one layer draws.
public void SetLayerVisibility(string layerId, StyleLayerVisibility visibility)
Parameters
layerIdstringvisibilityStyleLayerVisibility
SetLocationIndicatorAccuracyRadius(string, double)
Sets a location indicator layer accuracy radius in logical pixels.
public void SetLocationIndicatorAccuracyRadius(string layerId, double radius)
Parameters
SetLocationIndicatorBearing(string, double)
Sets a location indicator layer bearing in degrees.
public void SetLocationIndicatorBearing(string layerId, double bearing)
Parameters
SetLocationIndicatorImageName(string, LocationIndicatorImageKind, string)
Sets a location indicator layer image-name property.
public void SetLocationIndicatorImageName(string layerId, LocationIndicatorImageKind imageKind, string imageId)
Parameters
layerIdstringimageKindLocationIndicatorImageKindimageIdstring
SetLocationIndicatorLocation(string, LatLng, double)
Sets a location indicator layer location.
public void SetLocationIndicatorLocation(string layerId, LatLng coordinate, double altitude)
Parameters
SetProjectionMode(ProjectionModeOptions)
Sets projection mode options, applying only non-null descriptor fields.
public void SetProjectionMode(ProjectionModeOptions mode)
Parameters
SetRenderingStatsViewEnabled(bool)
Shows or hides the built-in rendering statistics overlay.
public void SetRenderingStatsViewEnabled(bool enabled)
Parameters
enabledbool
SetStyleImage(string, PremultipliedRgba8Image, StyleImageOptions?)
Sets or replaces a style image.
public void SetStyleImage(string imageId, PremultipliedRgba8Image image, StyleImageOptions? options)
Parameters
imageIdstringimagePremultipliedRgba8ImageoptionsStyleImageOptions
SetStyleJson(byte[])
Loads inline style JSON through MapLibre Native style APIs.
public void SetStyleJson(byte[] json)
Parameters
jsonbyte[]
Remarks
Malformed JSON is reported twice: this call throws the parse error, and the same message also arrives as a MapLoadingFailed runtime event. A style MapLibre rejects semantically produces neither an exception nor an event.
SetStyleLightJson(byte[])
Sets the style light document from UTF-8 JSON bytes.
public void SetStyleLightJson(byte[] lightJson)
Parameters
lightJsonbyte[]
SetStyleLightProperty(string, byte[])
Sets one style light property from UTF-8 JSON bytes.
public void SetStyleLightProperty(string propertyName, byte[] value)
Parameters
SetStyleTransitionOptions(StyleTransitionOptions)
Sets the style's global transition options.
public void SetStyleTransitionOptions(StyleTransitionOptions options)
Parameters
optionsStyleTransitionOptions
Remarks
This replaces the whole transition configuration rather than merging into it, and null duration and delay clear the style-wide override. Loading a style replaces these options, so apply an override after the style loads.
SetStyleUrl(string)
Loads a style URL through MapLibre Native style APIs.
public void SetStyleUrl(string url)
Parameters
urlstring
Remarks
Loading is asynchronous: a style that is missing, unreachable, or malformed returns normally here and reports through a MapLoadingFailed runtime event. A style MapLibre rejects semantically produces neither an exception nor an event.
SetTileOptions(TileOptions)
Sets tile tuning options, applying only non-null descriptor fields.
public void SetTileOptions(TileOptions options)
Parameters
optionsTileOptions
SetViewportOptions(ViewportOptions)
Sets viewport options, applying only non-null descriptor fields.
public void SetViewportOptions(ViewportOptions options)
Parameters
optionsViewportOptions
StyleImageExists(string)
Whether a style image exists.
public bool StyleImageExists(string imageId)
Parameters
imageIdstring
Returns
StyleImageInfo(string)
Gets style image metadata when the image exists.
public StyleImageInfo? StyleImageInfo(string imageId)
Parameters
imageIdstring
Returns
StyleImageStretches(string)
Copies a style image's stretchable intervals when it exists.
public (IReadOnlyList<ImageStretch> StretchX, IReadOnlyList<ImageStretch> StretchY)? StyleImageStretches(string imageId)
Parameters
imageIdstring
Returns
StyleLayerExists(string)
Whether a style layer exists.
public bool StyleLayerExists(string layerId)
Parameters
layerIdstring
Returns
StyleLayerIds()
Lists style layer IDs in style order.
public string[] StyleLayerIds()
Returns
- string[]
StyleLayerType(string)
Gets a style layer type when the layer exists.
public string? StyleLayerType(string layerId)
Parameters
layerIdstring
Returns
StyleSourceExists(string)
Whether a style source exists.
public bool StyleSourceExists(string sourceId)
Parameters
sourceIdstring
Returns
StyleSourceIds()
Lists style source IDs in style order.
public string[] StyleSourceIds()
Returns
- string[]
StyleSourceInfo(string)
Gets copied style source metadata when the source exists.
public SourceInfo? StyleSourceInfo(string sourceId)
Parameters
sourceIdstring
Returns
StyleSourceType(string)
Gets a style source type when the source exists.
public SourceType? StyleSourceType(string sourceId)
Parameters
sourceIdstring