Skip to main content

Module: api

description Interfaces and methods for using MapillaryJS with custom data.

Classes#

Interfaces#

Type aliases#

ImageTilesContract#

Ƭ ImageTilesContract: EntContract<ImageTileEnt[]>

Contract describing image tile results.

Defined in#

api/contracts/ImageTilesContract.ts:7


ImagesContract#

Ƭ ImagesContract: EntContract<ImageEnt>[]

Contract describing image results.

Defined in#

api/contracts/ImagesContract.ts:7


SequenceContract#

Ƭ SequenceContract: SequenceEnt

Contract describing sequence results.

Defined in#

api/contracts/SequenceContract.ts:6


SpatialImagesContract#

Ƭ SpatialImagesContract: EntContract<SpatialImageEnt>[]

Contract describing spatial image results.

Defined in#

api/contracts/SpatialImagesContract.ts:7

Events#

ProviderEventType#

ProviderEventType: "datacreate"

Defined in#

api/events/ProviderEventType.ts:4

Functions#

decompress#

decompress<T>(buffer): T

Decompress and parse an array buffer containing zipped json data and return as a json object.

description Handles array buffers continaing zipped json data.

Type parameters#

Name
T

Parameters#

NameTypeDescription
bufferArrayBufferArray buffer to decompress.

Returns#

T

Parsed object.

Defined in#

api/Common.ts:21


ecefToEnu#

ecefToEnu(X, Y, Z, refLng, refLat, refAlt): number[]

Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference to local topocentric (ENU) reference.

Parameters#

NameTypeDescription
XnumberECEF X-value.
YnumberECEF Y-value.
ZnumberECEF Z-value.
refLngnumberReference longitude in degrees.
refLatnumberReference latitude in degrees.
refAltnumberReference altitude in meters.

Returns#

number[]

The x, y, z topocentric ENU coordinates in East, North and Up directions respectively.

Defined in#

geo/GeoCoords.ts:90


ecefToGeodetic#

ecefToGeodetic(X, Y, Z): number[]

Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference to geodetic reference (WGS84).

Parameters#

NameTypeDescription
XnumberECEF X-value.
YnumberECEF Y-value.
ZnumberECEF Z-value.

Returns#

number[]

The longitude, latitude in degrees and altitude in meters.

Defined in#

geo/GeoCoords.ts:228


enuToEcef#

enuToEcef(x, y, z, refLng, refLat, refAlt): number[]

Convert coordinates from local topocentric (ENU) reference to Earth-Centered, Earth-Fixed (ECEF) reference.

Parameters#

NameTypeDescription
xnumberTopocentric ENU coordinate in East direction.
ynumberTopocentric ENU coordinate in North direction.
znumberTopocentric ENU coordinate in Up direction.
refLngnumberReference longitude in degrees.
refLatnumberReference latitude in degrees.
refAltnumberReference altitude in meters.

Returns#

number[]

The X, Y, Z ECEF coordinates.

Defined in#

geo/GeoCoords.ts:137


enuToGeodetic#

enuToGeodetic(x, y, z, refLng, refLat, refAlt): number[]

Convert coordinates from local topocentric (ENU) reference to geodetic (WGS84) reference.

Parameters#

NameTypeDescription
xnumberTopocentric ENU coordinate in East direction.
ynumberTopocentric ENU coordinate in North direction.
znumberTopocentric ENU coordinate in Up direction.
refLngnumberReference longitude in degrees.
refLatnumberReference latitude in degrees.
refAltnumberReference altitude in meters.

Returns#

number[]

The longitude, latitude in degrees and altitude in meters.

Defined in#

geo/GeoCoords.ts:54


fetchArrayBuffer#

fetchArrayBuffer(url, abort?): Promise<ArrayBuffer>

Retrieves a resource as an array buffer and returns a promise to the buffer.

description Rejects the promise on request failure.

Parameters#

NameTypeDescription
urlstringURL for resource to retrieve.
abort?Promise<void>-

Returns#

Promise<ArrayBuffer>

Promise to the array buffer resource.

Defined in#

api/Common.ts:40


geodeticToEcef#

geodeticToEcef(lng, lat, alt): number[]

Convert coordinates from geodetic reference (WGS84) to Earth-Centered, Earth-Fixed (ECEF) reference.

Parameters#

NameTypeDescription
lngnumberLongitude in degrees.
latnumberLatitude in degrees.
altnumberAltitude in meters.

Returns#

number[]

The X, Y, Z ECEF coordinates.

Defined in#

geo/GeoCoords.ts:188


geodeticToEnu#

geodeticToEnu(lng, lat, alt, refLng, refLat, refAlt): number[]

Convert coordinates from geodetic (WGS84) reference to local topocentric (ENU) reference.

Parameters#

NameTypeDescription
lngnumberLongitude in degrees.
latnumberLatitude in degrees.
altnumberAltitude in meters.
refLngnumberReference longitude in degrees.
refLatnumberReference latitude in degrees.
refAltnumberReference altitude in meters.

Returns#

number[]

The x, y, z local topocentric ENU coordinates.

Defined in#

geo/GeoCoords.ts:18


readMeshPbf#

readMeshPbf(buffer): MeshContract

Read the fields of a protobuf array buffer into a mesh object.

Parameters#

NameTypeDescription
bufferArrayBufferProtobuf array buffer to read from.

Returns#

MeshContract

Mesh object.

Defined in#

api/Common.ts:119