Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V24.1

DxMapMarker.IconUrl Property

Specifies the map marker’s icon URL.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

[DefaultValue("")]
[Parameter]
public string IconUrl { get; set; }

Property Value

Type Default Description
String String.Empty

The icon URL.

Remarks

Use the IconUrl property to specify a custom icon for the marker. You can use the MarkerIconUrl property to set a common icon for every marker on the map.

<DxMap Provider="MapProvider.Bing" Zoom="18" Width="950px" Height="400px" MarkerClick="OnMapMarkerClick" >
    <DxMapApiKeys Bing="@MapApiKeyProvider.GetBingProviderKey()" />
    <DxMapMarkers>
        <DxMapMarker MarkerId="BusStation" IconUrl="images/bus-station-mark.png" >
            <DxMapMarkerLocation GeoPosition="51.481633,-0.008281" />
        </DxMapMarker>
        <DxMapMarker MarkerId="GiftShop" IconUrl="images/shop-mark.png">
            <DxMapMarkerLocation GeoPosition="51.480889,-0.009259" />
        </DxMapMarker>
    </DxMapMarkers>
    <DxMapRoutes>
        <DxMapRoute Color="red" Weight="9" Mode="MapRouteMode.Walking">
            <DxMapRouteLocations>
                <DxMapRouteLocation GeoPosition="51.481633,-0.008281" />
                <DxMapRouteLocation GeoPosition="51.481186,-0.009107" />
                <DxMapRouteLocation GeoPosition="51.480889,-0.009259" />
                </DxMapRouteLocations>
        </DxMapRoute>
    </DxMapRoutes>
</DxMap>
@code {
    void OnMapMarkerClick(MapMarkerClickEventArgs e) {
        switch(e.Marker.MarkerId) {
            case "BusStation":
                ShowBusStationInformation();
                break;
            case "GiftShop":
                ShowShopInformation();
                break;
        }
    }
}

See Also