Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ahmed_M_2
Beginner
153 Views

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

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 ?

Tags (2)
0 Kudos
3 Replies
Shahab_L_Intel
Employee
153 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.

Ahmed_M_2
Beginner
153 Views

Thanks , I'll re-search for that

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

Shahab_L_Intel
Employee
153 Views

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

Reply