Hi,
Background: Working in ArcGIS Runtime for QT version 100.8 in QT version 5.14 on an Ubuntu system running release 19.10.
I've got a KML GroundOverlay graphic whose position I'd like to update in real-time. The graphic is rendered just fine initially, but any subsequent calls to functions on the KmlGroundOverlay don't seem to have an effect. As an example, here's a bit of code:
Considering the variables:
Esri::ArcGISRuntime::KmlGroundOverlay * m_groundOverlay;
Esri::ArcGISRuntime::KmlDataset *m_kdata;
Esri::ArcGISRuntime::KmlLayer *m_klayer;
Esri::ArcGISRuntime::Map *m_map;
In the "before" code - before the KML is called:
m_map(new Map(Basemap::topographicVector(this), this));
Setting up the KML Ground Overlay:
const Envelope env(-.001, 0.001, .001, 0.00, SpatialReference::wgs84());
KmlIcon * kmlIcon = new KmlIcon(QUrl("/home/bcrist/hundySquare.png")); // "hundySquare.png" is a red square shaped image file
// Create Overlay
m_groundOverlay = new Esri::ArcGISRuntime::KmlGroundOverlay(env, kmlIcon, this);
// Create Dataset
m_kdata = new Esri::ArcGISRuntime::KmlDataset(m_groundOverlay, this);
// Create Layer
m_klayer = new Esri::ArcGISRuntime::KmlLayer(m_kdata, this);
m_map->operationalLayers()->append(m_klayer);
Subsequently trying to just spin the layer around via a timer-called separate function (for testing purposes, obviously):
m_groundOverlay->setRotation(m_groundOverlay->rotation() + 1);
if (m_groundOverlay->rotation() > 360)
{
m_groundOverlay->setRotation(0);
}
I've assembled the "EditKmlGroundOverlay" sample from the arcgis-runtime-samples-qt repo on Git and altered it do perform the rotation above, and it works fine. The only difference I can figure out is that the EditKmlGroundOverlay sample uses a scene view instead of a map view.
Is this a limitation of Map Views or am I doing something wrong or missing something?