Identify only one layer on MapViewer Template For AppBuilder

444
1
10-13-2020 01:32 PM
FrankLaFone
New Contributor

I'm trying to roll out a mobile app using MapViewer template for the AppStudio.  Right now, when you identify, it does an identify on all visible layers.  I need it to only identify on exactly one layer.  I've been able to figure out where/how to manipulate the attributes, but I can't seem to locate where in the code you have it focus only on one specific layer.  Any suggestions where in the Qt code?

Tags (1)
0 Kudos
1 Reply
ErwinSoekianto
Esri Regular Contributor

Frank, 

That would inside views/MapPage.qml, look for identifyFeatures function, around line ~3271. We are using the ArcGIS Runtime SDK for Qt‌ functionality called identifyLayersWithMaxResults that would identify the topmost GeoElement in all of the map's layers at the specified screen coordinates. But you can replace it with identifyLayerWithMaxResults GeoView QML Type | ArcGIS for Developers that would 

Identify which GeoElements in the specified layer appears at the specified screen coordinates. The difference is you need to specify the layer object as an additional parameter. 

Also based on this notice, FAQ: How is the World Geocoding Service affected by HTTPS Only enforcement? , please check on views/SearchPage.qml around line 580, to make sure that the Geocoding URL is using HTTPS URL.

Thank you,

Erwin

0 Kudos