Module: geolocation

Module for retrieving geolocation information, using the geolocation plugin for Cordova. Using the navigator geolocation, the current position is passed in case of success. The exported function is 'getPosition', that has as parameters: the function to execute in case of success, the function to execute in case an error occured ** and the options, not applicable in this case.

Version:
  • $$Id: geolocation.js 75980 2017-07-18 00:19:25Z chadlia.jerad $$
Author:
  • Chadlia Jerad
Source:
Version:
  • $$Id: geolocation.js 75980 2017-07-18 00:19:25Z chadlia.jerad $$
Author:
  • Chadlia Jerad
Source:

Module for retrieving geolocation information, based on the device's IP address. An http get request returns the position. The exported function is 'getPosition', that has as parameters: the function to execute in case of success, the function to execute in case an error occured ** and the options, not applicable in this case.

If the status code of the response is OK (200) then a location object, with longitude, latitude, accuracy and timestamp attributes, is passed to the caller onSuccess function. In case of error, the caller onError function is called on the error.

Version:
  • $$Id: geolocation.js 75980 2017-07-18 00:19:25Z chadlia.jerad $$
Author:
  • Chadlia Jerad
Source:
Version:
  • $$Id: geolocation.js 75980 2017-07-18 00:19:25Z chadlia.jerad $$
Author:
  • Chadlia Jerad
Source: