Table of contents



Official Content

This API enables you to provide several Location Services on Native Mobile applications by interacting with the GPS on the devices where the apps are running.

MapsEO-GeneXus18

You can find the Maps external object in the KB Explorer within the Common module, which in turn is located within the GeneXus module.

Properties

AuthorizationStatus

Returns the current authorization status.
It is based on the APIAuthorizationStatus domain (the possible Enumerated values are: Not Determined, Restricted, Denied, Authorized, AuthorizedWhenInUse).

Authorized

Indicates whether the application has been given permission to use location services. It is a boolean value.

ServiceEnabled

Indicates whether location services are enabled in the device. It is a boolean value.

AuthorizedAccuracy

Returns the current location accuracy authorization status.
It allows you to check whether the application can use full accuracy or not, and execute accordingly (eg. display an error message or change functionality).
It is based on the LocationAccuracyAuthorization domain (the possible Enumerated values are: Full, Reduced, Unknown).

Methods

Note: Those methods marked with an asterisk (*) only work on the device (not simulator nor web environment).

CalculateDirections method

Gets Directions between two points.

Check HowTo: Use CalculateDirections method from Maps external object

GetLocation method

Returns the current location of the device.

Check HowTo: Use GetLocation method from Maps external object

StartTracking method *

Starts generating tracking information.

Return value None
Parameters TrackingParameter
 

Check StartTracking methodHowTo: Solve Tracking with GeneXus

EndTracking method *

Stops the generation of tracking information.

Return value None
Parameters None
 

Check HowTo: Solve Tracking with GeneXus

GetLocationHistory method

Returns a collection of location information generated by the tracking methods.

Return value LocationInfo
Parameters startTime:DateTime
 

Check HowTo: Solve Tracking with GeneXus

ClearLocationHistory method

Removes all previous location information generated by the tracking methods.

Return value None
Parameters None
 

Check HowTo: Solve Tracking with GeneXus

GetLatitude method *

Returns the latitude of the given location.

Return value Numeric(9.5)
Parameters location:GeoPoint

GetLongitude method *

Returns the longitude of the given location.

Return value Numeric(9.5)
Parameters location:GeoPoint

ReverseGeocode method

Returns a collection of addresses for the given location.

Return value Collection(Address)
Parameters location:GeoPoint

In order to work properly, you must configure a valid Google API Key in Google API Key property at Environment level.

GeocodeAddress method

Returns a collection of locations for the given address.

Return value Collection(GeoPoint)
Parameters address:Address

In order to work properly, you must configure a valid Google API Key in Google API Key property at Environment level.

GetDistance method

Returns the distance between the two locations given.

Return value LocationInfo
Parameters fromLocation:Geolocation, toLocation:Geolocation

SetProximityAlerts method *

Sets a set of proximity alerts and returns the success status of the operation.

Return value Boolean
Parameters proximityAlerts: Collection(LocationProximityAlerts)
 

Check SetProximityAlerts method, HowTo: Use Location Proximity Alerts.

GetProximityAlerts method *

Gets the list of proximity alerts set.

Return value proximityAlerts: Collection(LocationProximityAlerts)
Parameters None
 

Check HowTo: Use Location Proximity Alerts.

GetCurrentProximityAlert method *

Gets the information about the current proximity alert.

Return value GeolocationProximityAlerts
Parameters None
 

Check HowTo: Use Location Proximity Alerts.

ClearProximityAlerts method *

Clears the list of proximity alerts set.

Return value None
Parameters None
 

Check HowTo: Use Location Proximity Alerts.

PickLocation method

Picks (or selects) a location.

Return value None
Parameters LocationPickerParameters:GeolocationPickerParameters

GetDistance method

Returns the distance between the two locations given.

Return value LocationInfo
Parameters fromLocation:Geolocation, toLocation:Geolocation

RequestTemporaryFullAccuracy method

Allows asking the user for access to full accuracy in the locations temporarily at runtime. Receives the purpose string to be displayed in the permission request dialog and returns true if the full accuracy permission is correctly granted.

Return value Boolean
Parameters purpose:Character(100)

 

Notes:

  • Some of the methods are available for Web Environments as well.
  • Many of the methods and properties provided by this external object are similar to those provided by the Geolocation external object. The difference lies in the use of the Geography data type (in Maps external object) instead of the Geolocation domain (in Geolocation external object) to represent geographic coordinates.

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant