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 | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Defines tile layers, markers, shapes, and other map content rendered inside the map. | ||
Options | new() | MapOptions |
Configures map interaction, provider, zoom limits, and controls. | ||
View | new() | MapView |
Specifies the map center, zoom level, and optional bounds. Updating the value after render moves the displayed map view. | ||
MapTileLayer
| Parameter | Default | Type |
|---|---|---|
Attribution | — | string |
Provides attribution text required by the tile provider. | ||
Id | Generated | string |
Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one. When omitted, generates a GUID in N format. | ||
Interactive | true | bool |
Enables pointer interaction for this layer when supported by the provider. | ||
MaxZoom | null | double? |
Limits this tile layer to the specified maximum zoom level. | ||
MinZoom | null | double? |
Limits this tile layer to the specified minimum zoom level. | ||
Name | — | string |
Provides an optional display name for UI or diagnostics. | ||
Opacity | 1d | double |
Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent. | ||
Source | — | string |
Specifies the raster tile source URL, typically using {z}, {x}, and {y} placeholders. | ||
Subdomains | null | string[] |
Specifies optional tile subdomains used by the source URL. | ||
TileSize | 256 | int |
Specifies the tile size in pixels. | ||
Visible | true | bool |
Controls whether this layer is rendered on the map. | ||
ZIndex | null | int? |
Controls the layer ordering relative to other layers when supported by the provider. | ||
MapMarker
| Parameter | Default | Type |
|---|---|---|
Coordinate | null | MapCoordinate |
Specifies the marker coordinate. | ||
Draggable | false | bool |
Allows the marker to be moved by dragging. | ||
Icon | null | MapMarkerIcon |
Specifies a custom marker icon. | ||
Id | Generated | string |
Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one. When omitted, generates a GUID in N format. | ||
Interactive | true | bool |
Enables pointer interaction for this layer when supported by the provider. | ||
Name | — | string |
Provides an optional display name for UI or diagnostics. | ||
Opacity | 1d | double |
Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent. | ||
PopupText | — | string |
Provides popup text opened by the marker. | ||
Title | — | string |
Provides browser title text for the marker. | ||
TooltipText | — | string |
Provides tooltip text displayed near the marker. | ||
Visible | true | bool |
Controls whether this layer is rendered on the map. | ||
ZIndex | null | int? |
Controls the layer ordering relative to other layers when supported by the provider. | ||
MapMarkerLayer
| Parameter | Default | Type |
|---|---|---|
Data | null | IEnumerable<TItem> |
Provides the data items used to create markers. | ||
Id | Generated | string |
Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one. When omitted, generates a GUID in N format. | ||
Interactive | true | bool |
Enables pointer interaction for this layer when supported by the provider. | ||
Name | — | string |
Provides an optional display name for UI or diagnostics. | ||
Opacity | 1d | double |
Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent. | ||
Visible | true | bool |
Controls whether this layer is rendered on the map. | ||
ZIndex | null | int? |
Controls the layer ordering relative to other layers when supported by the provider. | ||
MapCircle
| Parameter | Default | Type |
|---|---|---|
Center | null | MapCoordinate |
Specifies the circle center coordinate. | ||
Id | Generated | string |
Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one. When omitted, generates a GUID in N format. | ||
Interactive | true | bool |
Enables pointer interaction for this layer when supported by the provider. | ||
Name | — | string |
Provides an optional display name for UI or diagnostics. | ||
Opacity | 1d | double |
Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent. | ||
Radius | 0 | double |
Specifies the circle radius in meters. | ||
Style | new() | MapShapeStyle |
Controls the circle stroke and fill styling. | ||
Visible | true | bool |
Controls whether this layer is rendered on the map. | ||
ZIndex | null | int? |
Controls the layer ordering relative to other layers when supported by the provider. | ||
MapPolyline
| Parameter | Default | Type |
|---|---|---|
Coordinates | null | IReadOnlyList<MapCoordinate> |
Specifies the ordered coordinates connected by the polyline. | ||
Id | Generated | string |
Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one. When omitted, generates a GUID in N format. | ||
Interactive | true | bool |
Enables pointer interaction for this layer when supported by the provider. | ||
Name | — | string |
Provides an optional display name for UI or diagnostics. | ||
Opacity | 1d | double |
Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent. | ||
Style | new() | MapShapeStyle |
Controls the polyline stroke styling. | ||
Visible | true | bool |
Controls whether this layer is rendered on the map. | ||
ZIndex | null | int? |
Controls the layer ordering relative to other layers when supported by the provider. | ||
MapPolygon
| Parameter | Default | Type |
|---|---|---|
Id | Generated | string |
Identifies this layer for updates, events, and removal. Changing the value after initialization removes the previous provider layer and registers a new one. When omitted, generates a GUID in N format. | ||
Interactive | true | bool |
Enables pointer interaction for this layer when supported by the provider. | ||
Name | — | string |
Provides an optional display name for UI or diagnostics. | ||
Opacity | 1d | double |
Applies layer opacity to tile, marker, and shape rendering, where 1 is fully opaque and 0 is fully transparent. | ||
Rings | null | IReadOnlyList<IReadOnlyList<MapCoordinate>> |
Specifies the polygon rings. The first ring is the outer boundary; additional rings can represent holes. | ||
Style | new() | MapShapeStyle |
Controls the polygon stroke and fill styling. | ||
Visible | true | bool |
Controls whether this layer is rendered on the map. | ||
ZIndex | null | int? |
Controls the layer ordering relative to other layers when supported by the provider. | ||
Events
Map
| Event | Type |
|---|---|
Clicked | EventCallback<MapMouseEventArgs> |
Handles single-click interaction on the map surface. | |
ContextMenu | EventCallback<MapMouseEventArgs> |
Handles context-menu interaction on the map surface. | |
DoubleClicked | EventCallback<MapMouseEventArgs> |
Handles double-click interaction on the map surface. | |
Ready | EventCallback<MapReadyEventArgs> |
Runs after the map provider has initialized the rendered map. | |
ViewChanged | EventCallback<MapView> |
Notifies when the bound map view changes. | |
ViewUpdated | EventCallback<MapViewUpdatedEventArgs> |
Reports view changes with bounds and the reason for the change. | |
MapMarker
| Event | Type |
|---|---|
Clicked | EventCallback<MapMarkerEventArgs> |
Handles clicks on this marker. | |
Dragged | EventCallback<MapMarkerDraggedEventArgs> |
Handles completed drag operations for this marker. | |
MapMarkerLayer
| Event | Type |
|---|---|
CoordinateSelector | Func<TItem, MapCoordinate> |
Selects the marker coordinate from each data item. | |
DraggableSelector | Func<TItem, bool> |
Determines whether each marker can be dragged. | |
IconSelector | Func<TItem, MapMarkerIcon> |
Selects a custom icon for each marker. | |
IdSelector | Func<TItem, string> |
Selects a stable marker identifier from each data item. | |
MarkerClicked | EventCallback<MapMarkerClickedEventArgs<TItem>> |
Handles clicks on data-bound markers. | |
MarkerDragged | EventCallback<MapMarkerDraggedEventArgs<TItem>> |
Handles completed drag operations for data-bound markers. | |
PopupTextSelector | Func<TItem, string> |
Selects popup text for each marker. | |
TitleSelector | Func<TItem, string> |
Selects the browser title text for each marker. | |
TooltipTextSelector | Func<TItem, string> |
Selects tooltip text for each marker. | |
Methods
Map
| Method | Return | Parameters |
|---|---|---|
FitBounds | ValueTask | MapBounds bounds, MapFitBoundsOptions options |
Fits the map view to the specified bounds.
| ||
GetBounds | ValueTask<MapBounds> | — |
Reads the currently visible geographic bounds from the rendered map.
| ||
GetView | ValueTask<MapView> | — |
Reads the current center, zoom level, and visible bounds from the rendered map.
| ||
InvalidateSize | ValueTask | — |
Invalidates the map size after its container size changes.
| ||
PanTo | ValueTask | MapCoordinate center, MapAnimationOptions options |
Pans the map to the specified center coordinate.
| ||
SetView | ValueTask | MapCoordinate center, double zoom, MapAnimationOptions options |
Sets the map view to the specified center and zoom.
| ||
ZoomIn | ValueTask | — |
Increases the current zoom level.
| ||
ZoomOut | ValueTask | — |
Decreases the current zoom level.
| ||