Maps External Object

Official Content
This documentation is valid for:

This API enables you to provide several Location Services on your mobile applications by interacting with the GPS on the device where the app is running. Some of its methods are provided for the Web environment, too. 

In order to use this API, methods (such as CalculateDirections), Events (such as Directioncalculated), and Structured Data Types have been provided.

Many of the methods and properties provided by this API are similar to those provided by Geolocation external object. The difference is given by the use of the geography data type (in Maps EObject) instead of the geolocation domain (in Geolocation EObject)

EOMaps

All of these Methods and Events use Geography data type in order to represent geographic coordinates. Similar functions were provided by Geolocation external object using Geolocation Domain such as geographic coordinates.

Properties

AuthorizedAccuracy

Returns the current location accuracy authorization status. This property would allow 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 LocationAccuracyAuthorization domain and the possible values are Full, Reduced, and Unknown.

Methods

CalculateDirections method

Allows getting the Direction between two points.

Return value Direction Route 
Parameters sourceLocation: Geopoint, destionationLocation: Geopoint, Transport Type: Transport Type, requestAlternateRoutes:Boolean 

Example 

&directionsMaps = Maps.CalculateDirections(Geopoint.fromwkt("POINT (-56.1983300 -34.9064600)"), Geopoint.fromwkt("POINT (-56.2066700 -34.9101100)"), TransportType.Driving,false)

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 ]

StartTracking method *

Starts generating tracking information. Check Tracking article.

Return value None
Parameters TrackingParameter

EndTracking method *

Stops the generation of tracking information. Check Tracking article.

Return value None
Parameters None

GetLocationHistory method

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

Return value LocationInfo
Parameters startTime:DateTime

ClearLocationHistory method

Removes all previous location information generated by the tracking methods. Check Tracking article.

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

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: Using Geolocation Proximity Alerts article.

Return value Boolean
Parameters proximityAlerts: Collection(LocationProximityAlerts)

GetProximityAlerts method *

Get the list of proximity alerts set. Check HowTo: Using Geolocation Proximity Alerts article.

Return value proximityAlerts: Collection( LocationProximityAlerts )
Parameters None

GetCurrentProximityAlert method *

Get the information about the current proximity alert. Check HowTo: Using Geolocation Proximity Alerts article.

Return value GeolocationProximityAlerts
Parameters None

ClearProximityAlerts method *

Clear the list of proximity alerts set. Check HowTo: Using Geolocation Proximity Alerts article.

Return value None
Parameters None

PickLocation Method

Picks (or select) 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)