Version

Displaying Geographic Imagery from Bing Maps

Purpose

This topic provides information on displaying geographic imagery from Bing Maps in the background content of the UltraGeographicMap™ control.

Required background

The following table lists the topics required as a prerequisite to understanding this topic.

Topic Purpose

This topic provides information on how to add the UltraGeographicMap control to an application page.

This topic provides information about the layout of the visual elements in the control

This topic provides an overview of rendering geographic imagery in the background content of the UltraGeographicMap control.

In this topic

This topic contains the following sections:

Geographic Imagery from Bing Maps

Overview

Bing Maps is Microsoft’s® licensed geographic imagery mapping service. This geographic imagery service is accessible directly on the http://www.bing.com/maps web site. The UltraGeographicMap control displays geographic imagery from Bing Maps in the map’s background content using the BingMapsMapImagery 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 Bing Maps’ geographic imagery. Prior to using Bing Maps’ geographic imagery, you must register and obtain a Bing Map API key from www.bingmapsportal.com. You must use the Bing Maps’ API key to set the BingMapsMapImagery object’s ApiKey property.

Previews

The following images are previews of the UltraGeographicMap control in supported map styles of geographic imagery from the Bing Maps service.

GeographicMap Displaying Geographic Imagery from Bing Maps 2.png

Bing Map imagery with Road style

GeographicMap Displaying Geographic Imagery from Bing Maps 1.png

Bing Map imagery with Aerial and Labels style

GeographicMap Displaying Geographic Imagery from Bing Maps 3.png

Bing Map imagery with Aerial style

Requirements

In order to use geographic imagery from Bing Maps, you must first register and obtain a Map API key from the www.bingmapsportal.com website. You must set this Bing API key as the BingMapsMapImagery object’s ApiKey property.

Property settings

The following table summarizes important members of the BingMapsMapImagery class.

Property Name Property Type Description

String

Represents the property for setting an API key required for the Bing Maps imagery service.

You must obtain this key from the http://www.bingmapsportal.com website.

String

Represents the property for setting the Bing Imagery REST URI specifying where the TilePath and SubDomains will come from. This is an optional property, and if not specified it will use the default REST URI.

String

Represents a property for setting the culture name for the tile source.

Represents the property for setting the Bing Maps imagery tiles map style. This property can be set to the following BingMapsImageryStyle enumeration values:

  • Aerial - Specifies the Aerial map style without road or labels overlay

  • AerialWithLabels - Specifies the Aerial map style with road and labels overlay

  • Road - Specifies the Roads map style without Aerial overlay

Boolean

Represents the property that specifies whether or not the Bing Maps service should auto-initialized upon the assignment of valid property values.

Boolean

Represents the property that is set to True occurs when geographic imagery tiles from Bing Maps service have been initialized and they are ready for rendering in the UltraGeographicMap control.

ObservableCollection<string>

Represents an image collection of URI subdomains

String

Represents a property that sets the map tile image URI, this is the actual location of the Bing Maps

Example

The screenshot following this table illustrates how to display geographic imagery from Bing Maps in the background content of the UltraGeographicMap control. This is accomplished by configuring the UltraGeographicMap control as follows:

Property * Value*

BackgroundContent

BingMapsMapImagery

Road

Bing Map API key

GeographicMap Displaying Geographic Imagery from Bing Maps 2.png

Following is the code used in implementing this example:

Note
Note

You must replace those strings set to the ApiKey property with your own Bing Map API key.

In Visual Basic:

Dim igMap As UltraGeographicMap
Dim bingMaps as BingMapsMapImagery
bingMaps.ImageryStyle = BingMapsImageryStyle.Aerial
bingMaps.ApiKey = "API_KEY"
igMap.SetImagery(bingMaps)

In C#:

var igMap = new UltraGeographicMap
var bingMaps = new BingMapsMapImagery();
bingMaps.ImageryStyle = BingMapsImageryStyle.Aerial;
bingMaps.ApiKey = "API_KEY";
igMap.SetImagery(bingMaps);

Related Content

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides information on how to bind geographic imagery in the UltraGeographicMap control.

This topic provides information on how to display geographic imagery from Open Street Maps service in the UltraGeographicMap control.