This section lists the deprecated function.
This API is deprecated from Kony Visualizer 4.0 release onwards. As an alternate, to capture the location details use the geolocation.getcurrentposition API.
This API provides you with the ability to capture the current location of the user based on the Global Positioning System (GPS) and Location Based Services (LBS) capabilities.
Use Case
You can use this API to:
Syntax
phone.mylocation();
Input Parameters
This API does not require any input parameters.
Return Values
Reference [userdata]
Contains three keys:
cellular ID
longitude
latitude
Status [Number]
Status can be one of the following:
0: Success in finding the location
-1: Unable to find the location
Error Codes
The following error codes are returned:
| Error Code | Description |
|---|---|
| 101 | Network Related Error |
| 102 | Location API access is denied by user |
| 103 | Unknown location or Location not found |
| 104 | Unknown error |
| 105 | Location Services Disabled |
Implementation Details
To fetch location details on Mobile Web, enable the Requires GPS property of a project and set the CaptureGPS property to true. For more information about capturing location details on Mobile Web, see the appendix GPS Functionality in Kony Visualizer User Guide.
This API does not fetch data if it is used in the appinit event or on the first call of form.preshow API.
Rules and Restrictions
Platform Availability
| Copyright © 2013 Kony, Inc. All rights reserved. |