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
Introducing the Data-Bound Reference Layer in Azure Maps Visual for Power BI
Imagine managing a nationwide sales team and needing to understand how your sales align with factors like population density, competitor locat...
Enhance Azure Maps with Overture Maps Data using PMTiles!
Supercharge Azure Maps with Overture Maps Data using PMTiles! We’ve got some exciting news. Azure Maps now supports PMTiles! This me...
Where do I go if I have questions about Azure Maps?
As you might expect, just looking around on your own, or asking Co-pilot, you can find comprehensive help like Samples.AzureMaps.com, wit...
Tailor your Reference Layers in Azure Maps Visual for Power BI
We’re excited to share the latest enhancements to the Azure Maps visual in Power BI, designed to make your data visualization even mor...
Enhancing Logistics with Azure Maps and NVIDIA cuOpt for Multi-Itinerary Optimization
The logistics industry is always finding ways to optimize vehicle routing to enhance efficiency. The Vehicle Routing Problem (VRP) and Pickup ...
Introducing the Unified Azure Maps Experience
Microsoft has recently announced the unification of Bing Maps for Enterprise (BME) with Azure Maps, marking a remarkable advancement in their ...
Power BI Azure Maps Visual: Enhanced Reference Layer & Embedded Support
The Power BI Azure Maps visual has received a major update which includes an expansion of the reference layer and the addition of Power BI Emb...
Enhance your indoor maps with real-time map feature styling
The ability to dynamically update and visualize the state of rooms or areas within a building is critical to understanding the status of any b...
Dynamic Clustering Aggregation with Custom Styling in Bubble Layer
The Power BI Azure Maps visual allows you to create stunning geospatial visualizations with your data. Today, we are excited to announce a new...
HO HO HO Two Point OH!
You might notice some big changes have come to the North Pole experience at NORADSanta.ORG this year. Developer elves have implemented a...