
This topic provides information on displaying geographic imagery from Azure Maps in the background content of the UltraGeographicMap™ control.
The following table lists the topics required as a prerequisite to understanding this topic.
This topic contains the following sections:
Azure Maps is Microsoft’s® licensed geographic imagery mapping service. This geographic imagery service is accessible directly on the Azure Maps web site. The UltraGeographicMap control displays geographic imagery from Azure Maps in the map’s background content using the AzureMapsImagery class. However, by default the UltraGeographicMap control displays geographic imagery from the Open Street Maps in the map background content requiring you to configure the control to display Azure Maps’ geographic imagery. Prior to using Azure Maps’ geographic imagery, you must register and obtain a Azure Map API key from www.Azuremapsportal.com. You must use the Azure Maps’ API key to set the AzureMapsImagery object’s ApiKey property.
The following images are previews of the UltraGeographicMap control in supported map styles of geographic imagery from the Azure Maps service.
In order to use geographic imagery from Azure Maps, you must first register and obtain a Map API key from the www.Azuremapsportal.com website. You must set this Azure API key as the AzureMapsImagery object’s ApiKey property.
TLS1.2 or TLS1.3 is required in order for the map to render properly. If you are using .NET 4.7 and later, you can ignore this step. For more details please visit https://learn.microsoft.com/en-us/azure/azure-maps/azure-maps-authentication
A full list of frameworks support for TLS is listed here: TLS support in .NET Framework
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
This is explicitly required when using eg. .NET 4.0 that doesnt' provide this out of the box. Make sure to add the line above in your eg. form’s constructor prior to adding the map.
The screenshot following this table illustrates how to display geographic imagery from Azure Maps in the background content of the UltraGeographicMap control. This is accomplished by configuring the UltraGeographicMap control as follows:
Following is the code used in implementing this example:
In Visual Basic:
Dim igMap As UltraGeographicMap
Dim AzureMaps as AzureMapsImagery
AzureMaps.ImageryStyle = AzureMapsImageryStyle.Road
AzureMaps.ApiKey = "API_KEY"
igMap.SetImagery(AzureMaps)
In C#:
var igMap = new UltraGeographicMap
var AzureMaps = new AzureMapsImagery();
AzureMaps.ImageryStyle = AzureMapsImageryStyle.Road;
AzureMaps.ApiKey = "API_KEY";
igMap.SetImagery(AzureMaps);
The following topics provide additional information related to this topic.