The MapsSearchClient is the primary interface for developers using the Azure Maps search library. For more information on authentication, see Authentication with Azure Maps. You can use either an Azure Active Directory (Azure AD) credential or an Azure subscription key to authenticate. You'll need a credential object for authentication when creating the MapsSearchClient object used to access the Azure Maps search APIs. npm install the package is installed, create a search.js file in the mapsDemo directory: mapsDemoĬreate and authenticate a MapsSearchClient Each of the Azure Maps services including search, routing, rendering and geolocation are each in their own package. To use Azure Maps JavaScript SDK, you'll need to install the search package. The example below creates a new directory then a Node.js program named mapsDemo using npm: mkdir mapsDemo You can create an Azure Maps account programmatically, Here's an example using the Azure CLI: az maps account create -kind "Gen2" -account-name "myMapAccountName" -resource-group "" -sku "G2"
0 Comments
Leave a Reply. |