Module: api
description
Interfaces and methods for using
MapillaryJS with custom data.
#
Classes#
Interfaces- CameraEnt
- ClusterContract
- CoreImageEnt
- CoreImagesContract
- CreatorEnt
- EntContract
- GraphDataProviderOptions
- IDEnt
- IDataProvider
- IEventEmitter
- IGeometryProvider
- ImageEnt
- ImageTileEnt
- ImageTilesRequestContract
- LngLat
- LngLatAlt
- MeshContract
- PointContract
- ProviderCellEvent
- ProviderEvent
- SequenceEnt
- SpatialImageEnt
- URLEnt
#
Type aliases#
ImageTilesContractƬ ImageTilesContract: EntContract
<ImageTileEnt
[]>
Contract describing image tile results.
#
Defined inapi/contracts/ImageTilesContract.ts:7
#
ImagesContractƬ ImagesContract: EntContract
<ImageEnt
>[]
Contract describing image results.
#
Defined inapi/contracts/ImagesContract.ts:7
#
SequenceContractƬ SequenceContract: SequenceEnt
Contract describing sequence results.
#
Defined inapi/contracts/SequenceContract.ts:6
#
SpatialImagesContractƬ SpatialImagesContract: EntContract
<SpatialImageEnt
>[]
Contract describing spatial image results.
#
Defined inapi/contracts/SpatialImagesContract.ts:7
#
Events#
ProviderEventType• ProviderEventType: "datacreate"
#
Defined inapi/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 parametersName |
---|
T |
#
ParametersName | Type | Description |
---|---|---|
buffer | ArrayBuffer | Array buffer to decompress. |
#
ReturnsT
Parsed object.
#
Defined in#
ecefToEnuâ–¸ ecefToEnu(X
, Y
, Z
, refLng
, refLat
, refAlt
): number
[]
Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference to local topocentric (ENU) reference.
#
ParametersName | Type | Description |
---|---|---|
X | number | ECEF X-value. |
Y | number | ECEF Y-value. |
Z | number | ECEF Z-value. |
refLng | number | Reference longitude in degrees. |
refLat | number | Reference latitude in degrees. |
refAlt | number | Reference altitude in meters. |
#
Returnsnumber
[]
The x, y, z topocentric ENU coordinates in East, North and Up directions respectively.
#
Defined in#
ecefToGeodeticâ–¸ ecefToGeodetic(X
, Y
, Z
): number
[]
Convert coordinates from Earth-Centered, Earth-Fixed (ECEF) reference to geodetic reference (WGS84).
#
ParametersName | Type | Description |
---|---|---|
X | number | ECEF X-value. |
Y | number | ECEF Y-value. |
Z | number | ECEF Z-value. |
#
Returnsnumber
[]
The longitude, latitude in degrees and altitude in meters.
#
Defined in#
enuToEcefâ–¸ enuToEcef(x
, y
, z
, refLng
, refLat
, refAlt
): number
[]
Convert coordinates from local topocentric (ENU) reference to Earth-Centered, Earth-Fixed (ECEF) reference.
#
ParametersName | Type | Description |
---|---|---|
x | number | Topocentric ENU coordinate in East direction. |
y | number | Topocentric ENU coordinate in North direction. |
z | number | Topocentric ENU coordinate in Up direction. |
refLng | number | Reference longitude in degrees. |
refLat | number | Reference latitude in degrees. |
refAlt | number | Reference altitude in meters. |
#
Returnsnumber
[]
The X, Y, Z ECEF coordinates.
#
Defined in#
enuToGeodeticâ–¸ enuToGeodetic(x
, y
, z
, refLng
, refLat
, refAlt
): number
[]
Convert coordinates from local topocentric (ENU) reference to geodetic (WGS84) reference.
#
ParametersName | Type | Description |
---|---|---|
x | number | Topocentric ENU coordinate in East direction. |
y | number | Topocentric ENU coordinate in North direction. |
z | number | Topocentric ENU coordinate in Up direction. |
refLng | number | Reference longitude in degrees. |
refLat | number | Reference latitude in degrees. |
refAlt | number | Reference altitude in meters. |
#
Returnsnumber
[]
The longitude, latitude in degrees and altitude in meters.
#
Defined in#
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.
#
ParametersName | Type | Description |
---|---|---|
url | string | URL for resource to retrieve. |
abort? | Promise <void > | - |
#
ReturnsPromise
<ArrayBuffer
>
Promise to the array buffer resource.
#
Defined in#
geodeticToEcefâ–¸ geodeticToEcef(lng
, lat
, alt
): number
[]
Convert coordinates from geodetic reference (WGS84) to Earth-Centered, Earth-Fixed (ECEF) reference.
#
ParametersName | Type | Description |
---|---|---|
lng | number | Longitude in degrees. |
lat | number | Latitude in degrees. |
alt | number | Altitude in meters. |
#
Returnsnumber
[]
The X, Y, Z ECEF coordinates.
#
Defined in#
geodeticToEnuâ–¸ geodeticToEnu(lng
, lat
, alt
, refLng
, refLat
, refAlt
): number
[]
Convert coordinates from geodetic (WGS84) reference to local topocentric (ENU) reference.
#
ParametersName | Type | Description |
---|---|---|
lng | number | Longitude in degrees. |
lat | number | Latitude in degrees. |
alt | number | Altitude in meters. |
refLng | number | Reference longitude in degrees. |
refLat | number | Reference latitude in degrees. |
refAlt | number | Reference altitude in meters. |
#
Returnsnumber
[]
The x, y, z local topocentric ENU coordinates.
#
Defined in#
readMeshPbfâ–¸ readMeshPbf(buffer
): MeshContract
Read the fields of a protobuf array buffer into a mesh object.
#
ParametersName | Type | Description |
---|---|---|
buffer | ArrayBuffer | Protobuf array buffer to read from. |
#
ReturnsMesh object.