Class MapsMarker<TValue>
Sets and gets the option for the customization of marker for the maps.
Implements
Inherited Members
Namespace: Syncfusion.Blazor.Maps
Assembly: Syncfusion.Blazor.dll
Syntax
public class MapsMarker<TValue> : SfDataBoundComponent, IMarker
Type Parameters
Name | Description |
---|---|
TValue | represents the class name of the data source. |
Constructors
MapsMarker()
Declaration
public MapsMarker()
Properties
AnimationDelay
Sets and gets the delay time for the animation in marker.
Declaration
public double AnimationDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
This property specifies the delay before the marker animation begins.
AnimationDuration
Sets and gets the duration time for animating the marker.
Declaration
public double AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
Defines how long it takes for the marker animation to complete.
ChildContent
Sets and gets the content of the UI element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | The UI content to be rendered for the marker. |
Remarks
This property allows you to include custom content for the marker using a Microsoft.AspNetCore.Components.RenderFragment.
ColorValuePath
Sets and gets the value path from the marker data source to apply color for the marker.
Declaration
public string ColorValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The string representing the field in the data source that determines the color of the marker. |
Remarks
This property allows dynamic coloring of markers based on data source values.
DashArray
Sets and gets the dash-array for the marker.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the dash pattern of the marker outline. |
Remarks
This property allows you to apply custom line styles to the marker's border.
DataSource
Sets and gets the data source for the marker. The data source for the marker will contain latitude and longitude values to specify the location of the marker. The data source can contain data such as color, shape, and other details that can be bound to the color, shape, and tooltip of the marker.
Declaration
public IEnumerable<object> DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | A list of objects that defines the data for the markers. |
Remarks
Use this property to bind external data to markers, enabling dynamic data display on maps.
EnableDrag
Gets or sets a value indicating whether the user can drag and drop markers on the map at any location.
Declaration
public bool EnableDrag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
You can enable or disable the marker drag and drop functionality through mouse or touch interactions in the Syncfusion.Blazor.Maps component.
Fill
Sets and gets the color for the marker in maps.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string indicating the color applied to the marker. The default value is "#FF471A". |
Remarks
This property sets a static color for all markers unless overridden by ColorValuePath
.
Height
Sets and gets the height of the marker in maps.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
This property sets a static height for all markers unless overridden by HeightValuePath
.
HeightValuePath
This property specifies the field name from the objects in the marker data source to adjust the height of each marker individually within the group.
Declaration
public string HeightValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value which represents the field name from the objects in the marker data source. |
Remarks
When a numeric or string value is provided in the specified field, that value is used to determine the height of the current marker.
If a numeric value is provided, the default value of "0" will be applied. In this case, the marker will not be rendered if the field contains only the default value.To handle this, nullable numeric types should be used and the height will be taken from the Height
property of MapsMarker
.
ImageUrl
Sets and gets the URL for rendering the marker as image.
Declaration
public string ImageUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string URL that points to the image used for the marker representation. |
Remarks
If this property is set, markers will render using the specified image instead of shapes.
ImageUrlValuePath
Sets and gets the value path from the marker data source for the image of the marker.
Declaration
public string ImageUrlValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the field in the data source containing image URLs for markers. |
Remarks
Allows dynamic assignment of images to markers based on data source values.
LatitudeValuePath
Defines the value path from the marker data source for setting latitude for a set of markers.
Declaration
public string LatitudeValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string indicating the field used to extract latitude values from the data source. |
Remarks
This property binds data source fields to marker latitude attributes.
LegendText
Sets and gets the text for the legend from the marker data source.
Declaration
public string LegendText { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the legend text associated with the marker entries. |
Remarks
If no value is provided, the default value will be an empty string.
LongitudeValuePath
Defines the value path from the marker data source for setting longitude for a set of markers.
Declaration
public string LongitudeValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string indicating the field used to extract longitude values from the data source. |
Remarks
This property binds data source fields to marker longitude attributes.
MarkerTemplate
Gets or sets the content of UI element.
Declaration
public RenderFragment<object> MarkerTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment<System.Object> | A Microsoft.AspNetCore.Components.RenderFragment used to define the template for marker rendering. |
Remarks
Use this template to customize the appearance of markers based on their content.
OffsetX
Sets and gets the X position value of the marker in the Maps component. When this property is set, the marker will render a certain distance from the provided longitude value.
Declaration
public double OffsetX { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
When this property is set, the marker will render at the specified distance from the longitude.
OffsetY
Sets and gets the Y position value of the marker in the Maps component. When this property is set, the marker will render a certain distance from the provided longitude value.
Declaration
public double OffsetY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
When this property is set, the marker will render at the specified distance from the latitude.
Opacity
Sets and gets the opacity for the marker in maps.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
Use this property to make markers semi-transparent or fully opaque.
Query
Sets and gets the query to select particular data from the marker data. This property is applicable only when the data source is created by data manager.
Declaration
public Query Query { get; set; }
Property Value
Remarks
This property is applicable only when the data source is created by data manager.
Shape
Sets and gets the shape of the marker in maps.
Declaration
public MarkerType Shape { get; set; }
Property Value
Type | Description |
---|---|
MarkerType | A MarkerType enum value that indicates the shape of the marker. |
Remarks
The default shape used for markers is Balloon.
ShapeValuePath
Sets and gets the value path from the marker data source to set the shape of the marker.
Declaration
public string ShapeValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string specifying the field in the data source that determines the shape of each marker. |
Remarks
This property allows dynamic assignment of shapes to markers based on data source values.
Visible
Enables or disables the visibility state of the marker based on the marker data source in maps.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A Boolean value indicating whether the markers are visible. The default is |
Remarks
Set this property to control the display of markers on the map.
Width
Sets and gets the width of the marker in maps.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
This property sets a static width for all markers unless overridden by WidthValuePath
.
WidthValuePath
This property specifies the field name from the objects in the marker data source to adjust the width of each marker individually within the group.
Declaration
public string WidthValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value which represents the field name from the objects in the marker data source. |
Remarks
When a numeric or string value is provided in the specified field, that value is used to determine the width of the current marker. If a numeric value is provided, the default value of "0" will be applied. In this case, the marker will not be rendered if the field contains only the default value.To handle this, nullable numeric types should be used and the width will be taken from the
Width
property of MapsMarker
.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Dispose(Boolean)
Disposes the property values during the destroy of the component that is hold up for the execution of the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
OnInitializedAsync()
OnInitializedAsync method is called when the component has received its initial parameters.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
INotifyCollectionChanged event handler to track the changes in the marker data source.
Declaration
protected override void OnObservableChange(string propertyName, object sender, bool isCollectionChanged = false, NotifyCollectionChangedEventArgs e = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Observable property name. |
System.Object | sender | Observable model object. |
System.Boolean | isCollectionChanged | Sets true if the observable collection changed. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | Changed Event Args |
Overrides
OnParametersSetAsync()
OnParametersSetAsync is a lifecycle method that is invoked when the component has received parameters, and the incoming values have been assigned to the properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |