Using Azure Maps to Calculate Worker Distance from Alarms

When using alarms with location information, it is possible to calculate the worker distance from the alarm using Azure Maps. This obtains the distance and time required to travel via the best route. As with the previous version, you must still collect the worker location data using the MobileHMI CFSWorX feature.

 

To use Azure Maps, you must follow these steps:

  1. You must create an Azure Maps account and get a primary key for your account. Follow these instructions under ‘Create an account with Azure Maps’ and ‘Get the primary key for your account’:
    https://docs.microsoft.com/en-us/azure/azure-maps/quick-demo-map-app

  2. Enter the Azure Maps primary key into the environment variable “Ico_Cfs_AzureMapsKey”. Follow these detailed instructions.

Note: The next steps require the Windows Environment Variables to be changed for the user running the CFSWorX Services. To do this, we must sign into Windows as that account.

  1. Log into Windows as the user configured to run the ICONICS Connected Field Service Point Manager service (FwxWorkerAccessService).

  2. Open Windows Settings.

  3. Search for “Environment Variables”.

  4. Select “Edit environment Variables for your account”.

  5. Add the following variable and its value:

Ico_Cfs_AzureMapsKey - the value should be the Azure Maps API Key that you generated previously.

 

Note: It is very important that the environment variables and the services are under the same user, if not they will not be read by the service correctly.

  1. Now restart the CFSWorX Workers Point Manager.

  2. Now any Worker Lookup activity in a workflow that includes the location information will retrieve the workers sorted by the distance that is acquired from Azure Maps. This distance represents the shortest driving route.

  3. If you wish to discontinue using Azure Maps, simply delete the environment variable and restart CFSWorX Workers Point Manager.

See Also:

Setting Up Mobile Device Health