In our application we switch between a street view basemap and a satellite view basemap.
if (satelliteView) { _map->setBasemap(Basemap::imagery(this)); } else { _map->setBasemap(Basemap::streets(this)); }
When the imagery is selected, finding features on the map (using IdentifyLayers) becomes suddenly much slower : up to 20 seconds before the identifyLayersCompleted signal is received.
What is the reason for this slow behaviour, and how can I prevent or bypass this ?
Thanks for any suggestions.
Solved! Go to Solution.
Interesting, I too can reproduce this with the below code. If you have a technical support, I suggest you open a case so they can file an official bug report. Thank you.
// Create the Widget view
m_mapView = new MapGraphicsView(this);
m_mapView->setWrapAroundMode(WrapAroundMode::Disabled);
m_map = new Map(Basemap::streets(this), this);
//m_map = new Map(Basemap::imagery(this), this);
connect(m_mapView, &MapGraphicsView::mouseClicked, this, [=](QMouseEvent e)
{
QDateTime date;
m_startTime = date.currentMSecsSinceEpoch();
m_mapView->identifyLayers(e.x(), e.y(), 10, false, 100);
});
connect(m_mapView, &MapGraphicsView::identifyLayersCompleted, this, [=]()
{
QDateTime date;
qDebug() << "identify done. time elapsed" << date.currentMSecsSinceEpoch() - m_startTime;
});
// Set map to map view
m_mapView->setMap(m_map);
// set the mapView as the central widget
setCentralWidget(m_mapView);
Interesting, I too can reproduce this with the below code. If you have a technical support, I suggest you open a case so they can file an official bug report. Thank you.
// Create the Widget view
m_mapView = new MapGraphicsView(this);
m_mapView->setWrapAroundMode(WrapAroundMode::Disabled);
m_map = new Map(Basemap::streets(this), this);
//m_map = new Map(Basemap::imagery(this), this);
connect(m_mapView, &MapGraphicsView::mouseClicked, this, [=](QMouseEvent e)
{
QDateTime date;
m_startTime = date.currentMSecsSinceEpoch();
m_mapView->identifyLayers(e.x(), e.y(), 10, false, 100);
});
connect(m_mapView, &MapGraphicsView::identifyLayersCompleted, this, [=]()
{
QDateTime date;
qDebug() << "identify done. time elapsed" << date.currentMSecsSinceEpoch() - m_startTime;
});
// Set map to map view
m_mapView->setMap(m_map);
// set the mapView as the central widget
setCentralWidget(m_mapView);
I'm having the same problem. I'm using ArcGISRuntime 100.6. Does anyone know if a solution or workaround has been found for this bug?
Hi Richard - It has not been fixed yet. The workaround is to loop through your operational layers and call identifyLayer on the ones you explicitly want to identify on - this will leave the basemap out of the equation and will allow you to further fine tune which operational layers participate in the identify (identifyLayers with an "s" will perform an identify on every layer in the map including basemaps).