Class
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:

cs-api-definition
public class MapShapefileLayer : MapLayer

Inheritance: objectMapLayerMapShapefileLayer

Constructors

MapShapefileLayer()

Initializes a new instance of the MapShapefileLayer class.

Declaration

cs-api-definition
public MapShapefileLayer()

Fields

LabelAttributeNameProperty

Identifies the LabelAttributeName property.

Declaration

cs-api-definition
public static readonly BindableProperty LabelAttributeNameProperty

Field Value

BindableProperty

ReaderProperty

Identifies the Reader property.

Declaration

cs-api-definition
public static readonly BindableProperty ReaderProperty

Field Value

BindableProperty

SelectedShapeProperty

Identifies the SelectedShape property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedShapeProperty

Field Value

BindableProperty

SelectedShapeStyleProperty

Identifies the SelectedShapeStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedShapeStyleProperty

Field Value

BindableProperty

SelectedShapesProperty

Identifies the SelectedShape property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedShapesProperty

Field Value

BindableProperty

SelectionModeProperty

Identifies the SelectionMode property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectionModeProperty

Field Value

BindableProperty

ShapeLabelStyleProperty

Identifies the ShapeLabelStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ShapeLabelStyleProperty

Field Value

BindableProperty

ShapeStyleProperty

Identifies the ShapeStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty ShapeStyleProperty

Field Value

BindableProperty

ShapeStyleSelectorProperty

Identifies the ShapeStyleSelector property.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public string LabelAttributeName { get; set; }

Property Value

string

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

cs-api-definition
public MapShapeReader Reader { get; set; }

Property Value

MapShapeReader

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.

Declaration

cs-api-definition
public IShape SelectedShape { get; set; }

Property Value

IShape

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

cs-api-definition
public MapShapeStyle SelectedShapeStyle { get; set; }

Property Value

MapShapeStyle

A MapShapeStyle defining the appearance of selected shapes.

SelectedShapes

Gets the currently selected IShape instances.

Declaration

cs-api-definition
public ObservableCollection<IShape> SelectedShapes { get; }

Property Value

ObservableCollection<IShape>

SelectionMode

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

Declaration

cs-api-definition
public MapSelectionMode SelectionMode { get; set; }

Property Value

MapSelectionMode

ShapeLabelStyle

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

Declaration

cs-api-definition
public MapShapeLabelStyle ShapeLabelStyle { get; set; }

Property Value

MapShapeLabelStyle

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

cs-api-definition
public MapShapeStyle ShapeStyle { get; set; }

Property Value

MapShapeStyle

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

cs-api-definition
public MapShapeStyleSelector ShapeStyleSelector { get; set; }

Property Value

MapShapeStyleSelector

A MapShapeStyleSelector instance that determines styling based on shape attributes.

Methods

GetBestView()

Gets location rectangle which represents best view for the layer.

Declaration

cs-api-definition
public LocationRect GetBestView()

Returns

LocationRect

Location rectangle which represents best view.

OnBindingContextChanged()

Declaration

cs-api-definition
protected override void OnBindingContextChanged()

OnPropertyChanged(string)

Declaration

cs-api-definition
protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName

string