Table of Contents

Class MapProjectionHandle

Namespace
Maplibre.NativeFfi.Map
Assembly
Maplibre.NativeFfi.dll

Owner-thread projection snapshot handle.

public sealed class MapProjectionHandle : IDisposable
Inheritance
MapProjectionHandle
Implements
Inherited Members

Properties

IsClosed

Whether this wrapper has successfully closed its native handle.

public bool IsClosed { get; }

Property Value

bool

Methods

Close()

Destroys the projection on its owner thread.

public void Close()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetCamera()

Gets the projection camera descriptor.

public CameraOptions GetCamera()

Returns

CameraOptions

LatLngForPixel(ScreenPoint)

Converts a screen pixel to a geographic coordinate using this projection snapshot.

public LatLng LatLngForPixel(ScreenPoint point)

Parameters

point ScreenPoint

Returns

LatLng

PixelForLatLng(LatLng)

Converts a geographic coordinate to a screen pixel using this projection snapshot.

public ScreenPoint PixelForLatLng(LatLng coordinate)

Parameters

coordinate LatLng

Returns

ScreenPoint

SetCamera(CameraOptions)

Sets the projection camera descriptor, applying only non-null fields.

public void SetCamera(CameraOptions camera)

Parameters

camera CameraOptions

SetVisibleCoordinates(IReadOnlyList<LatLng>, EdgeInsets)

Sets a camera that makes the supplied coordinates visible with padding.

public void SetVisibleCoordinates(IReadOnlyList<LatLng> coordinates, EdgeInsets padding)

Parameters

coordinates IReadOnlyList<LatLng>
padding EdgeInsets

SetVisibleGeometry(byte[], EdgeInsets)

Sets a camera that makes the supplied geometry visible with padding.

public void SetVisibleGeometry(byte[] geometry, EdgeInsets padding)

Parameters

geometry byte[]
padding EdgeInsets