Introduction to Azure Maps - Geospatial and Location APIs 1

The Azure Maps service is a Platform-as-a-Service API offering within the Microsoft Azure cloud that provides geospatial / GIS capabilities. The Azure Maps service enables you to add maps, search, routing, and traffic capabilities to your applications using the Azure Maps geospatial API services. This enables you to seamlessly integrate geospatial and mapping capabilities into your applications that are deployed to and integrated into Microsoft Azure services. Among the Azure Maps service APIs are REST APIs for different geospatial functions, as well as a web-based Javascript map control.

Azure Maps API Services

The Azure Maps service provides a collection of geospatial services provided as REST APIs that can be easily integrated and consumed by your custom mobile and/or web applications. The REST APIs provide functionality for rendering maps, searching points-of-interest, routes to points-of-interest, traffic conditions, time zones, and IP-to-location services.

The Azure Maps APIs are built to support powering cross-platform applications, and use a programming model that is standardized round JSON output generated by the REST APIs. This makes the Azure Maps APIs easy to integrate into any of the major programming platforms / frameworks (.NET, Java, Node.js, etc.) since both JSON and RESTful services have become the industry standard for accessing APIs in recent years.

Here’s are some brief descriptions of each of these REST APIs provided by the Azure Maps service:

Render Service

The Azure Maps Render Service API is designed to help developers building web and mobile applications with mapping integration. The imagery generated by the service utilizes high-quality raster graphic images (available in 19 zoom levels),  and fully customizable vector format map images.

Introduction to Azure Maps - Geospatial and Location APIs 2

Route Service

The Azure Maps Route Service API offers robust geometry calculations for real-world infrastructure and directions for multiple transportation modes. This enables developers to be able to write code that calculates directions across a number of travel modes; such as car, truck, bicycle, and walking. You can also input preferences into the service such as traffic conditions, weight restrictions, or hazardous material transport. The service offers more advanced features as well that includes batch processing of multiple route requests, matrices of travel time and distance between a set of origins and destinations, and finding routes or distances you can travel based on your time or fuel requirements.

Introduction to Azure Maps - Geospatial and Location APIs 3

Search Service

The Azure Maps Search Service API is built to provide developers the ability to search for addresses, places, business listings by name or category, and other geographic information. The Search Service API also provides the capability to perform reverse geocode searches on addresses and cross streets based on geocode (latitude / longitude) coordinates. Other more advanced features of the service include searching along a route, inside a wider area, batching of a group of search requests, and searching for larger area instead of a location point.

Introduction to Azure Maps - Geospatial and Location APIs 4

Time Zone Service

The Azure Maps Time Zone Service API offers the ability to query current, historical, and future time zone information using either a geocode (latitude + longitude pair) or an IANA ID. The services allows for converting Microsoft Windows time zone IDs to IANA time zones, fetching a time zone offset to UTC and getting the current time in a respective time zone.

Here’s a typical JSON response from a query made using the Azure Maps Time Zone Service API:

  "Version": "2017c",
  "ReferenceUtcTimestamp": "2017-11-20T23:09:48.686173Z",
  "TimeZones": [{
    "Id": "America/Los_Angeles",
    "ReferenceTime": {
      "Tag": "PST",
      "StandardOffset": "-08:00:00",
      "DaylightSavings": "00:00:00",
      "WallTime": "2017-11-20T15:09:48.686173-08:00",
      "PosixTzValidYear": 2017,
      "PosixTz": "PST+8PDT,M3.2.0,M11.1.0"

Traffic Service

The Azure Maps Traffic Service API is collection of web services designed to enable developers to create web and mobile applications that require Traffic data. The service provides both Traffic Flow and Traffic Incidents data. Traffic Flow data includes real-time observed speeds and travel times for all key roads in the network, and Traffic Incidents data includes an accurate view about the traffic jams and incidents around the road network.

Introduction to Azure Maps - Geospatial and Location APIs 5

IP-to-Location Service

The Azure Maps IP-to-Location Service API enables developers to retrieve the two letter code for a given IP Address. This API service can be tailored to meet special geopolitical constraints, in addition to enhancing the user experience by changing the applications content-based on the users geographic location.

Azure Maps JavaScript Control

The Azure Maps Control is a web-based JavaScript component with built-in capabilities to display and enable user interaction with a map that displays vector map tiles and drawing data from the Azure Maps API services. It also includes the capability for developers to layer their own data over the map in both vector and raster layers consisting of the enterprise customers dataset made up of points, lines, and polygons. If they have geo-annotated maps of a manufacturing plant, for example, these can be overlaid on the Azure Maps control as a new layer. The JavaScript map control also has event listeners built-in for common mouse and keyboard events that can be hooked into to provide a high-level of customization to the User Experience (UX) of any applications written. The Azure Maps REST APIs can also be easily integrated into any application that utilizes the JavaScript control, thus offering a very high level of customizability into the mapping / geospatial functionality implemented in any custom applications.

Introduction to Azure Maps - Geospatial and Location APIs 6

Azure Subscription and Azure Maps

Azure Maps can be provisioned within any Azure Subscription just like all the other services within Azure. This enables you to create and manage the service just like you would any other Azure service that makes up your solutions / applications hosting environment. To get started provisioning the service, you can simply search the Azure Marketplace within the Azure Portal for “Azure Maps” and just get started creating an instance of the service for you application.

Introduction to Azure Maps - Geospatial and Location APIs 7
Azure Maps in the Azure Marketplace

Provisioning an instance of Azure Maps is pretty simple. You just need to specify the Name and Pricing tier you wish to use. Then you can provision the Azure Maps Account and then get coding against the API’s using the Keys for your Azure Maps Account.

Introduction to Azure Maps - Geospatial and Location APIs 8
Create Azure Maps Account

Once you provision a new Azure Maps Account within your Azure Subscription, you can get started using the Azure Maps JavaScript Control and Azure Maps REST APIs within your applications. The Azure Maps Account itself doesn’t have much in the way of configuration in the Azure Portal. Most notably the Azure Portal gives you access to the Keys you’ll need to configure custom code to authenticate against the Azure Maps APIs when executed. These are located within the Authentication tab for the Azure Maps Account in the Azure Portal. You can also use Azure AD authentication when interacting with the Azure Maps API’s too.

Introduction to Azure Maps - Geospatial and Location APIs 9
Azure Maps Authentication tab in the Azure Portal

Happy mapping!

Microsoft MVP

Chris Pietschmann is a Microsoft MVP, HashiCorp Ambassador, and Microsoft Certified Trainer (MCT) with 20+ years of experience designing and building Cloud & Enterprise systems. He has worked with companies of all sizes from startups to large enterprises. He has a passion for technology and sharing what he learns with others to help enable them to learn faster and be more productive.
HashiCorp Ambassador Microsoft Certified Trainer (MCT) Microsoft Certified: Azure Solutions Architect