Table of Contents

Class NativeMethods

Namespace
MapLibreNative.Maui

Raw P/Invoke bindings — prefer the typed wrappers in MbglMap etc.

public static class NativeMethods
Inheritance
NativeMethods
Inherited Members

Methods

FreeString(IntPtr)

public static void FreeString(IntPtr str)

Parameters

str IntPtr

FrontendCreateGl(IntPtr, IntPtr, int, int, float, RenderFn, IntPtr)

public static IntPtr FrontendCreateGl(IntPtr surfaceHandle, IntPtr glContext, int widthPx, int heightPx, float pixelRatio, NativeMethods.RenderFn renderCallback, IntPtr renderUserdata)

Parameters

surfaceHandle IntPtr
glContext IntPtr
widthPx int
heightPx int
pixelRatio float
renderCallback NativeMethods.RenderFn
renderUserdata IntPtr

Returns

IntPtr

FrontendDestroy(IntPtr)

public static MbglStatus FrontendDestroy(IntPtr fe)

Parameters

fe IntPtr

Returns

MbglStatus

FrontendGetNativeView(IntPtr)

public static IntPtr FrontendGetNativeView(IntPtr fe)

Parameters

fe IntPtr

Returns

IntPtr

FrontendRender(IntPtr)

public static MbglStatus FrontendRender(IntPtr fe)

Parameters

fe IntPtr

Returns

MbglStatus

FrontendSetSize(IntPtr, int, int)

public static MbglStatus FrontendSetSize(IntPtr fe, int widthPx, int heightPx)

Parameters

fe IntPtr
widthPx int
heightPx int

Returns

MbglStatus

GeoJsonSourceSetData(IntPtr, string)

public static MbglStatus GeoJsonSourceSetData(IntPtr source, string geojson)

Parameters

source IntPtr
geojson string

Returns

MbglStatus

GeoJsonSourceSetUrl(IntPtr, string)

public static MbglStatus GeoJsonSourceSetUrl(IntPtr source, string url)

Parameters

source IntPtr
url string

Returns

MbglStatus

GetLastError()

Returns a thread-local string describing the most recent non-OK status.

public static string GetLastError()

Returns

string

InstallLogCallback(LogFn?, IntPtr)

Install a process-global log callback. Pass null to restore default logging.

public static MbglStatus InstallLogCallback(NativeMethods.LogFn? fn, IntPtr userdata)

Parameters

fn NativeMethods.LogFn
userdata IntPtr

Returns

MbglStatus

LayerGetLayoutProperty(IntPtr, string)

public static IntPtr LayerGetLayoutProperty(IntPtr layer, string name)

Parameters

layer IntPtr
name string

Returns

IntPtr

LayerGetPaintProperty(IntPtr, string)

public static IntPtr LayerGetPaintProperty(IntPtr layer, string name)

Parameters

layer IntPtr
name string

Returns

IntPtr

LayerGetVisibility(IntPtr)

public static int LayerGetVisibility(IntPtr layer)

Parameters

layer IntPtr

Returns

int

LayerSetFilter(IntPtr, string)

public static MbglStatus LayerSetFilter(IntPtr layer, string filterJson)

Parameters

layer IntPtr
filterJson string

Returns

MbglStatus

LayerSetLayoutProperty(IntPtr, string, string)

public static MbglStatus LayerSetLayoutProperty(IntPtr layer, string name, string valueJson)

Parameters

layer IntPtr
name string
valueJson string

Returns

MbglStatus

LayerSetMaxZoom(IntPtr, float)

public static MbglStatus LayerSetMaxZoom(IntPtr layer, float zoom)

Parameters

layer IntPtr
zoom float

Returns

MbglStatus

LayerSetMinZoom(IntPtr, float)

public static MbglStatus LayerSetMinZoom(IntPtr layer, float zoom)

Parameters

layer IntPtr
zoom float

Returns

MbglStatus

LayerSetPaintProperty(IntPtr, string, string)

public static MbglStatus LayerSetPaintProperty(IntPtr layer, string name, string valueJson)

Parameters

layer IntPtr
name string
valueJson string

Returns

MbglStatus

LayerSetSourceLayer(IntPtr, string)

public static MbglStatus LayerSetSourceLayer(IntPtr layer, string sourceLayer)

Parameters

layer IntPtr
sourceLayer string

Returns

MbglStatus

LayerSetVisibility(IntPtr, int)

public static MbglStatus LayerSetVisibility(IntPtr layer, int visible)

Parameters

layer IntPtr
visible int

Returns

MbglStatus

MapCameraForBounds(IntPtr, double, double, double, double, double, double, double, double, out double, out double, out double, out double, out double)

public static MbglStatus MapCameraForBounds(IntPtr map, double latSw, double lonSw, double latNe, double lonNe, double padTop, double padLeft, double padBottom, double padRight, out double outLat, out double outLon, out double outZoom, out double outBearing, out double outPitch)

Parameters

map IntPtr
latSw double
lonSw double
latNe double
lonNe double
padTop double
padLeft double
padBottom double
padRight double
outLat double
outLon double
outZoom double
outBearing double
outPitch double

Returns

MbglStatus

MapCameraForLatLngs(IntPtr, double*, int, double, double, double, double, out double, out double, out double, out double, out double)

public static MbglStatus MapCameraForLatLngs(IntPtr map, double* latLngs, int count, double padTop, double padLeft, double padBottom, double padRight, out double outLat, out double outLon, out double outZoom, out double outBearing, out double outPitch)

Parameters

map IntPtr
latLngs double*
count int
padTop double
padLeft double
padBottom double
padRight double
outLat double
outLon double
outZoom double
outBearing double
outPitch double

Returns

MbglStatus

MapCancelTransitions(IntPtr)

public static MbglStatus MapCancelTransitions(IntPtr map)

Parameters

map IntPtr

Returns

MbglStatus

MapCreate(IntPtr, IntPtr, string?, string?, float, MapObserverFn?, IntPtr)

public static IntPtr MapCreate(IntPtr fe, IntPtr rl, string? cachePath, string? assetPath, float pixelRatio, NativeMethods.MapObserverFn? observer, IntPtr observerUserdata)

Parameters

fe IntPtr
rl IntPtr
cachePath string
assetPath string
pixelRatio float
observer NativeMethods.MapObserverFn
observerUserdata IntPtr

Returns

IntPtr

MapCreate2(IntPtr, IntPtr, string?, string?, string?, ulong, float, MapObserverFn?, IntPtr)

Extended map factory: adds an API key and a maximum disk-cache size (bytes; 0 = MapLibre default) on top of MapCreate(IntPtr, IntPtr, string?, string?, float, MapObserverFn?, IntPtr).

public static IntPtr MapCreate2(IntPtr fe, IntPtr rl, string? cachePath, string? assetPath, string? apiKey, ulong maxCacheSizeBytes, float pixelRatio, NativeMethods.MapObserverFn? observer, IntPtr observerUserdata)

Parameters

fe IntPtr
rl IntPtr
cachePath string
assetPath string
apiKey string
maxCacheSizeBytes ulong
pixelRatio float
observer NativeMethods.MapObserverFn
observerUserdata IntPtr

Returns

IntPtr

MapDestroy(IntPtr)

public static MbglStatus MapDestroy(IntPtr map)

Parameters

map IntPtr

Returns

MbglStatus

MapDumpDebugLogs(IntPtr)

public static MbglStatus MapDumpDebugLogs(IntPtr map)

Parameters

map IntPtr

Returns

MbglStatus

MapEaseTo(IntPtr, double, double, double, double, double, long)

public static MbglStatus MapEaseTo(IntPtr map, double lat, double lon, double zoom, double bearing, double pitch, long durationMs)

Parameters

map IntPtr
lat double
lon double
zoom double
bearing double
pitch double
durationMs long

Returns

MbglStatus

MapEaseToPadded(IntPtr, double, double, double, double, double, double, double, double, double, long)

public static MbglStatus MapEaseToPadded(IntPtr map, double lat, double lon, double zoom, double bearing, double pitch, double padTop, double padLeft, double padBottom, double padRight, long durationMs)

Parameters

map IntPtr
lat double
lon double
zoom double
bearing double
pitch double
padTop double
padLeft double
padBottom double
padRight double
durationMs long

Returns

MbglStatus

MapFlyTo(IntPtr, double, double, double, double, double, long)

public static MbglStatus MapFlyTo(IntPtr map, double lat, double lon, double zoom, double bearing, double pitch, long durationMs)

Parameters

map IntPtr
lat double
lon double
zoom double
bearing double
pitch double
durationMs long

Returns

MbglStatus

MapFlyToPadded(IntPtr, double, double, double, double, double, double, double, double, double, long)

public static MbglStatus MapFlyToPadded(IntPtr map, double lat, double lon, double zoom, double bearing, double pitch, double padTop, double padLeft, double padBottom, double padRight, long durationMs)

Parameters

map IntPtr
lat double
lon double
zoom double
bearing double
pitch double
padTop double
padLeft double
padBottom double
padRight double
durationMs long

Returns

MbglStatus

MapGetBearing(IntPtr)

public static double MapGetBearing(IntPtr map)

Parameters

map IntPtr

Returns

double

MapGetBounds(IntPtr, out double, out double, out double, out double, out double, out double, out double, out double)

public static void MapGetBounds(IntPtr map, out double latSw, out double lonSw, out double latNe, out double lonNe, out double minZoom, out double maxZoom, out double minPitch, out double maxPitch)

Parameters

map IntPtr
latSw double
lonSw double
latNe double
lonNe double
minZoom double
maxZoom double
minPitch double
maxPitch double

MapGetCamera(IntPtr, double, double, double, double, out double, out double, out double, out double, out double)

public static MbglStatus MapGetCamera(IntPtr map, double padTop, double padLeft, double padBottom, double padRight, out double outLat, out double outLon, out double outZoom, out double outBearing, out double outPitch)

Parameters

map IntPtr
padTop double
padLeft double
padBottom double
padRight double
outLat double
outLon double
outZoom double
outBearing double
outPitch double

Returns

MbglStatus

MapGetCenter(IntPtr, out double, out double)

public static void MapGetCenter(IntPtr map, out double lat, out double lon)

Parameters

map IntPtr
lat double
lon double

MapGetDebugOptions(IntPtr)

public static int MapGetDebugOptions(IntPtr map)

Parameters

map IntPtr

Returns

int

MapGetFeatureState(IntPtr, string, string?, string)

public static IntPtr MapGetFeatureState(IntPtr map, string sourceId, string? sourceLayerId, string featureId)

Parameters

map IntPtr
sourceId string
sourceLayerId string
featureId string

Returns

IntPtr

MapGetPitch(IntPtr)

public static double MapGetPitch(IntPtr map)

Parameters

map IntPtr

Returns

double

MapGetPrefetchZoomDelta(IntPtr)

public static int MapGetPrefetchZoomDelta(IntPtr map)

Parameters

map IntPtr

Returns

int

MapGetStyle(IntPtr)

public static IntPtr MapGetStyle(IntPtr map)

Parameters

map IntPtr

Returns

IntPtr

MapGetZoom(IntPtr)

public static double MapGetZoom(IntPtr map)

Parameters

map IntPtr

Returns

double

MapIsFullyLoaded(IntPtr)

public static int MapIsFullyLoaded(IntPtr map)

Parameters

map IntPtr

Returns

int

MapIsGestureInProgress(IntPtr)

public static int MapIsGestureInProgress(IntPtr map)

Parameters

map IntPtr

Returns

int

MapIsPanning(IntPtr)

public static int MapIsPanning(IntPtr map)

Parameters

map IntPtr

Returns

int

MapIsRotating(IntPtr)

public static int MapIsRotating(IntPtr map)

Parameters

map IntPtr

Returns

int

MapIsScaling(IntPtr)

public static int MapIsScaling(IntPtr map)

Parameters

map IntPtr

Returns

int

MapJumpTo(IntPtr, double, double, double, double, double)

public static MbglStatus MapJumpTo(IntPtr map, double lat, double lon, double zoom, double bearing, double pitch)

Parameters

map IntPtr
lat double
lon double
zoom double
bearing double
pitch double

Returns

MbglStatus

MapJumpToPadded(IntPtr, double, double, double, double, double, double, double, double, double)

public static MbglStatus MapJumpToPadded(IntPtr map, double lat, double lon, double zoom, double bearing, double pitch, double padTop, double padLeft, double padBottom, double padRight)

Parameters

map IntPtr
lat double
lon double
zoom double
bearing double
pitch double
padTop double
padLeft double
padBottom double
padRight double

Returns

MbglStatus

MapLatLngBoundsForCamera(IntPtr, double*, double*, double*, double*)

public static MbglStatus MapLatLngBoundsForCamera(IntPtr map, double* outLatSw, double* outLonSw, double* outLatNe, double* outLonNe)

Parameters

map IntPtr
outLatSw double*
outLonSw double*
outLatNe double*
outLonNe double*

Returns

MbglStatus

MapLatLngForPixel(IntPtr, double, double, out double, out double)

public static void MapLatLngForPixel(IntPtr map, double x, double y, out double outLat, out double outLon)

Parameters

map IntPtr
x double
y double
outLat double
outLon double

MapLatLngsForPixels(IntPtr, double*, int, double*)

public static MbglStatus MapLatLngsForPixels(IntPtr map, double* xy, int count, double* outLatLngs)

Parameters

map IntPtr
xy double*
count int
outLatLngs double*

Returns

MbglStatus

MapMoveBy(IntPtr, double, double, long)

public static MbglStatus MapMoveBy(IntPtr map, double dx, double dy, long durationMs)

Parameters

map IntPtr
dx double
dy double
durationMs long

Returns

MbglStatus

MapOnDoubleTap(IntPtr, double, double)

public static MbglStatus MapOnDoubleTap(IntPtr map, double x, double y)

Parameters

map IntPtr
x double
y double

Returns

MbglStatus

MapOnPanEnd(IntPtr)

public static MbglStatus MapOnPanEnd(IntPtr map)

Parameters

map IntPtr

Returns

MbglStatus

MapOnPanMove(IntPtr, double, double)

public static MbglStatus MapOnPanMove(IntPtr map, double dx, double dy)

Parameters

map IntPtr
dx double
dy double

Returns

MbglStatus

MapOnPanStart(IntPtr, double, double)

public static MbglStatus MapOnPanStart(IntPtr map, double x, double y)

Parameters

map IntPtr
x double
y double

Returns

MbglStatus

MapOnPinch(IntPtr, double, double, double)

public static MbglStatus MapOnPinch(IntPtr map, double scaleFactor, double cx, double cy)

Parameters

map IntPtr
scaleFactor double
cx double
cy double

Returns

MbglStatus

MapOnScroll(IntPtr, double, double, double)

public static MbglStatus MapOnScroll(IntPtr map, double delta, double cx, double cy)

Parameters

map IntPtr
delta double
cx double
cy double

Returns

MbglStatus

MapPitchBy(IntPtr, double, long)

public static MbglStatus MapPitchBy(IntPtr map, double deltaDegrees, long durationMs)

Parameters

map IntPtr
deltaDegrees double
durationMs long

Returns

MbglStatus

MapPixelForLatLng(IntPtr, double, double, out double, out double)

public static void MapPixelForLatLng(IntPtr map, double lat, double lon, out double outX, out double outY)

Parameters

map IntPtr
lat double
lon double
outX double
outY double

MapPixelsForLatLngs(IntPtr, double*, int, double*)

public static MbglStatus MapPixelsForLatLngs(IntPtr map, double* latLngs, int count, double* outXy)

Parameters

map IntPtr
latLngs double*
count int
outXy double*

Returns

MbglStatus

MapQueryFeatureExtensions(IntPtr, string, string, string, string, string?)

public static IntPtr MapQueryFeatureExtensions(IntPtr map, string sourceId, string featureJson, string extension, string extensionField, string? argsJson)

Parameters

map IntPtr
sourceId string
featureJson string
extension string
extensionField string
argsJson string

Returns

IntPtr

MapQueryRenderedFeaturesAtPoint(IntPtr, double, double, string?)

public static IntPtr MapQueryRenderedFeaturesAtPoint(IntPtr map, double x, double y, string? layerIds)

Parameters

map IntPtr
x double
y double
layerIds string

Returns

IntPtr

MapQueryRenderedFeaturesInBox(IntPtr, double, double, double, double, string?)

public static IntPtr MapQueryRenderedFeaturesInBox(IntPtr map, double x1, double y1, double x2, double y2, string? layerIds)

Parameters

map IntPtr
x1 double
y1 double
x2 double
y2 double
layerIds string

Returns

IntPtr

MapQuerySourceFeatures(IntPtr, string, string?, string?)

public static IntPtr MapQuerySourceFeatures(IntPtr map, string sourceId, string? sourceLayerIds, string? filterJson)

Parameters

map IntPtr
sourceId string
sourceLayerIds string
filterJson string

Returns

IntPtr

MapReduceMemoryUse(IntPtr)

public static MbglStatus MapReduceMemoryUse(IntPtr map)

Parameters

map IntPtr

Returns

MbglStatus

MapRemoveFeatureState(IntPtr, string, string?, string?, string?)

public static MbglStatus MapRemoveFeatureState(IntPtr map, string sourceId, string? sourceLayerId, string? featureId, string? stateKey)

Parameters

map IntPtr
sourceId string
sourceLayerId string
featureId string
stateKey string

Returns

MbglStatus

MapRotateBy(IntPtr, double, double, double, double)

public static MbglStatus MapRotateBy(IntPtr map, double x0, double y0, double x1, double y1)

Parameters

map IntPtr
x0 double
y0 double
x1 double
y1 double

Returns

MbglStatus

MapScaleBy(IntPtr, double, double, double, long)

public static MbglStatus MapScaleBy(IntPtr map, double scale, double anchorX, double anchorY, long durationMs)

Parameters

map IntPtr
scale double
anchorX double
anchorY double
durationMs long

Returns

MbglStatus

MapSetBounds(IntPtr, double, double, double, double, double, double, double, double)

public static MbglStatus MapSetBounds(IntPtr map, double latSw, double lonSw, double latNe, double lonNe, double minZoom, double maxZoom, double minPitch, double maxPitch)

Parameters

map IntPtr
latSw double
lonSw double
latNe double
lonNe double
minZoom double
maxZoom double
minPitch double
maxPitch double

Returns

MbglStatus

MapSetConstrainMode(IntPtr, int)

public static MbglStatus MapSetConstrainMode(IntPtr map, int mode)

Parameters

map IntPtr
mode int

Returns

MbglStatus

MapSetDebugOptions(IntPtr, int)

public static MbglStatus MapSetDebugOptions(IntPtr map, int options)

Parameters

map IntPtr
options int

Returns

MbglStatus

MapSetFeatureState(IntPtr, string, string?, string, string)

public static MbglStatus MapSetFeatureState(IntPtr map, string sourceId, string? sourceLayerId, string featureId, string stateJson)

Parameters

map IntPtr
sourceId string
sourceLayerId string
featureId string
stateJson string

Returns

MbglStatus

MapSetGestureInProgress(IntPtr, int)

public static MbglStatus MapSetGestureInProgress(IntPtr map, int inProgress)

Parameters

map IntPtr
inProgress int

Returns

MbglStatus

MapSetMaxZoom(IntPtr, double)

public static MbglStatus MapSetMaxZoom(IntPtr map, double zoom)

Parameters

map IntPtr
zoom double

Returns

MbglStatus

MapSetMinZoom(IntPtr, double)

public static MbglStatus MapSetMinZoom(IntPtr map, double zoom)

Parameters

map IntPtr
zoom double

Returns

MbglStatus

MapSetNorthOrientation(IntPtr, int)

public static MbglStatus MapSetNorthOrientation(IntPtr map, int orientation)

Parameters

map IntPtr
orientation int

Returns

MbglStatus

MapSetPrefetchZoomDelta(IntPtr, int)

public static MbglStatus MapSetPrefetchZoomDelta(IntPtr map, int delta)

Parameters

map IntPtr
delta int

Returns

MbglStatus

MapSetProjectionMode(IntPtr, int, double, double)

public static MbglStatus MapSetProjectionMode(IntPtr map, int axonometric, double xSkew, double ySkew)

Parameters

map IntPtr
axonometric int
xSkew double
ySkew double

Returns

MbglStatus

MapSetSize(IntPtr, int, int)

public static MbglStatus MapSetSize(IntPtr map, int widthPx, int heightPx)

Parameters

map IntPtr
widthPx int
heightPx int

Returns

MbglStatus

MapSetStyleJson(IntPtr, string)

public static MbglStatus MapSetStyleJson(IntPtr map, string json)

Parameters

map IntPtr
json string

Returns

MbglStatus

MapSetStyleUrl(IntPtr, string)

public static MbglStatus MapSetStyleUrl(IntPtr map, string url)

Parameters

map IntPtr
url string

Returns

MbglStatus

MapSetTileLodMinRadius(IntPtr, double)

public static MbglStatus MapSetTileLodMinRadius(IntPtr map, double radius)

Parameters

map IntPtr
radius double

Returns

MbglStatus

MapSetTileLodMode(IntPtr, int)

public static MbglStatus MapSetTileLodMode(IntPtr map, int mode)

Parameters

map IntPtr
mode int

Returns

MbglStatus

MapSetTileLodPitchThreshold(IntPtr, double)

public static MbglStatus MapSetTileLodPitchThreshold(IntPtr map, double thresholdRad)

Parameters

map IntPtr
thresholdRad double

Returns

MbglStatus

MapSetTileLodScale(IntPtr, double)

public static MbglStatus MapSetTileLodScale(IntPtr map, double scale)

Parameters

map IntPtr
scale double

Returns

MbglStatus

MapSetTileLodZoomShift(IntPtr, double)

public static MbglStatus MapSetTileLodZoomShift(IntPtr map, double shift)

Parameters

map IntPtr
shift double

Returns

MbglStatus

MapSetViewportMode(IntPtr, int)

public static MbglStatus MapSetViewportMode(IntPtr map, int mode)

Parameters

map IntPtr
mode int

Returns

MbglStatus

MapTriggerRepaint(IntPtr)

public static MbglStatus MapTriggerRepaint(IntPtr map)

Parameters

map IntPtr

Returns

MbglStatus

NetworkStatusGet()

Returns 1 if the network is in online mode, 0 if offline.

public static int NetworkStatusGet()

Returns

int

NetworkStatusSet(int)

Toggle the process-global network state. Pass 0 to force offline mode (serve only cached resources), 1 to restore online mode.

public static MbglStatus NetworkStatusSet(int online)

Parameters

online int

Returns

MbglStatus

OfflineClearAmbientCache(IntPtr, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineClearAmbientCache(IntPtr m, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineCreateRegion(IntPtr, string, double, double, double, double, double, double, float, int, byte[]?, int, OfflineRegionsFn, IntPtr)

public static MbglStatus OfflineCreateRegion(IntPtr m, string styleUrl, double latSw, double lonSw, double latNe, double lonNe, double minZoom, double maxZoom, float pixelRatio, int includeIdeographs, byte[]? metadata, int metadataLen, NativeMethods.OfflineRegionsFn cb, IntPtr userdata)

Parameters

m IntPtr
styleUrl string
latSw double
lonSw double
latNe double
lonNe double
minZoom double
maxZoom double
pixelRatio float
includeIdeographs int
metadata byte[]
metadataLen int
cb NativeMethods.OfflineRegionsFn
userdata IntPtr

Returns

MbglStatus

OfflineCreateRegionGeometry(IntPtr, string, string, double, double, float, int, byte[]?, int, OfflineRegionsFn, IntPtr)

public static MbglStatus OfflineCreateRegionGeometry(IntPtr m, string styleUrl, string geometryGeoJson, double minZoom, double maxZoom, float pixelRatio, int includeIdeographs, byte[]? metadata, int metadataLen, NativeMethods.OfflineRegionsFn cb, IntPtr userdata)

Parameters

m IntPtr
styleUrl string
geometryGeoJson string
minZoom double
maxZoom double
pixelRatio float
includeIdeographs int
metadata byte[]
metadataLen int
cb NativeMethods.OfflineRegionsFn
userdata IntPtr

Returns

MbglStatus

OfflineDeleteRegion(IntPtr, long, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineDeleteRegion(IntPtr m, long regionId, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
regionId long
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineGetRegionStatus(IntPtr, long, OfflineStatusFn, IntPtr)

public static MbglStatus OfflineGetRegionStatus(IntPtr m, long regionId, NativeMethods.OfflineStatusFn cb, IntPtr userdata)

Parameters

m IntPtr
regionId long
cb NativeMethods.OfflineStatusFn
userdata IntPtr

Returns

MbglStatus

OfflineInvalidateAmbientCache(IntPtr, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineInvalidateAmbientCache(IntPtr m, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineInvalidateRegion(IntPtr, long, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineInvalidateRegion(IntPtr m, long regionId, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
regionId long
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineListRegions(IntPtr, OfflineRegionsFn, IntPtr)

public static MbglStatus OfflineListRegions(IntPtr m, NativeMethods.OfflineRegionsFn cb, IntPtr userdata)

Parameters

m IntPtr
cb NativeMethods.OfflineRegionsFn
userdata IntPtr

Returns

MbglStatus

OfflineManagerCreate(string?, string?, string?, ulong)

public static IntPtr OfflineManagerCreate(string? cachePath, string? assetPath, string? apiKey, ulong maxCacheSizeBytes)

Parameters

cachePath string
assetPath string
apiKey string
maxCacheSizeBytes ulong

Returns

IntPtr

OfflineManagerDestroy(IntPtr)

public static MbglStatus OfflineManagerDestroy(IntPtr m)

Parameters

m IntPtr

Returns

MbglStatus

OfflineMergeDatabase(IntPtr, string, OfflineRegionsFn, IntPtr)

public static MbglStatus OfflineMergeDatabase(IntPtr m, string sideDbPath, NativeMethods.OfflineRegionsFn cb, IntPtr userdata)

Parameters

m IntPtr
sideDbPath string
cb NativeMethods.OfflineRegionsFn
userdata IntPtr

Returns

MbglStatus

OfflinePackDatabase(IntPtr, OfflineDoneFn, IntPtr)

public static MbglStatus OfflinePackDatabase(IntPtr m, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineRegionGetMetadata(IntPtr, long, out int)

public static IntPtr OfflineRegionGetMetadata(IntPtr m, long regionId, out int outLen)

Parameters

m IntPtr
regionId long
outLen int

Returns

IntPtr

OfflineResetDatabase(IntPtr, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineResetDatabase(IntPtr m, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineSetMaximumAmbientCacheSize(IntPtr, ulong, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineSetMaximumAmbientCacheSize(IntPtr m, ulong bytes, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
bytes ulong
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

OfflineSetPackDatabaseAutomatically(IntPtr, int)

public static MbglStatus OfflineSetPackDatabaseAutomatically(IntPtr m, int enabled)

Parameters

m IntPtr
enabled int

Returns

MbglStatus

OfflineSetRegionDownloadState(IntPtr, long, int)

public static MbglStatus OfflineSetRegionDownloadState(IntPtr m, long regionId, int active)

Parameters

m IntPtr
regionId long
active int

Returns

MbglStatus

OfflineSetRegionObserver(IntPtr, long, OfflineProgressFn?, OfflineRegionErrorFn?, IntPtr)

public static MbglStatus OfflineSetRegionObserver(IntPtr m, long regionId, NativeMethods.OfflineProgressFn? progress, NativeMethods.OfflineRegionErrorFn? error, IntPtr userdata)

Parameters

m IntPtr
regionId long
progress NativeMethods.OfflineProgressFn
error NativeMethods.OfflineRegionErrorFn
userdata IntPtr

Returns

MbglStatus

OfflineSetTileCountLimit(IntPtr, ulong)

public static MbglStatus OfflineSetTileCountLimit(IntPtr m, ulong limit)

Parameters

m IntPtr
limit ulong

Returns

MbglStatus

OfflineUpdateRegionMetadata(IntPtr, long, byte[]?, int, OfflineDoneFn, IntPtr)

public static MbglStatus OfflineUpdateRegionMetadata(IntPtr m, long regionId, byte[]? metadata, int metadataLen, NativeMethods.OfflineDoneFn cb, IntPtr userdata)

Parameters

m IntPtr
regionId long
metadata byte[]
metadataLen int
cb NativeMethods.OfflineDoneFn
userdata IntPtr

Returns

MbglStatus

RunLoopCreate()

public static IntPtr RunLoopCreate()

Returns

IntPtr

RunLoopDestroy(IntPtr)

public static MbglStatus RunLoopDestroy(IntPtr rl)

Parameters

rl IntPtr

Returns

MbglStatus

RunLoopRunOnce(IntPtr)

public static MbglStatus RunLoopRunOnce(IntPtr rl)

Parameters

rl IntPtr

Returns

MbglStatus

SourceGetAttribution(IntPtr)

Returns the attribution text of a source (may be NULL). Caller frees with FreeString.

public static IntPtr SourceGetAttribution(IntPtr source)

Parameters

source IntPtr

Returns

IntPtr

StyleAddBackgroundLayer(IntPtr, string, string?)

public static IntPtr StyleAddBackgroundLayer(IntPtr style, string layerId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
beforeLayerId string

Returns

IntPtr

StyleAddCircleLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddCircleLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddColorReliefLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddColorReliefLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddFillExtrusionLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddFillExtrusionLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddFillLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddFillLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddGeoJsonSource(IntPtr, string)

public static IntPtr StyleAddGeoJsonSource(IntPtr style, string sourceId)

Parameters

style IntPtr
sourceId string

Returns

IntPtr

StyleAddGeoJsonSourceOptions(IntPtr, string, string?)

public static IntPtr StyleAddGeoJsonSourceOptions(IntPtr style, string sourceId, string? optionsJson)

Parameters

style IntPtr
sourceId string
optionsJson string

Returns

IntPtr

StyleAddGeoJsonSourceUrl(IntPtr, string, string)

public static IntPtr StyleAddGeoJsonSourceUrl(IntPtr style, string sourceId, string url)

Parameters

style IntPtr
sourceId string
url string

Returns

IntPtr

StyleAddHeatmapLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddHeatmapLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddHillshadeLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddHillshadeLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddImage(IntPtr, string, int, int, float, int, byte*)

public static MbglStatus StyleAddImage(IntPtr style, string imageId, int width, int height, float pixelRatio, int sdf, byte* rgbaPremultiplied)

Parameters

style IntPtr
imageId string
width int
height int
pixelRatio float
sdf int
rgbaPremultiplied byte*

Returns

MbglStatus

StyleAddImageSource(IntPtr, string, string, double, double, double, double, double, double, double, double)

public static IntPtr StyleAddImageSource(IntPtr style, string sourceId, string url, double lat0, double lon0, double lat1, double lon1, double lat2, double lon2, double lat3, double lon3)

Parameters

style IntPtr
sourceId string
url string
lat0 double
lon0 double
lat1 double
lon1 double
lat2 double
lon2 double
lat3 double
lon3 double

Returns

IntPtr

StyleAddLayerJson(IntPtr, string, string?)

public static IntPtr StyleAddLayerJson(IntPtr style, string layerJson, string? beforeLayerId)

Parameters

style IntPtr
layerJson string
beforeLayerId string

Returns

IntPtr

StyleAddLineLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddLineLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddLocationIndicatorLayer(IntPtr, string, string?)

public static IntPtr StyleAddLocationIndicatorLayer(IntPtr style, string layerId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
beforeLayerId string

Returns

IntPtr

StyleAddRasterDemSource(IntPtr, string, string, int)

public static IntPtr StyleAddRasterDemSource(IntPtr style, string sourceId, string url, int tileSize)

Parameters

style IntPtr
sourceId string
url string
tileSize int

Returns

IntPtr

StyleAddRasterLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddRasterLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddRasterSource(IntPtr, string, string, int)

public static IntPtr StyleAddRasterSource(IntPtr style, string sourceId, string url, int tileSize)

Parameters

style IntPtr
sourceId string
url string
tileSize int

Returns

IntPtr

StyleAddSourceJson(IntPtr, string, string)

public static MbglStatus StyleAddSourceJson(IntPtr style, string sourceId, string sourceJson)

Parameters

style IntPtr
sourceId string
sourceJson string

Returns

MbglStatus

StyleAddSymbolLayer(IntPtr, string, string, string?)

public static IntPtr StyleAddSymbolLayer(IntPtr style, string layerId, string sourceId, string? beforeLayerId)

Parameters

style IntPtr
layerId string
sourceId string
beforeLayerId string

Returns

IntPtr

StyleAddVectorSource(IntPtr, string, string)

public static IntPtr StyleAddVectorSource(IntPtr style, string sourceId, string url)

Parameters

style IntPtr
sourceId string
url string

Returns

IntPtr

StyleGetJson(IntPtr)

public static IntPtr StyleGetJson(IntPtr style)

Parameters

style IntPtr

Returns

IntPtr

StyleGetLayer(IntPtr, string)

public static IntPtr StyleGetLayer(IntPtr style, string layerId)

Parameters

style IntPtr
layerId string

Returns

IntPtr

StyleGetLayerIds(IntPtr)

public static IntPtr StyleGetLayerIds(IntPtr style)

Parameters

style IntPtr

Returns

IntPtr

StyleGetName(IntPtr)

public static IntPtr StyleGetName(IntPtr style)

Parameters

style IntPtr

Returns

IntPtr

StyleGetSource(IntPtr, string)

public static IntPtr StyleGetSource(IntPtr style, string sourceId)

Parameters

style IntPtr
sourceId string

Returns

IntPtr

StyleGetSourceIds(IntPtr)

public static IntPtr StyleGetSourceIds(IntPtr style)

Parameters

style IntPtr

Returns

IntPtr

StyleGetUrl(IntPtr)

public static IntPtr StyleGetUrl(IntPtr style)

Parameters

style IntPtr

Returns

IntPtr

StyleHasLayer(IntPtr, string)

public static int StyleHasLayer(IntPtr style, string layerId)

Parameters

style IntPtr
layerId string

Returns

int

StyleHasSource(IntPtr, string)

public static int StyleHasSource(IntPtr style, string sourceId)

Parameters

style IntPtr
sourceId string

Returns

int

StyleRemoveImage(IntPtr, string)

public static MbglStatus StyleRemoveImage(IntPtr style, string imageId)

Parameters

style IntPtr
imageId string

Returns

MbglStatus

StyleRemoveLayer(IntPtr, string)

public static MbglStatus StyleRemoveLayer(IntPtr style, string layerId)

Parameters

style IntPtr
layerId string

Returns

MbglStatus

StyleRemoveSource(IntPtr, string)

public static MbglStatus StyleRemoveSource(IntPtr style, string sourceId)

Parameters

style IntPtr
sourceId string

Returns

MbglStatus

StyleSetLightProperty(IntPtr, string, string)

public static MbglStatus StyleSetLightProperty(IntPtr style, string name, string valueJson)

Parameters

style IntPtr
name string
valueJson string

Returns

MbglStatus

StyleSetTransition(IntPtr, long, long)

public static MbglStatus StyleSetTransition(IntPtr style, long durationMs, long delayMs)

Parameters

style IntPtr
durationMs long
delayMs long

Returns

MbglStatus