Close
Angular React Web Components Blazor React
Premium

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

AzureMapsImagery

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.

import { IgrGeographicMap } from 'igniteui-react-maps';
import { IgrAzureMapsImagery } from 'igniteui-react-maps';
import { AzureMapsImageryStyle } from 'igniteui-react-maps';
// ...
const tileSource = new IgrAzureMapsImagery();
tileSource.apiKey = "YOUR_Azure_MAPS_API_KEY";
tileSource.imageryStyle = AzureMapsImageryStyle.Satellite; // or
tileSource.imageryStyle = AzureMapsImageryStyle.Road; // or
tileSource.imageryStyle = AzureMapsImageryStyle.DarkGrey; // Traffic, Weather etc.

const geoMap = new IgrGeographicMap({ name: "geoMap" });
geoMap.backgroundContent = tileSource;

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 HybridRoadOverlay and HybridDarkGreyOverlay already 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.
Azure Traffic Tile Series With Background

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.

// App.tsx
import React, { useEffect, useRef } from 'react';
import {
  IgrGeographicMap,
  IgrGeographicTileSeries,
  IgrAzureMapsImagery,
  AzureMapsImageryStyle
} from 'igniteui-react-maps';

export default function App() {
    const mapRef = useRef<IgrGeographicMap>(null);
    const tileSeriesRef = useRef<IgrGeographicTileSeries>(null);
    const azureKey = "<YOUR_KEY_HERE>";

    useEffect(() => {
        // Update TileSeries
        const overlay = new IgrAzureMapsImagery({});
        overlay.apiKey = azureKey;
        overlay.imageryStyle = AzureMapsImageryStyle.TrafficAbsoluteOverlay;

        if (tileSeriesRef.current) {
            tileSeriesRef.current.tileImagery = overlay;
        }

        // Update Map Background
        const background = new IgrAzureMapsImagery({});
        background.apiKey = azureKey;
        background.imageryStyle = AzureMapsImageryStyle.DarkGrey;

        if (mapRef.current) {
            mapRef.current.backgroundContent = background;
        }
    }, []);

    return (
        <div style={{ height: "100vh" }}>
        <IgrGeographicMap
            ref={mapRef}
            width="100%" height="100%"
            zoomable={true}>
            <IgrGeographicTileSeries ref={tileSeriesRef} />
        </IgrGeographicMap>
        </div>
    );
}

Properties

The following table summarizes properties of the IgrAzureMapsImagery class:

Property NameProperty TypeDescription
ApiKeystringRepresents 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.
ImageryStyleIgxAzureMapsImageryStyleRepresents the property for setting the Azure Maps imagery tiles map style. This property can be set to the following IgxAzureMapsImageryStyle enumeration values:
  • Satellite - Specifies the Satellite map style without road or labels overlay
  • Road - Specifies the Aerial map style with road and labels overlay
  • DarkGrey - Specifies a dark grey basemap style for contrast and highlighting overlays
  • TerraOverlay - Specifies a terrain map style with shaded relief to highlight elevation and landscape features
  • LabelsRoadOverlay - One of several overlays of city labels without an aerial overlay
  • HybridRoadOverlay - Satellite background combined with road and label overlays
  • HybridDarkGreyOverlay - Satellite background combined with dark grey label overlays
  • LabelsDarkGreyOverlay - One of several overlays of city labels over a dark grey basemap
  • TrafficDelayOverlay - Displays traffic delays and congestion areas in real time
  • TrafficAbsoluteOverlay - Displays current traffic speeds as absolute values
  • TrafficReducedOverlay - Displays reduced traffic flow with light-based visualization
  • TrafficRelativeOverlay - Displays traffic speeds relative to normal conditions
  • TrafficRelativeDarkOverlay - Displays traffic speeds relative to normal conditions over a dark basemap for enhanced contrast
  • WeatherRadarOverlay - Displays near real-time radar imagery of precipitation
  • WeatherInfraredOverlay - Displays infrared satellite imagery of cloud cover

API References