Blazor Displaying Imagery from Azure Maps

    The Blazor IgbAzureMapsImagery 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 Blazor map component can display geographic imagery from Azure Maps in the map’s background content using the IgbAzureMapsImagery class.

    Blazor Displaying Imagery from Azure Maps Example

    Code Snippet

    The following code snippet shows how to display geographic imagery tiles from Azure Maps in Blazor IgbGeographicMap using IgbAzureMapsImagery class.

    @using IgniteUI.Blazor.Controls
    
    <IgbGeographicMap @ref="AzureMap"
        Height="100%" Width="100%"
        Zoomable="true"
        BackgroundContent="@AzureImagery">
    </IgbGeographicMap>
    
    @code {
        
        private IgbGeographicMap AzureMap;
        private IgbAzureMapsImagery AzureImagery { get; set; }
    
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            await base.OnAfterRenderAsync(firstRender);
    
            //Update Map Background
            AzureImagery = new IgbAzureMapsImagery
            {
                ApiKey = AzureKey,
                ImageryStyle = AzureMapsImageryStyle.Satellite
            };
        }
    }
    

    Blazor Displaying Tile Series Overlays over Imagery from Azure Maps Example

    When working with the IgbGeographicTileSeries, 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.

    Code Snippet

    The following code snippet shows how to display geographic imagery tiles ontop of a background imagery joining eg. traffic with a dark grey map for the Blazor IgbGeographicMap using IgbAzureMapsImagery and IgbGeographicTileSeries classes.

    @using IgniteUI.Blazor.Controls
    
    <IgbGeographicMap @ref="AzureMap"
                              Height="100%" Width="100%"
                              Zoomable="true"
                              BackgroundContent="@AzureImagery">
            <IgbGeographicTileSeries @ref="ImagerySeries" />
    </IgbGeographicMap>
    
    @code {
        
        private IgbGeographicMap AzureMap;
        private IgbAzureMapsImagery AzureImagery { get; set; }
        private IgbGeographicTileSeries ImagerySeries;
    
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            await base.OnAfterRenderAsync(firstRender);
            
            //Update TileSeries
            var imagery = new IgbAzureMapsImagery
            {
                ApiKey = AzureKey,
                ImageryStyle = AzureMapsImageryStyle.TrafficAbsoluteOverlay
            };
    
            ImagerySeries.TileImagery = imagery;
    
            //Update Map Background
            AzureImagery = new IgbAzureMapsImagery
            {
                ApiKey = AzureKey,
                ImageryStyle = AzureMapsImageryStyle.DarkGrey
            };
        }
    }
    

    Properties

    The following table summarizes properties of the IgbAzureMapsImagery 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:
    • Satellite - Specifies the Satellite map style without road or labels overlay
    • Road - Specifies the Aerial map style with road and labels overlay
    • 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
    • DarkGrey - Specifies a dark grey basemap style for contrast and highlighting overlays
    • 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
    • WeatherRadarOverlay - Displays near real-time radar imagery of precipitation
    • WeatherInfraredOverlay - Displays infrared satellite imagery of cloud cover

    API References