Blazorise Maps API

Explore the Blazorise Maps API reference for parameters, events, methods, and related types.

For examples and usage guidance, see the Maps documentation.

API

Parameters

Map

Parameter Description TypeDefault
ChildContent

Defines tile layers, markers, shapes, and other map content rendered inside the map.

RenderFragmentnull
Options

Configures map interaction, provider, zoom limits, and controls.

MapOptionsnew()
View

Specifies the map center, zoom level, and optional bounds. Updating the value after render moves the displayed map view.

MapViewnew()

MapTileLayer

Parameter Description TypeDefault
Attribution

Provides attribution text required by the tile provider.

string
Id

Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one.

string
Interactive

Enables pointer interaction for this layer when supported by the provider.

booltrue
MaxZoom

Limits this tile layer to the specified maximum zoom level.

double?null
MinZoom

Limits this tile layer to the specified minimum zoom level.

double?null
Name

Provides an optional display name for UI or diagnostics.

string
Opacity

Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent.

double1d
Source

Specifies the raster tile source URL, typically using {z}, {x}, and {y} placeholders.

string
Subdomains

Specifies optional tile subdomains used by the source URL.

string[]null
TileSize

Specifies the tile size in pixels.

int256
Visible

Controls whether this layer is rendered on the map.

booltrue
ZIndex

Controls the layer ordering relative to other layers when supported by the provider.

int?null

MapMarker

Parameter Description TypeDefault
Coordinate

Specifies the marker coordinate.

MapCoordinatenull
Draggable

Allows the marker to be moved by dragging.

boolfalse
Icon

Specifies a custom marker icon.

MapMarkerIconnull
Id

Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one.

string
Interactive

Enables pointer interaction for this layer when supported by the provider.

booltrue
Name

Provides an optional display name for UI or diagnostics.

string
Opacity

Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent.

double1d
PopupText

Provides popup text opened by the marker.

string
Title

Provides browser title text for the marker.

string
TooltipText

Provides tooltip text displayed near the marker.

string
Visible

Controls whether this layer is rendered on the map.

booltrue
ZIndex

Controls the layer ordering relative to other layers when supported by the provider.

int?null

MapMarkerLayer

Parameter Description TypeDefault
Data

Provides the data items used to create markers.

IEnumerable<TItem>null
Id

Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one.

string
Interactive

Enables pointer interaction for this layer when supported by the provider.

booltrue
Name

Provides an optional display name for UI or diagnostics.

string
Opacity

Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent.

double1d
Visible

Controls whether this layer is rendered on the map.

booltrue
ZIndex

Controls the layer ordering relative to other layers when supported by the provider.

int?null

MapCircle

Parameter Description TypeDefault
Center

Specifies the circle center coordinate.

MapCoordinatenull
Id

Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one.

string
Interactive

Enables pointer interaction for this layer when supported by the provider.

booltrue
Name

Provides an optional display name for UI or diagnostics.

string
Opacity

Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent.

double1d
Radius

Specifies the circle radius in meters.

double0
Style

Controls the circle stroke and fill styling.

MapShapeStylenew()
Visible

Controls whether this layer is rendered on the map.

booltrue
ZIndex

Controls the layer ordering relative to other layers when supported by the provider.

int?null

MapPolyline

Parameter Description TypeDefault
Coordinates

Specifies the ordered coordinates connected by the polyline.

IReadOnlyList<MapCoordinate>null
Id

Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one.

string
Interactive

Enables pointer interaction for this layer when supported by the provider.

booltrue
Name

Provides an optional display name for UI or diagnostics.

string
Opacity

Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent.

double1d
Style

Controls the polyline stroke styling.

MapShapeStylenew()
Visible

Controls whether this layer is rendered on the map.

booltrue
ZIndex

Controls the layer ordering relative to other layers when supported by the provider.

int?null

MapPolygon

Parameter Description TypeDefault
Id

Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one.

string
Interactive

Enables pointer interaction for this layer when supported by the provider.

booltrue
Name

Provides an optional display name for UI or diagnostics.

string
Opacity

Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent.

double1d
Rings

Specifies the polygon rings. The first ring is the outer boundary; additional rings can represent holes.

IReadOnlyList<IReadOnlyList<MapCoordinate>>null
Style

Controls the polygon stroke and fill styling.

MapShapeStylenew()
Visible

Controls whether this layer is rendered on the map.

booltrue
ZIndex

Controls the layer ordering relative to other layers when supported by the provider.

int?null

Events

Map

Event Description Type
Clicked

Handles single-click interaction on the map surface.

EventCallback<MapMouseEventArgs>
ContextMenu

Handles context-menu interaction on the map surface.

EventCallback<MapMouseEventArgs>
DoubleClicked

Handles double-click interaction on the map surface.

EventCallback<MapMouseEventArgs>
Ready

Runs after the map provider has initialized the rendered map.

EventCallback<MapReadyEventArgs>
ViewChanged

Notifies when the bound map view changes.

EventCallback<MapView>
ViewUpdated

Reports view changes with bounds and the reason for the change.

EventCallback<MapViewUpdatedEventArgs>

MapMarker

Event Description Type
Clicked

Handles clicks on this marker.

EventCallback<MapMarkerEventArgs>
Dragged

Handles completed drag operations for this marker.

EventCallback<MapMarkerDraggedEventArgs>

MapMarkerLayer

Event Description Type
CoordinateSelector

Selects the marker coordinate from each data item.

Func<TItem, MapCoordinate>
DraggableSelector

Determines whether each marker can be dragged.

Func<TItem, bool>
IconSelector

Selects a custom icon for each marker.

Func<TItem, MapMarkerIcon>
IdSelector

Selects a stable marker identifier from each data item.

Func<TItem, string>
MarkerClicked

Handles clicks on data-bound markers.

EventCallback<MapMarkerClickedEventArgs<TItem>>
MarkerDragged

Handles completed drag operations for data-bound markers.

EventCallback<MapMarkerDraggedEventArgs<TItem>>
PopupTextSelector

Selects popup text for each marker.

Func<TItem, string>
TitleSelector

Selects the browser title text for each marker.

Func<TItem, string>
TooltipTextSelector

Selects tooltip text for each marker.

Func<TItem, string>

Methods

Map

Method DescriptionReturnParameters
FitBounds Fits the map view to the specified bounds. ValueTaskMapBounds bounds, MapFitBoundsOptions options
GetBounds Reads the currently visible geographic bounds from the rendered map. ValueTask<MapBounds>
GetView Reads the current center, zoom level, and visible bounds from the rendered map. ValueTask<MapView>
InvalidateSize Invalidates the map size after its container size changes. ValueTask
PanTo Pans the map to the specified center coordinate. ValueTaskMapCoordinate center, MapAnimationOptions options
SetView Sets the map view to the specified center and zoom. ValueTaskMapCoordinate center, double zoom, MapAnimationOptions options
ZoomIn Increases the current zoom level. ValueTask
ZoomOut Decreases the current zoom level. ValueTask
On this page