Show a callout with the latitude and longitude of user-tapped points.
Callouts are used to display temporary detail content on a map. You can display text and arbitrary UI controls in callouts.
Tap anywhere on the map. A callout showing the WGS84 coordinates for the tapped point will appear.
- Listen for
GeoViewTapped
events on the map view. - When the user taps, get the tapped location from the
Location
property of theGeoViewInputEventArgs
. - Project the geometry to WGS84 using
GeometryEngine.Project
. - Create a string to display the coordinates; note that latitude and longitude in WGS84 map to the Y and X coordinates.
- Create a new callout definition using a title and the coordinate string.
- Display the callout by calling
ShowCalloutAt
on the map view with the location and the callout definition.
- CalloutDefinition
- GeometryEngine.Project
- GeoViewTappedEventArgs
- MapView.GeoViewTapped
- MapView.ShowCalloutAt
balloon, bubble, callout, flyout, flyover, info window, popup, tap