React Imagery from Azure Maps Preview
The React IgrAzureMapsImagery is geographic imagery mapping service provided by Microsoft®. It provides several styles of geographic imagery tiles of the world. This geographic imagery service is accessible directly on the www.azure.microsoft.com web site. The Ignite UI for React map component can display geographic imagery from Azure Maps in the map’s background content using the IgrAzureMapsImagery class.
React Displaying Imagery from Azure Maps - Overview
React Displaying Imagery from Azure Maps - Code Example
The following code snippet shows how to display geographic imagery tiles from Azure Maps in React IgrGeographicMap using IgrAzureMapsImagery class.
<IgrGeographicMap
ref={this.azureMapRef}
height="100%"
width="100%"
zoomable={true} />
private azureMap: IgrGeographicMap
private azureMapRef(r: IgrGeographicMap) {
this.azureMap = r;
this.setState({});
}
this.azureMapRef = this.azureMapRef.bind(this);
var azureImagery = new IgrAzureMapsImagery();
azureImagery.apiKey = "YOUR_AZURE_MAPS_API_KEY";
azureImagery.imageryStyle = AzureMapsImageryStyle.Satellite;
this.azureMap.backgroundContent = azureImagery;
React Overlaying Imagery from Azure Maps - Overview
When working with the IgrGeographicTileSeries, you can combine overlays (traffic, weather, labels) on top of a base map style such as eg. Satellite, Road, or DarkGrey. Using TerraOverlay with eg. Satellite to visualize terrain.
- Base Styles: Satellite, Road, Terra, and DarkGrey provide the core background tiles.
- Overlay Styles: Traffic and Weather imagery (e.g.,
TrafficRelativeOverlay,WeatherRadarOverlay) are designed to be layered on top of a base style by assigning them to a tile series. - Hybrid Styles: Variants like
HybridRoadOverlayandHybridDarkGreyOverlayalready combine a base style with overlays (labels, roads, etc.), so you don’t need to manage multiple layers manually.
This design allows you to build richer maps, for example:
- Displaying Satellite imagery with a TrafficOverlay to highlight congestion on real-world images.
- Using Terra with WeatherRadarOverlay to visualize terrain with precipitation.
- Applying DarkGrey with LabelsRoadOverlay for a dashboard-friendly, contrast-heavy view.
React Overlaying Imagery from Azure Maps - Code Example
The following code snippet shows how to display geographic imagery tiles on top of a background imagery joining eg. traffic with a dark grey map for the React IgrGeographicMap using IgrAzureMapsImagery and IgrGeographicTileSeries classes.
<IgrGeographicMap
ref={this.azureMapRef}
height="100%"
width="100%"
zoomable={true}>
<IgrGeographicTileSeries
name="imagerySeries"
ref={ref => { this.imagerySeries = ref; }} />
</IgrGeographicMap>
private azureMap: IgrGeographicMap
private azureMapRef(r: IgrGeographicMap) {
this.azureMap = r;
this.setState({});
}
private imagerySeries: IgrGeographicTileSeries
this.azureMapRef = this.azureMapRef.bind(this);
var azureImagery = new IgrAzureMapsImagery();
azureImagery.apiKey = "YOUR_AZURE_MAPS_API_KEY";
azureImagery.imageryStyle = AzureMapsImageryStyle.DarkGrey;
this.azureMap.backgroundContent = azureImagery;
var trafficImagery = new IgrAzureMapsImagery();
trafficImagery.apiKey = "YOUR_AZURE_MAPS_API_KEY";
trafficImagery.imageryStyle = AzureMapsImageryStyle.TrafficAbsoluteOverlay;
this.imagerySeries.tileImagery = trafficImagery;
Properties
The following table summarizes properties of the IgrAzureMapsImagery class:
| Property Name | Property Type | Description |
|---|---|---|
apiKey |
string | Represents the property for setting an API key required for the Azure Maps imagery service. You must obtain this key from the azure.microsoft.com website. |
imageryStyle |
AzureMapsImageryStyle |
Represents the property for setting the Azure Maps imagery tiles map style. This property can be set to the following AzureMapsImageryStyle enumeration values:
|