Official Content

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 

Native Mobile applications

There are two use cases:

Web applications

  • 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:

           image_20246318583_1_png

Once the permission is obtained, the current location is displayed:

          image_202463185827_1_png

  • 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.
Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant