Show a balloon popup with formatted content for clicked KML features. KML supports defining HTML for popup
How it works
Click a feature to identify it. Feature information will be displayed in a callout. Note: the KML layer used in this sample contains a screen overlay. The screen overlay contains a legend and the logos for NOAA and the NWS. You can't identify the screen overlay.
- The identify process starts when the user clicks on the map.
- Any existing callout is dismissed using AGSCallout.dismiss().
- AGSGeoView.identifyLayer(_:screenPoint:tolerance:returnPopupsOnly:completion:) is called with a reference to the KML layer, the clicked position, and a tolerance of 15 points.
- There are several types of KML features. This sample will only identify features of type AGSKMLPlacemark.
- The balloonContent of the first returned KML placemark is then shown in a callout.