Software Archive
Read-only legacy content
17061 Discussions

How to get the (latitude/longitude/altitude) position using GPS only (offline) ?

Ahmed_M_2
Beginner
543 Views

Hello

Is there anyway to get  (latitude/longitude/altitude) position using GPS only (offline) ?

I don't need to use google maps - just GPS info !!

I used this (with ionic) and a simple app with this plugin

both required the internet connection to get the GPS info

is Intel XDK has a solution for this issue ?

0 Kudos
3 Replies
Shahab_L_Intel
Employee
543 Views

The Geolocation plugin description says that:

"Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs."

and

"This API is based on the W3C Geolocation API Specification, and only executes on devices that don't already provide an implementation."

So they might be relying on the browser implementation that first tries to get the location using methods that require internet access.  See if setting 'enableHighAccuracy' option to true might force it to use actual gps info first.  If this doesn't work, you might have to search for another plugin that directly provides the gps info or write your own.  It's also a good idea to test on different devices.

0 Kudos
Ahmed_M_2
Beginner
542 Views

Thanks , I'll re-search for that

then , what about the altitude problem - it was (unavailable) on my mobile ?

0 Kudos
Shahab_L_Intel
Employee
542 Views

Being able to get altitude would depend on your device GPS and embedded browser implementation or the plugin implementation.

0 Kudos
Reply