Maps external object

Official Content
This documentation is valid for:

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. 

It contains some Properties, Methods, Events, and Structured Data Types.

MapsEO-GeneXus18

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.

Return value LocationInfo
Parameters minAccuracy:Numeric(8.0), timeout:Numeric(8.0), IncludeHeadingAndSpeed:Boolean [, ignoreErrors:Boolean ]

Check EO Maps: GetLocation method

StartTracking method *

Starts generating tracking information. Check HowTo: Use Location Tracking.

Return value None
Parameters TrackingParameter

EndTracking method *

Stops the generation of tracking information. Check HowTo: Use Location Tracking.

Return value None
Parameters None

GetLocationHistory method

Returns a collection of location information generated by the tracking methods. Check HowTo: Use Location Tracking.

Return value LocationInfo
Parameters startTime:DateTime

ClearLocationHistory method

Removes all previous location information generated by the tracking methods.Check HowTo: Use Location Tracking.

Return value None
Parameters None

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. Check HowTo: Use Geolocation Proximity Alerts article.

Return value Boolean
Parameters proximityAlerts: Collection(LocationProximityAlerts)

GetProximityAlerts method *

Gets the list of proximity alerts set. Check HowTo: Use Geolocation Proximity Alerts article.

Return value proximityAlerts: Collection( LocationProximityAlerts )
Parameters None

GetCurrentProximityAlert method *

Gets the information about the current proximity alert. Check HowTo: Use Geolocation Proximity Alerts article.

Return value GeolocationProximityAlerts
Parameters None

ClearProximityAlerts method *

Clears the list of proximity alerts set. Check HowTo: Use Geolocation Proximity Alerts article.

Return value None
Parameters None

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 temporary 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.