Class MapLineLayer
A sublayer which renders group of MapLine on MapShapeLayer and MapTileLayer
Namespace: Syncfusion.Maui.Maps
Assembly: Syncfusion.Maui.Maps.dll
Syntax
public class MapLineLayer : MapSublayer
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/world-map.json">
<map:MapShapeLayer.Sublayers>
<map:MapLineLayer>
<map:MapLineLayer.Lines>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="26.841944"
Longitude="114.561183" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="37.316207"
Longitude="89.494558" />
</map:MapLine.To>
</map:MapLine>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="5.562764"
Longitude="101.470795" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="-19.138292"
Longitude="44.822302" />
</map:MapLine.To>
</map:MapLine>
</map:MapLineLayer.Lines>
</map:MapLineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
Constructors
MapLineLayer()
Initializes a new instance of the MapLineLayer class.
Declaration
public MapLineLayer()
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/world-map.json">
<map:MapShapeLayer.Sublayers>
<map:MapLineLayer>
<map:MapLineLayer.Lines>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="26.841944"
Longitude="114.561183" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="37.316207"
Longitude="89.494558" />
</map:MapLine.To>
</map:MapLine>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="5.562764"
Longitude="101.470795" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="-19.138292"
Longitude="44.822302" />
</map:MapLine.To>
</map:MapLine>
</map:MapLineLayer.Lines>
</map:MapLineLayer>
</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 |
LinesProperty
Identifies the Lines bindable property.
Declaration
public static readonly BindableProperty LinesProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Lines bindable property. |
Properties
AnimationDuration
Gets or sets a value that specifies the lines 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/world-map.json">
<map:MapShapeLayer.Sublayers>
<map:MapLineLayer AnimationDuration="5000"
AnimationEasing="{x:Static Easing.Linear}" >
<map:MapLineLayer.Lines>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="26.841944"
Longitude="114.561183" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="37.316207"
Longitude="89.494558" />
</map:MapLine.To>
</map:MapLine>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="5.562764"
Longitude="101.470795" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="-19.138292"
Longitude="44.822302" />
</map:MapLine.To>
</map:MapLine>
</map:MapLineLayer.Lines>
</map:MapLineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
AnimationEasing
Gets or sets a value that specifies the lines 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/world-map.json">
<map:MapShapeLayer.Sublayers>
<map:MapLineLayer AnimationEasing="{x:Static Easing.Linear}" >
<map:MapLineLayer.Lines>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="26.841944"
Longitude="114.561183" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="37.316207"
Longitude="89.494558" />
</map:MapLine.To>
</map:MapLine>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="5.562764"
Longitude="101.470795" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="-19.138292"
Longitude="44.822302" />
</map:MapLine.To>
</map:MapLine>
</map:MapLineLayer.Lines>
</map:MapLineLayer>
</map:MapShapeLayer.Sublayers>
</map:MapShapeLayer>
</map:SfMaps.Layer>
</map:SfMaps>
Lines
Gets or sets the collection of line. Every single MapLine connects two location coordinates through a straight line.
Declaration
public ObservableCollection<MapLine> Lines { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<MapLine> | The line collection. By default, the collection is empty. |
Examples
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapShapeLayer ShapesSource = "https://cdn.syncfusion.com/maps/map-data/world-map.json">
<map:MapShapeLayer.Sublayers>
<map:MapLineLayer>
<map:MapLineLayer.Lines>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="26.841944"
Longitude="114.561183" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="37.316207"
Longitude="89.494558" />
</map:MapLine.To>
</map:MapLine>
<map:MapLine>
<map:MapLine.From>
<map:MapLatLng Latitude="5.562764"
Longitude="101.470795" />
</map:MapLine.From>
<map:MapLine.To>
<map:MapLatLng Latitude="-19.138292"
Longitude="44.822302" />
</map:MapLine.To>
</map:MapLine>
</map:MapLineLayer.Lines>
</map:MapLineLayer>
</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()