New to Telerik UI for .NET MAUIStart a free 30-day trial

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:

C#
public class MapShapefileLayer : MapLayer

Inheritance: objectMapLayerMapShapefileLayer

Constructors

Initializes a new instance of the MapShapefileLayer class.

C#
public MapShapefileLayer()

Fields

Identifies the LabelAttributeName property.

C#
public static readonly BindableProperty LabelAttributeNameProperty

ReaderProperty

BindableProperty

Identifies the Reader property.

C#
public static readonly BindableProperty ReaderProperty

SelectedShapeProperty

BindableProperty

Identifies the SelectedShape property.

C#
public static readonly BindableProperty SelectedShapeProperty

SelectedShapesProperty

BindableProperty

Identifies the SelectedShape property.

C#
public static readonly BindableProperty SelectedShapesProperty

Identifies the SelectedShapeStyle property.

C#
public static readonly BindableProperty SelectedShapeStyleProperty

SelectionModeProperty

BindableProperty

Identifies the SelectionMode property.

C#
public static readonly BindableProperty SelectionModeProperty

ShapeLabelStyleProperty

BindableProperty

Identifies the ShapeLabelStyle property.

C#
public static readonly BindableProperty ShapeLabelStyleProperty

ShapeStyleProperty

BindableProperty

Identifies the ShapeStyle property.

C#
public static readonly BindableProperty ShapeStyleProperty

Identifies the ShapeStyleSelector property.

C#
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.

C#
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.

C#
public MapShapeReader Reader { get; set; }
Property Value:

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.

C#
public IShape SelectedShape { get; set; }

Gets the currently selected IShape instances.

C#
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.

C#
public MapShapeStyle SelectedShapeStyle { get; set; }
Property Value:

A MapShapeStyle defining the appearance of selected shapes.

Gets or sets the SelectionMode value that defines how the user input affects the current selection.

C#
public MapSelectionMode SelectionMode { get; set; }

Gets or sets the MapShapeLabelStyle instance that defines the appearance of each label, displayed by the visualized shapes.

C#
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.

C#
public MapShapeStyle ShapeStyle { get; set; }
Property Value:

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.

C#
public MapShapeStyleSelector ShapeStyleSelector { get; set; }
Property Value:

A MapShapeStyleSelector instance that determines styling based on shape attributes.

Methods

Gets location rectangle which represents best view for the layer.

C#
public LocationRect GetBestView()
Returns:

LocationRect

Location rectangle which represents best view.

C#
protected override void OnBindingContextChanged()
C#
protected override void OnPropertyChanged(string propertyName = null)
Parameters:propertyNamestring