We are excited to announce with the new release of AppStudio 5.2, you now have access to ArcGIS Runtime 100.12 which includes the newly enhanced Geotrigger API. In this blog post you will learn what geotriggers are and how to build a mobile app that uses them with your own data. All you need is to download AppStudio Desktop 5.2 and AppStudio Player app.
What is a geotrigger?
A geotrigger allows you to monitor real-time GIS data and receive notifications when a specified condition is met such as when a device enters or leaves an area.
This technology has many applications and is already used in our lives daily. Delivery apps use this to alert their customers when the delivery drivers are nearing their drop off location and some GPS services alert drivers when they are coming up to a traffic condition like an accident or reported police officer sighting. Some other areas of possible use could be:
How to download and run the geotriggers sample app
To experience geotriggers, we’ve created a sample app called Geotrigger. This sample mobile app can be found and ran with either AppStudio Desktop or AppStudio Player 5.2 and above on an iOS, Android, Windows, MacOS, and Ubuntu device.
To see the sample using AppStudio Desktop, open AppStudio Desktop (5.2 or above), click the New App button, and browse for the app under the Samples tab or use the search box to find it by title and click Create. Once the sample app has been created, you can click Run in AppStudio Desktop, or click Edit to open the code in your editor of choice and run it there.
To see the sample using AppStudio Player, open AppStudio Player (5.2 or above). If not already done so, enable developer mode by selecting your profile icon in the top left corner. Select App Settings, then toggle Developer Mode. Go back to the home screen, and you will notice a new bottom tab with a compass icon. Selecting this tab opens the Samples screen where you can preview all AppStudio sample apps. You can scroll or use the search function to find the sample to preview.
About the geotrigger sample app
There are two samples within this application. One uses a simulated path that travels through Santa Barbara Botanic Gardens and another uses your current device's location and the OpenStreetMap Medical Facilities for North America feature layer.
When first opening the application, the Simulated Device sample will appear, and the simulated device will start moving through the Santa Barbara Botanic Gardens map. There are two features within this map, garden sections and garden points of interests. When within a feature geotrigger monitor parameter buffer, the geotrigger monitor will trigger a notification and populate a Garden Section or Point of Interest button. You can click the button to see some of that feature information pulled by the geotrigger monitor from the feature layer.
The Current Device Location sample will use your current device's location and the OpenStreetMap Medical Facilities feature layer stated above. Features within a set distance radius will be queried. After moving half the radius distance, features will be queried again based on the new current location. Just like the other sample, once your location is within the geotrigger monitor buffer, medical facilities buttons will appear. Clicking on the buttons will open a pane displaying the facility’s available information. This sample mobile app is intended for experiencing geotriggers while roaming the real world with a mobile device. So, get up, get out, and start moving towards these local medical facilities.
How geotriggers work
Once a map with features and a location display with a data source have been set up, a geotrigger monitor can be created. In the monitor, you will set what location data source and features to monitor, what event type triggers it (enter, exit, or enter and exit), a feature buffer distance, a message expression (what info is received from the feature layer), and a signal handler, onGeotriggerNotification, is called when the event trigger occurs. To learn more about geotriggers, check out the ArcGIS Runtime API for Qt, Work with Geotriggers, and the runtime QML sample, Set up location-driven Geotriggers.
Some important things to note
How to use your own data
After trying out the available sample app, you can create an app with geotriggers and your own data by following the steps below.
Geotriggers are a fun and very useful tool that can be used for many different things. They help provide insightful information pertaining to location and can provide a sense of urgency when utilized correctly. We hope you learned what geotriggers are and are inspired to use them. Please feel free to share with us how you used geotriggers in your next projects.
Credit: © OpenStreetMap contributors
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.