Class MapPolylineLayer
A sublayer which renders group of MapPolyline on MapShapeLayer and MapTileLayer
Namespace: Syncfusion.Maui.Maps
Assembly: Syncfusion.Maui.Maps.dll
Syntax
public class MapPolylineLayer : MapSublayer
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/india.json">
<map:MapShapeLayer.Sublayers>
<map:MapPolylineLayer>
<map:MapPolylineLayer.Polylines>
<map:MapPolyline StrokeThickness = "4">
<map:MapPolyline.Points>
<map:MapLatLng Latitude="13.0827"
Longitude="80.2707" />
<map:MapLatLng Latitude="13.1746"
Longitude="79.6117" />
<map:MapLatLng Latitude="13.6373"
Longitude="79.5037" />
<map:MapLatLng Latitude="14.4673"
Longitude="78.8242" />
<map:MapLatLng Latitude="14.9091"
Longitude="78.0092" />
<map:MapLatLng Latitude="16.2160"
Longitude="77.3566" />
<map:MapLatLng Latitude="17.1557"
Longitude="76.8697" />
<map:MapLatLng Latitude="18.0975"
Longitude="75.4249" />
<map:MapLatLng Latitude="18.5204"
Longitude="73.8567" />
<map:MapLatLng Latitude="19.0760"
Longitude="72.8777" />
</map:MapPolyline.Points>
<map:MapPolyline.StrokeDashArray>
<DoubleCollection>
<x:Double>2</x:Double>
<x:Double>2</x:Double>
<x:Double>0.1</x:Double>
<x:Double>2</x:Double>
</DoubleCollection>
</map:MapPolyline.StrokeDashArray>
</map:MapPolyline>
</map:MapPolylineLayer.Polylines>
</map:MapPolylineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
Constructors
MapPolylineLayer()
Initializes a new instance of the MapPolylineLayer class.
Declaration
public MapPolylineLayer()
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/india.json">
<map:MapShapeLayer.Sublayers>
<map:MapPolylineLayer>
<map:MapPolylineLayer.Polylines>
<map:MapPolyline StrokeThickness = "4">
<map:MapPolyline.Points>
<map:MapLatLng Latitude="13.0827"
Longitude="80.2707" />
<map:MapLatLng Latitude="13.1746"
Longitude="79.6117" />
<map:MapLatLng Latitude="13.6373"
Longitude="79.5037" />
<map:MapLatLng Latitude="14.4673"
Longitude="78.8242" />
<map:MapLatLng Latitude="14.9091"
Longitude="78.0092" />
<map:MapLatLng Latitude="16.2160"
Longitude="77.3566" />
<map:MapLatLng Latitude="17.1557"
Longitude="76.8697" />
<map:MapLatLng Latitude="18.0975"
Longitude="75.4249" />
<map:MapLatLng Latitude="18.5204"
Longitude="73.8567" />
<map:MapLatLng Latitude="19.0760"
Longitude="72.8777" />
</map:MapPolyline.Points>
<map:MapPolyline.StrokeDashArray>
<DoubleCollection>
<x:Double>2</x:Double>
<x:Double>2</x:Double>
<x:Double>0.1</x:Double>
<x:Double>2</x:Double>
</DoubleCollection>
</map:MapPolyline.StrokeDashArray>
</map:MapPolyline>
</map:MapPolylineLayer.Polylines>
</map:MapPolylineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
Fields
AnimationDurationProperty
Identifies the AnimationDuration bindable property.
Declaration
public static readonly BindableProperty AnimationDurationProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
AnimationEasingProperty
Identifies the AnimationEasing bindable property.
Declaration
public static readonly BindableProperty AnimationEasingProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
PolylinesProperty
Identifies the Polylines bindable property.
Declaration
public static readonly BindableProperty PolylinesProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
AnimationDuration
Gets or sets a value that specifies the polylines animation duration in milliseconds.
Declaration
public double AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is |
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/india.json">
<map:MapShapeLayer.Sublayers>
<map:MapPolylineLayer AnimationEasing="{x:Static Easing.Linear}"
AnimationDuration="5000" >
<map:MapPolylineLayer.Polylines>
<map:MapPolyline StrokeThickness = "4">
<map:MapPolyline.Points>
<map:MapLatLng Latitude="13.0827"
Longitude="80.2707" />
<map:MapLatLng Latitude="13.1746"
Longitude="79.6117" />
<map:MapLatLng Latitude="13.6373"
Longitude="79.5037" />
<map:MapLatLng Latitude="14.4673"
Longitude="78.8242" />
<map:MapLatLng Latitude="14.9091"
Longitude="78.0092" />
<map:MapLatLng Latitude="16.2160"
Longitude="77.3566" />
<map:MapLatLng Latitude="17.1557"
Longitude="76.8697" />
<map:MapLatLng Latitude="18.0975"
Longitude="75.4249" />
<map:MapLatLng Latitude="18.5204"
Longitude="73.8567" />
<map:MapLatLng Latitude="19.0760"
Longitude="72.8777" />
</map:MapPolyline.Points>
<map:MapPolyline.StrokeDashArray>
<DoubleCollection>
<x:Double>2</x:Double>
<x:Double>2</x:Double>
<x:Double>0.1</x:Double>
<x:Double>2</x:Double>
</DoubleCollection>
</map:MapPolyline.StrokeDashArray>
</map:MapPolyline>
</map:MapPolylineLayer.Polylines>
</map:MapPolylineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
AnimationEasing
Gets or sets a value that specifies the polylines animation easing effect.
Declaration
public Easing AnimationEasing { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Easing | The default value is Microsoft.Maui.Easing.Linear. |
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/india.json">
<map:MapShapeLayer.Sublayers>
<map:MapPolylineLayer AnimationEasing="{x:Static Easing.Linear}">
<map:MapPolylineLayer.Polylines>
<map:MapPolyline StrokeThickness = "4">
<map:MapPolyline.Points>
<map:MapLatLng Latitude="13.0827"
Longitude="80.2707" />
<map:MapLatLng Latitude="13.1746"
Longitude="79.6117" />
<map:MapLatLng Latitude="13.6373"
Longitude="79.5037" />
<map:MapLatLng Latitude="14.4673"
Longitude="78.8242" />
<map:MapLatLng Latitude="14.9091"
Longitude="78.0092" />
<map:MapLatLng Latitude="16.2160"
Longitude="77.3566" />
<map:MapLatLng Latitude="17.1557"
Longitude="76.8697" />
<map:MapLatLng Latitude="18.0975"
Longitude="75.4249" />
<map:MapLatLng Latitude="18.5204"
Longitude="73.8567" />
<map:MapLatLng Latitude="19.0760"
Longitude="72.8777" />
</map:MapPolyline.Points>
<map:MapPolyline.StrokeDashArray>
<DoubleCollection>
<x:Double>2</x:Double>
<x:Double>2</x:Double>
<x:Double>0.1</x:Double>
<x:Double>2</x:Double>
</DoubleCollection>
</map:MapPolyline.StrokeDashArray>
</map:MapPolyline>
</map:MapPolylineLayer.Polylines>
</map:MapPolylineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
Polylines
Gets or sets the collection of polyline to the map.
Declaration
public ObservableCollection<MapPolyline> Polylines { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<MapPolyline> | The polyline collection. By default, the collection is empty. |
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/india.json">
<map:MapShapeLayer.Sublayers>
<map:MapPolylineLayer>
<map:MapPolylineLayer.Polylines>
<map:MapPolyline StrokeThickness = "4">
<map:MapPolyline.Points>
<map:MapLatLng Latitude="13.0827"
Longitude="80.2707" />
<map:MapLatLng Latitude="13.1746"
Longitude="79.6117" />
<map:MapLatLng Latitude="13.6373"
Longitude="79.5037" />
<map:MapLatLng Latitude="14.4673"
Longitude="78.8242" />
<map:MapLatLng Latitude="14.9091"
Longitude="78.0092" />
<map:MapLatLng Latitude="16.2160"
Longitude="77.3566" />
<map:MapLatLng Latitude="17.1557"
Longitude="76.8697" />
<map:MapLatLng Latitude="18.0975"
Longitude="75.4249" />
<map:MapLatLng Latitude="18.5204"
Longitude="73.8567" />
<map:MapLatLng Latitude="19.0760"
Longitude="72.8777" />
</map:MapPolyline.Points>
<map:MapPolyline.StrokeDashArray>
<DoubleCollection>
<x:Double>2</x:Double>
<x:Double>2</x:Double>
<x:Double>0.1</x:Double>
<x:Double>2</x:Double>
</DoubleCollection>
</map:MapPolyline.StrokeDashArray>
</map:MapPolyline>
</map:MapPolylineLayer.Polylines>
</map:MapPolylineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
Methods
OnBindingContextChanged()
Invoked whenever the binding context of the View changes.
Declaration
protected override void OnBindingContextChanged()