@azure/maps-common package

Interfaces

BoundingBox

Bounding Box

GeoJsonFeature

GeoJSON Feature A Feature object represents a spatially bounded thing. Every Feature object is a GeoJSON object. Reference

GeoJsonFeatureCollection

GeoJSON FeatureCollection. Reference

GeoJsonGeometryCollection

GeoJSON GeometryCollection. Reference

GeoJsonLineString

GeoJSON LineString. Reference

GeoJsonMultiLineString

GeoJSON MultiLineString. Reference

GeoJsonMultiPoint

GeoJSON MultiPoint. Reference

GeoJsonMultiPolygon

GeoJSON MultiPolygon. Reference

GeoJsonObject

A GeoJSON object represents a Geometry, Feature, or collection of Features. Reference

GeoJsonPoint

GeoJSON Point. Reference

GeoJsonPolygon

GeoJSON Polygon. Reference

To specify a constraint specific to Polygons, it is useful to introduce the concept of a linear ring:

  • A linear ring is a closed LineString with four or more positions.
  • The first and last positions are equivalent, and they MUST contain identical values; their representation SHOULD also be identical.
  • A linear ring is the boundary of a surface or the boundary of a hole in a surface.
  • A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.

Type Aliases

BBox

Bounding box including information on the coordinate range for its geometries

BBox2D

2D bounding box

BBox3D

3D bounding box

GeoJsonGeometry

GeoJSON Geometry

GeoJsonType

GeoJSON types

GeometryType

Geometry types

LatLon

Latitude/Longitude Pair

Position

An array of number representing a point

Position2D

2D position

Position3D

3D position

Functions

createAzureMapsKeyCredentialPolicy(KeyCredential)

Create an HTTP pipeline policy to authenticate a request using an AzureKeyCredential for Azure Maps

createMapsClientIdPolicy(string)

Create an HTTP pipeline policy to add x-ms-client-id header for TokenCredential based authentication for Azure Maps

createSendPollRequest<TOptions, TClient>({ client: TClient, options: TOptions, spec: OperationSpec })

Helper function to create a method that can be passed to sendPollRequest in createHttpPoller.

getRawResponse<TOptions, TResponse>((options: TOptions) => Promise<TResponse>, TOptions)

Extract several fields of the response to the rawResponse

Function Details

createAzureMapsKeyCredentialPolicy(KeyCredential)

Create an HTTP pipeline policy to authenticate a request using an AzureKeyCredential for Azure Maps

function createAzureMapsKeyCredentialPolicy(azureKeyCredential: KeyCredential): PipelinePolicy

Parameters

azureKeyCredential
KeyCredential

Returns

createMapsClientIdPolicy(string)

Create an HTTP pipeline policy to add x-ms-client-id header for TokenCredential based authentication for Azure Maps

function createMapsClientIdPolicy(mapsClientId: string): PipelinePolicy

Parameters

mapsClientId

string

Returns

createSendPollRequest<TOptions, TClient>({ client: TClient, options: TOptions, spec: OperationSpec })

Helper function to create a method that can be passed to sendPollRequest in createHttpPoller.

function createSendPollRequest<TOptions, TClient>(settings: { client: TClient, options: TOptions, spec: OperationSpec }): (path: string) => Promise<LroResponse<unknown>>

Parameters

settings

{ client: TClient, options: TOptions, spec: OperationSpec }

The settings of the poll request, including client, options and the spec

Returns

(path: string) => Promise<LroResponse<unknown>>

A callback that accept the path as input and return the promise of Lro response.

getRawResponse<TOptions, TResponse>((options: TOptions) => Promise<TResponse>, TOptions)

Extract several fields of the response to the rawResponse

function getRawResponse<TOptions, TResponse>(getResponse: (options: TOptions) => Promise<TResponse>, options: TOptions): Promise<LroResponse<TResponse>>

Parameters

getResponse

(options: TOptions) => Promise<TResponse>

A async function that actually call the backend API.

options

TOptions

The options for the getResponse callback

Returns

Promise<@azure/core-lro.LroResponse<TResponse>>

A promise for the API call.