MapShapefileLayer
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
Initializes a new instance of the MapShapefileLayer class.
public MapShapefileLayer()
Fields
LabelAttributeNameProperty
BindableProperty
Identifies the LabelAttributeName property.
public static readonly BindableProperty LabelAttributeNameProperty
ReaderProperty
BindableProperty
Identifies the Reader property.
public static readonly BindableProperty ReaderProperty
SelectedShapeProperty
BindableProperty
Identifies the SelectedShape property.
public static readonly BindableProperty SelectedShapeProperty
SelectedShapesProperty
BindableProperty
Identifies the SelectedShape property.
public static readonly BindableProperty SelectedShapesProperty
SelectedShapeStyleProperty
BindableProperty
Identifies the SelectedShapeStyle property.
public static readonly BindableProperty SelectedShapeStyleProperty
SelectionModeProperty
BindableProperty
Identifies the SelectionMode property.
public static readonly BindableProperty SelectionModeProperty
ShapeLabelStyleProperty
BindableProperty
Identifies the ShapeLabelStyle property.
public static readonly BindableProperty ShapeLabelStyleProperty
ShapeStyleProperty
BindableProperty
Identifies the ShapeStyle property.
public static readonly BindableProperty ShapeStyleProperty
ShapeStyleSelectorProperty
BindableProperty
Identifies the ShapeStyleSelector property.
public static readonly BindableProperty ShapeStyleSelectorProperty
Properties
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.
public string LabelAttributeName { get; set; }
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.
public MapShapeReader Reader { get; set; }
A MapShapeReader instance configured with appropriate data sources.
Gets or sets the currently selected IShape instance. When multiple selection is enabled, this value is set to the first selected shape.
public IShape SelectedShape { get; set; }
Gets the currently selected IShape instances.
public ObservableCollection<IShape> SelectedShapes { get; }
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.
public MapShapeStyle SelectedShapeStyle { get; set; }
A MapShapeStyle defining the appearance of selected shapes.
Gets or sets the SelectionMode value that defines how the user input affects the current selection.
public MapSelectionMode SelectionMode { get; set; }
Gets or sets the MapShapeLabelStyle instance that defines the appearance of each label, displayed by the visualized shapes.
public MapShapeLabelStyle ShapeLabelStyle { get; set; }
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.
public MapShapeStyle ShapeStyle { get; set; }
A MapShapeStyle defining fill color, stroke color, stroke thickness, and other visual properties.
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.
public MapShapeStyleSelector ShapeStyleSelector { get; set; }
A MapShapeStyleSelector instance that determines styling based on shape attributes.
Methods
Gets location rectangle which represents best view for the layer.
public LocationRect GetBestView()
Location rectangle which represents best view.
protected override void OnBindingContextChanged()
protected override void OnPropertyChanged(string propertyName = null)