setLocationsWithPolyline method

void setLocationsWithPolyline(
  1. Polyline polyline,
  2. {SimulationParameters? simulationParameters}
)

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

The generated locations are available from the SimulatedLocationDataSource.locations property. Distance between each location on the polyline is determined by the value of SimulationParameters.speed. If velocity is 10 meters per second, for example, the distance between locations will be 10 meters. The ArcGISLocation.timestamp values will always be 1 second apart. These location properties will be set based on the inputs: ArcGISLocation.timestamp, ArcGISLocation.position, ArcGISLocation.speed, ArcGISLocation.horizontalAccuracy, ArcGISLocation.verticalAccuracy The ArcGISLocation.course property will be calculated based on the inputs and the ArcGISLocation.isLastKnown property will not be set.

Parameters:

  • polyline — A polyline that defines a simulated travel path.
  • simulationParameters — Parameters to control how locations are created from the polyline.

Implementation

void setLocationsWithPolyline(Polyline polyline,
    {SimulationParameters? simulationParameters}) {
  _withThrowingErrorHandler((errorHandler) {
    runtimecore
        .RT_SimulatedLocationDataSource_setLocationsWithPolylineCombined(
            _handle,
            polyline._handle,
            simulationParameters?._handle ?? ffi.nullptr,
            errorHandler);
  });
}