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 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#
| Name | Type | Description |
|---|---|---|
buffer | ArrayBuffer | Array buffer to decompress. |
Returns#
T
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.
Parameters#
| Name | 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. |
Returns#
number[]
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).
Parameters#
| Name | Type | Description |
|---|---|---|
X | number | ECEF X-value. |
Y | number | ECEF Y-value. |
Z | number | ECEF Z-value. |
Returns#
number[]
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.
Parameters#
| Name | 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. |
Returns#
number[]
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.
Parameters#
| Name | 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. |
Returns#
number[]
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.
Parameters#
| Name | Type | Description |
|---|---|---|
url | string | URL for resource to retrieve. |
abort? | Promise<void> | - |
Returns#
Promise<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.
Parameters#
| Name | Type | Description |
|---|---|---|
lng | number | Longitude in degrees. |
lat | number | Latitude in degrees. |
alt | number | Altitude in meters. |
Returns#
number[]
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.
Parameters#
| Name | 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. |
Returns#
number[]
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.
Parameters#
| Name | Type | Description |
|---|---|---|
buffer | ArrayBuffer | Protobuf array buffer to read from. |
Returns#
Mesh object.