GoogleMap
This documentation provides a comprehensive reference for the GoogleMap component, guiding you through its configuration options.
Screenshot #

Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| ApiKey | string | null | Gets or sets the Google Maps API key. | 1.0.0 | |
| Center | GoogleMapCenter | null | Gets or sets the center parameter. | 1.0.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| Clickable | bool | False | Makes the marker clickable if set to true. | 1.0.0 | |
| Height | Nullable`1 | null | Gets or sets the height of the GoogleMap. |
1.0.0 | |
| HeightUnit | Unit | Px | Gets or sets the units for the Height. |
1.0.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| Markers | IEnumerable<GoogleMapMarker> | null | Gets or sets the markers. | 1.0.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 | |
| Width | Nullable`1 | null | Gets or sets the width of the GoogleMap. |
1.0.0 | |
| WidthUnit | Unit | Percentage | Gets or sets the units for the Width. |
1.0.0 | |
| Zoom | int | 14 | Gets or sets the zoom level of the GoogleMap. |
1.0.0 |
Methods #
| Name | Return type | Description | Added Version |
|---|---|---|---|
| AddMarkerAsync(GoogleMapMarker marker) | ValueTask | Adds a marker to the GoogleMap. | 1.0.0 |
| RefreshAsync() | ValueTask | Refreshes the Google Maps component. | 1.0.0 |
| UpdateMarkersAsync(IEnumerable<GoogleMapMarker> markers) | ValueTask | Updates the markers on the Google Map. | 1.0.0 |
Events #
| Name | Return Type | Description | Added Version |
|---|---|---|---|
| OnMarkerClick | EventCallback<GoogleMapMarker> | This event is fired when a user clicks on a marker. It fires only when Clickable is set to true. |
1.0.0 |