IdentifyLayers is much slower with BasemapType::imagery than with BasemapType::streets

898
3
Jump to solution
08-03-2017 05:17 AM
MarcWouters
New Contributor III

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.

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

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);

View solution in original post

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

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);
0 Kudos
RichardMcGough
New Contributor II

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? 

0 Kudos
LucasDanzinger
Esri Frequent Contributor

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).

0 Kudos