Tag: Javascript

By: | On:

  JS  

Retrieves the GPS coordinates of the Browser.

  • Uses an inline callback.
  • Normalizes the output.
  • Makes the async call feel like a sync call, but it's still async.
  • This is a good template for similar async calls.

On Github: https://github.com/campsoftware/locationGet-js

Calling Example

xanLocationGet( function ( coords ) { alert( coords[`ErrorCode`] + `, ` + coords[`ErrorDesc`] + `, ` + coords[`Latitude`] + `, ` + coords[`Longitude`]  ...