@resconet/azure-maps
v1.1.0
Published
[](https://badge.fury.io/js/%40resconet%2Fazure-maps) [](https://opensource.org/licenses/MIT)
Readme
azure-maps
A JavaScript library encapsulating the Azure Maps implementation of map interfaces defined in the @resconet/map-interfaces library.
Description
This library encapsulates the Azure Maps implementation of map interfaces defined in the @resconet/map-interfaces library.
Installation
npm
npm install @resconet/azure-mapsyarn
yarn add @resconet/azure-mapsUsage
Basic Example
import { createAzureMapView } from "@resconet/azure-maps";
const mapView = await createAzureMapView(mapElement, {
subscriptionKey: options.subscriptionKey,
});Functions
createAzureMapView
Creates a map control implementing MapView interface from @resconet/map-interface library.
| Function | Type |
| -------------------- | ------------------------------------------------------------------------ |
| createAzureMapView | (mapElement: HTMLElement, options: AzureMapsOptions): Promise<MapView> |
Parameters:
mapElement: - An element used as a root for rendering the map component.options: - Additional options required for authenticating to Azure Maps service.
Returns:
A promise that resolves to an instance of MapView interface.
