ArcGIS Runtime SDK for macOS

Identify KML features

Description

Show a balloon popup with formatted content for clicked KML features. KML supports defining HTML for popup

Identify KML features

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.

Steps:

  1. The identify process starts when the user clicks on the map.
  2. Any existing callout is dismissed using AGSCallout.dismiss().
  3. AGSGeoView.identifyLayer(_:screenPoint:tolerance:returnPopupsOnly:completion:) is called with a reference to the KML layer, the clicked position, and a tolerance of 15 points.
  4. There are several types of KML features. This sample will only identify features of type AGSKMLPlacemark.
  5. The balloonContent of the first returned KML placemark is then shown in a callout.


In this topic
  1. Description