ClassMapShapefileLayer
Represents a map layer that displays geographic vector data from ESRI Shapefiles (.shp, .dbf files). This layer renders polygons, polylines, and points with customizable styling, selection support, and labeling capabilities. The layer uses a MapShapeReader to load and parse shapefile data for visualization.
Definition
Namespace:Telerik.Maui.Controls.Map
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class MapShapefileLayer : MapLayer
Constructors
MapShapefileLayer()
Initializes a new instance of the MapShapefileLayer class.
Declaration
public MapShapefileLayer()
Fields
LabelAttributeNameProperty
Identifies the LabelAttributeName property.
Declaration
public static readonly BindableProperty LabelAttributeNameProperty
Field Value
BindableProperty
ReaderProperty
Identifies the Reader property.
Declaration
public static readonly BindableProperty ReaderProperty
Field Value
BindableProperty
SelectedShapeProperty
Identifies the SelectedShape property.
Declaration
public static readonly BindableProperty SelectedShapeProperty
Field Value
BindableProperty
SelectedShapeStyleProperty
Identifies the SelectedShapeStyle property.
Declaration
public static readonly BindableProperty SelectedShapeStyleProperty
Field Value
BindableProperty
SelectedShapesProperty
Identifies the SelectedShape property.
Declaration
public static readonly BindableProperty SelectedShapesProperty
Field Value
BindableProperty
SelectionModeProperty
Identifies the SelectionMode property.
Declaration
public static readonly BindableProperty SelectionModeProperty
Field Value
BindableProperty
ShapeLabelStyleProperty
Identifies the ShapeLabelStyle property.
Declaration
public static readonly BindableProperty ShapeLabelStyleProperty
Field Value
BindableProperty
ShapeStyleProperty
Identifies the ShapeStyle property.
Declaration
public static readonly BindableProperty ShapeStyleProperty
Field Value
BindableProperty
ShapeStyleSelectorProperty
Identifies the ShapeStyleSelector property.
Declaration
public static readonly BindableProperty ShapeStyleSelectorProperty
Field Value
BindableProperty
Properties
LabelAttributeName
Gets or sets the name of the attribute, as specified by the *.dbf file, that points to the value set to each Shape as its label.
Reader
Gets or sets the MapShapeReader that loads and parses the shapefile data (.shp and .dbf files). The reader provides the geometric and attribute data that this layer will display on the map.
Declaration
public MapShapeReader Reader { get; set; }
Property Value
A MapShapeReader instance configured with appropriate data sources.
SelectedShape
Gets or sets the currently selected IShape instance. When multiple selection is enabled, this value is set to the first selected shape.
SelectedShapeStyle
Gets or sets the MapShapeStyle that defines the visual appearance of selected shapes. This style is applied to shapes when they are selected through user interaction or programmatic selection. If not specified, a default selection style will be used.
Declaration
public MapShapeStyle SelectedShapeStyle { get; set; }
Property Value
A MapShapeStyle defining the appearance of selected shapes.
SelectedShapes
Gets the currently selected IShape instances.
Declaration
public ObservableCollection<IShape> SelectedShapes { get; }
Property Value
SelectionMode
Gets or sets the SelectionMode value that defines how the user input affects the current selection.
Declaration
public MapSelectionMode SelectionMode { get; set; }
Property Value
ShapeLabelStyle
Gets or sets the MapShapeLabelStyle instance that defines the appearance of each label, displayed by the visualized shapes.
Declaration
public MapShapeLabelStyle ShapeLabelStyle { get; set; }
Property Value
ShapeStyle
Gets or sets the default MapShapeStyle that defines the visual appearance of all shapes in the layer. This style applies to all shapes unless overridden by a ShapeStyleSelector or individual shape styling.
Declaration
public MapShapeStyle ShapeStyle { get; set; }
Property Value
A MapShapeStyle defining fill color, stroke color, stroke thickness, and other visual properties.
ShapeStyleSelector
Gets or sets a MapShapeStyleSelector that enables conditional styling of shapes based on their attribute data. This allows different shapes to have different appearances based on data values such as population, area, or custom attributes. When set, this takes precedence over the default ShapeStyle.
Declaration
public MapShapeStyleSelector ShapeStyleSelector { get; set; }
Property Value
A MapShapeStyleSelector instance that determines styling based on shape attributes.
Methods
GetBestView()
Gets location rectangle which represents best view for the layer.
Declaration
public LocationRect GetBestView()
Returns
Location rectangle which represents best view.
OnBindingContextChanged()
Declaration
protected override void OnBindingContextChanged()
OnPropertyChanged(string)
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
propertyName