Azure Maps REST SDKs
Azure Maps is more than just a Map on your website. It is a complete enterprise solution for location-aware solutions. For example, you can do (reverse) geocoding of customer addresses and use an isochrone to find out withs customers a close to your store or get weather conditions for all your past sales data to know withs products sell best by rain or hot weather or get the correct time-zone for your customer by translating an IP-address to a location and get the time-zone information, or you need to know what the travel time is between two or more locations. So many scenarios and use cases you can make location aware with Azure Maps.
You can call the Azure Maps REST APIs directly from any programming language, which is not difficult but always needs extra work. With the introduction of the public preview Azure Maps REST SDKs for C# (.NET), Java, Phyton, and TypeScript (Node.js), you can earlier use the power of Azure Maps in your backend without the hassle of calling the APIs the correct way.
To give you a simple example in C#, we are searching for a Starbucks close to a customer's location in Seattle. Before we can begin, you need an Azure Maps key; see here how to get a free Azure Maps key.
The following code snippet creates a console program MapsDemo with .NET 7.0. You can use any .NET standard 2.0-compatible version as the framework.
The following code snippet demonstrates how, in a simple console application, to import the Azure.Maps.Search package and perform a fuzzy search on “Starbucks” near Seattle. In the Program.cs file add the following code:
In the above code snippet, you create a MapsSearchClient object using your Azure credentials, then use that Search Client's FuzzySearch method passing in the point of interest (POI) name "Starbucks" and coordinates GeoPosition(-122.31, 47.61). This all gets wrapped up by the SDK and sent to the Azure Maps REST endpoints. When the search results are returned, they're written out to the screen.
To run your application, go to the project folder and execute dotnet run in PowerShell.
More information you can read in our Azure Maps REST SDK Developer Guide. Happy coding!
Published on:
Learn moreRelated posts
Primer: Output Data Generated with an Azure Automation Runbook to a SharePoint List
The second part of the Azure Automation runbook primer brings us to output, specifically how to create items generated by a runbook in a Share...
Databricks vs Azure Synapse Analytics: A Comprehensive Comparison for Modern Data Solutions
Table of Contents Introduction Data is at the core of modern business decision-making. As companies increasingly rely on data-driven insights,...
Primer: How to Use Azure Automation to Run Microsoft Graph PowerShell SDK Scripts
A reader asked why it seems so difficult to use Azure Automation runbooks to process Microsoft 365 data. In fact, it's not so hard, and here's...
Extending Regular Expressions (Regex) Support on Azure SQL Managed Instance (MI)
We are happy to announce the Private Preview of Regular Expressions (Regex) support on Azure SQL Managed Instance (MI). This new feature bring...
Shield your Copilot with Azure AI
Azure Confidential Clean Rooms demonstration
Final Days for the MSOnline and AzureAD PowerShell Modules
After many twists and turns since August 2021, the MSOnline module retirement will happen in April 2025. The AzureAD module will then retire i...
Join the Conversation: Call for Proposals for Azure Cosmos DB Conf 2025!
Are you passionate about Azure Cosmos DB? Do you have insights, experiences, or innovations that the developer community would love to hear? N...