It is possible to get the geographical location of the device running an application and/or display it on a map.
This article explains how to do this in two scenarios:
- Native Mobile applications (Android and iOS)
- Web applications
There are two use cases:
- Display the current location: In web applications, the GPS is not accessed directly. Instead, it is possible to get an approximate location using an HTML5 standard.
To do so, create an attribute or variable based on the Geography data type in a Web Panel object or Transaction object. At runtime, a message will appear in the browser requesting permissions to display the current location:
Once the permission is obtained, the current location is displayed:
- Get the current location: For this case, there is no standard GeneXus functionality, but it can be solved with a method from the WebExtension Toolkit.