API: Return Device Location
Allows you to check the device's geolocation coordinates and placemark data.
- Sample code to run within the app and download for integration into your own project is available here.
- App Settings
- Check Location Coordinates
- iOS/iPadOS Permissions
- Location Services - more on enabling specific iOS/iPadOS permissions here
Triggers via API Functions
Check Location Coordinates
This function allows the app to request and return current location coordinates for the device.
|Callback return values||
Check Location Placemark
This function triggers a callback returning arrays with the location placemark information for the device, which represents Apple's best approximation of a full physical address for the device.
Note that Apple rate-limits requests to its geocoding endpoint for placemark data - they recommend only requesting new placemark information if you don't have a previous location, if the user has moved a meaningful distance from the previous location, such as 1000 meters, and if it's been 60 seconds since the last geocode request.
|Parameters||callback - [string] the name of the callback to be triggered after the function has been executed|
|Callback return values|| deviceInfo - [array] containing the following:
Notifications via API Callbacks
On Location Update
This callback is triggered by the app when the location is updated through the app's 'Update Location Coordinates Automatically' setting, which must be set to 'Continuously' to trigger this on an ongoing basis or 'On App Launch' to trigger this once on app launch.
This callback does not return coordinate data directly, but instead can be defined in the head of your page to trigger one of the functions described above to return new location data.
- To run sample code, set the app's homepage to kioskgroup.com/location-api
- To download a .zip of sample code, click here.
- Added in version 1.0. Ability to check location coordinates on-demand added in version 9.2. Ability to return placemark data added and app-defined variables deprecated in version 10.0