Cale-Torino / WinTAK_Simple_Usage_Plugin

A simple plugin showing a few of the basic components which can be utilized when you develop a plugin for WinTAK
2 stars 1 forks source link

How to receive geofence alerts #2

Closed OmkarjoshiEll0254 closed 2 weeks ago

OmkarjoshiEll0254 commented 1 month ago

Hey there! I am sending some COT event to the wintak. I have circle marked and it is monitoring geofence for it. When the geo fence is breached, how we can receive the alert generated ?

Cale-Torino commented 1 month ago

Hi there, There's a few ways to check the geofence but the easy way is to use the GeofenceAlertMessage Class Reference.

You can check the WinTAK doxgen API document.

Go to WinTak.Common.Geofence.GeofenceAlertMessage class reference.

/*
WinTak.Common.Geofence.GeofenceAlertMessage.GeofenceAlertMessage | ( | MapObjectBase | mapObject,
  |   | string | fenceUid,
  |   | bool | entered
  | )

Where mapObject = The MapObject that entered or exited the Geofence

*/

You can also check out IGeofenceManager there's an option for a trigger.

OmkarjoshiEll0254 commented 1 month ago

Thanks for the info. But I am new to this. not sure how to implement it in the visual studio. And Also, one additional thing I want to do is when COT event is generated and sent to wintak, based on the latitude and longitude, it should generate a route from central location whose lat and long are known.

OmkarjoshiEll0254 commented 2 weeks ago

Thanks for the info. But I am new to this. not sure how to implement it in the visual studio. And Also, one additional thing I want to do is when COT event is generated and sent to wintak, based on the latitude and longitude, it should generate a route from central location whose lat and long are known.

I figured out a way to generate a route using Google API. Just, still I am not able to figure out how to catch Geofence alerts. I have created circle of 10 km and activated geofence on it. But not sure what is its Geofence uid which will be used in C#?