Before testing this new action, you need to make sure that Geolocation capabilities are enabled for this project. You can do this by using the following steps:
- Still in the Chapter14/takeTheTrain.cptx file, use the Window | Mobile palette menu item to open the Mobile Palette dialog.
- Make sure that the Geolocation checkbox is selected in the bottom section of the Mobile Palette dialog.
This action is illustrated in the following screenshot:
If this checkbox is not selected, Captivate will not be able to access the geolocation data. In other words, the cpInfoGeolocation system variable will always have a value of undefined.
Before closing the Mobile Palette dialog, take some time to inspect the other options that are available. For example, take good note of the ability to automatically run a script (in other words, an Advanced Action) each time a location change is detected.
- Click the OK button to save these changes and close the Mobile Palette...