Hi,
Here is a snippet to identify multiple layers in the map, and show all the popups for the results. When the popup view controller is shown, swipe left and right to browse all the popups - see the screenshot.
Does it do what you need?
mapView.identifyLayers(atScreenPoint: screenPoint, tolerance: 10, returnPopupsOnly: false, maximumResultsPerLayer: 10) { [weak self] (results: [AGSIdentifyLayerResult]?, error: Error?) in
if let results = results {
let popups = results.flatMap { $0.geoElements.map(AGSPopup.init) } // results.flatMap { $0.popups } if the features already have popups configured in ArcGIS Pro.
if !popups.isEmpty {
let popupsViewController = AGSPopupsViewController(popups: popups, containerStyle: .navigationBar)
popupsViewController.delegate = self
self?.present(popupsViewController, animated: true)
} else {
self?.presentAlert(message: "No features identified.")
}
}
}