Display device location offline mode..

645
3
03-12-2019 04:38 AM
Girishchandra_Yendargaye
New Contributor III

Hello Team,

Can you please suggest correct way to display and track device location in offline map...

Thanks,

Tags (1)
0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor
0 Kudos
Girishchandra_Yendargaye
New Contributor III

This example uses  m_mapView->locationDisplay()->setPositionSource(QGeoPositionInfoSource::createDefaultSource(this));

Which is accessing my network and picking up location..

But what if I do not have Internet...And I want to load from file

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Just to be clear, the GPS receiver should not require the internet to function. Many of our Esri apps work completely offline and use LocationDisplay.

With that said, QGeoPositionInfoSource has a subclass that takes in a NMEA source, which could be set to a file - QNmeaPositionInfoSource Class | Qt Positioning 5.12.2 

c++ - Parsing *.nmea file with QNmeaPositionInfoSource class returns timeout. - Stack Overflow  

Also, you can subclass QGeoPositionInfoSource to take in any type of file. For example, we did this with GPX files for an example app - dynamic-situational-awareness-qt/GPXLocationSimulator.h at master · Esri/dynamic-situational-awarene...  

0 Kudos