I have written a small app with qt and arcgis 100.3. When the gps information changes the slot LocationChanged is called. I thought that I would get the altitude from Location.position.z. But I always get 0 for the altitude.
What do I have to do to get the actual altitude?
void FlightMap::locationChanged(Esri::ArcGISRuntime::Location location)
{
Point pos=location.position();
x=pos.x();
y=pos.y();
z=pos.z();
}
What signal are you connecting to for this slot?
connect(m_MapView->locationDisplay(),SIGNAL(locationChanged(Esri::ArcGISRuntime::Location)),this,SLOT(locationChanged(Esri::ArcGISRuntime::Location)));
Hi Kai-
The LocationDisplay is the view component for Qt's QGeoPositionInfoSource. Can you try creating a QGeoPositionInfoSource and listening to it's positionUpdated signal? QGeoPositionInfoSource Class | Qt Positioning 5.11
I'm wondering if the data that is coming in only has X and Y but no Z.
Thank you very much. It is now working. I have tried the positionUpdate Signal and I now get the altitude.
Is this a bug in ArcGIS?
Kai - so the results are that you get z values when using positionUpdated but not on the locationChanged signal? If so, then this sounds like a bug in ArcGIS Runtime.