void Open( DeviceLocationSource source, DeviceLocationProperties props )
Sub Open( _ ByVal source As DeviceLocationSource, _ Optional ByVal props As DeviceLocationProperties _ )
Parameters
- source
- props
void Open( DeviceLocationSource source, DeviceLocationProperties props )
Sub Open( _ ByVal source As DeviceLocationSource, _ Optional ByVal props As DeviceLocationProperties _ )
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run |
{
var newSrc = new SerialPortDeviceLocationSource();
//Specify the COM port the device is connected to
newSrc.ComPort = "Com3";
newSrc.BaudRate = 4800;
newSrc.AntennaHeight = 3; // meters
//fill in other properties as needed
var props = new DeviceLocationProperties();
props.AccuracyThreshold = 10; // meters
// jump to the background thread
//open the device
await QueuedTask.Run(() => DeviceLocationService.Instance.Open(newSrc, props));
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)