Show / Hide Table of Contents

Method SetLocationsWithPolyline

SetLocationsWithPolyline(Polyline)

Creates a collection of locations using vertices from an input Polyline.

Declaration
public void SetLocationsWithPolyline(Polyline polyline)
Parameters
Type Name Description
Polyline polyline

A Polyline that defines a simulated travel path.

Remarks

The generated locations are available from the Locations property.

These location properties are populated based on the inputs: Timestamp, Position, and Velocity. The Course property is calculated based on the inputs.

These location properties are not set: HorizontalAccuracy, VerticalAccuracy, and IsLastKnown.

See Also
SetLocationsWithPolyline(Polyline, SimulationParameters)
Locations

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.8 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.8 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.8 - 100.12
Xamarin.Android100.8 - 100.15
Xamarin.iOS100.8 - 100.15
UWP100.8 - 100.15

SetLocationsWithPolyline(Polyline, SimulationParameters)

Creates a collection of locations along an input Polyline based on simulation parameters.

Declaration
public void SetLocationsWithPolyline(Polyline polyline, SimulationParameters simulationParameters)
Parameters
Type Name Description
Polyline polyline

A Polyline that defines a simulated travel path.

SimulationParameters simulationParameters

Parameters to control how locations are created from the Polyline.

Remarks

The generated locations are available from the Locations property.

Distance between each location on the Polyline is determined by the value of Velocity. If velocity is 10 meters per second, for example, the distance between locations will be 10 meters.

The Timestamp values will always be 1 second apart.

These location properties will be set based on the inputs: Timestamp, Position, Velocity, HorizontalAccuracy, and VerticalAccuracy.

The Course property will be calculated based on the inputs and the IsLastKnown property will not be set.

See Also
SetLocationsWithPolyline(Polyline)
Locations

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.8 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.8 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.8 - 100.12
Xamarin.Android100.8 - 100.15
Xamarin.iOS100.8 - 100.15
UWP100.8 - 100.15
Relevant samples
Navigate route: Use a routing service to navigate between points.
Show location history: Display your location history on the map.
In This Article
Back to top Copyright © 2022 Esri.