The way that I implemented it is different from Arshad and even the way that Josh implemented the demo.
The reason is, since 2016, I'm thinking on
Easy to use,
ready to use and standalone CSPro libraries.
So, for geofencing, my implementation follow these steps:
a) Transform AOI polygon in points It's possible to use ArcGIS and QGIS tools for this. However, for open encoding GIS format such as Geojson, KML, it's possible to use a scripts written in CSPro logic or/and Javascript to extract points from polygons.
b) Create a CSPro Dictionary and store these points in CSDB/CSDBE: This way is more convenient because it allow us to change AOI and easily smart sync them as points to CSEntry apps.
c) Recreate polygons on the fly using approach that Josh and I described. Because I'm more at ease with SQL, I'm using it rather than Josh's approach;
d) Array of Points to Geojson I Implemented some CSPro functions able to convert any array of X,Y points (respecting some rules) to a Geojson polygon. So, users can visualize them on dynamic mapping features embed in CSEntry apps.
Years ago, I discussed with the CSPro Developer Team about the need to have in CSPro a support for dictionary records and items that are unknow until the runtime,
viewtopic.php?f=1&t=3083
viewtopic.php?f=1&t=3771
viewtopic.php?f=1&t=3641
that's Greg called
"ToSymbol function".
Greg already implement something like this for user defined functions using
"Runtime binding".
However, we're still wait for the
"ToSymbol function".
When, this limitation is solved for dictionary symbols, I'll do my best to submit to CSProusers some easy to use code sources for solving some issues.
Best