showCalloutForGeoElement method

bool showCalloutForGeoElement(
  1. GeoElement geoElement, {
  2. String? title,
  3. String? detail,
  4. ArcGISPoint? tapLocation,
  5. String? titleExpression,
  6. String? detailExpression,
  7. CalloutStyle? style,
  8. LeaderPosition leaderPosition = .auto,
  9. bool animated = true,
  10. CalloutWidgetBuilder? contentBuilder,
})

Shows the callout for the given geo-element.

The tapLocation parameter is optional and is used to anchor callouts for non-point geometries near the interaction point. When omitted, non-point geometries anchor to the center of their extent.

The title and detail parameters are optional. If omitted, the current Callout.title and Callout.detail values are used as fallback text.

The contentBuilder parameter is optional and renders custom widget content. It cannot be used together with title, detail, titleExpression, or detailExpression parameters.

The Callout.title and Callout.detail properties provide the fallback text for the callout.

If geoElement is a DynamicEntity, titleExpression and detailExpression can be used to populate the callout title and detail from Arcade expressions. When titleExpression is set, its result is used as the callout title. When detailExpression is set, its result is used as the callout detail. If an expression is unset or evaluation fails, the corresponding title or detail fallback is used.

The titleExpression and detailExpression parameters are optional. For DynamicEntity geo-elements, if omitted, the current Callout.titleExpression and Callout.detailExpression values are used.

The style parameter is optional. When omitted, the current Callout.style value is used.

The leaderPosition parameter is optional and controls where the leader is placed on the callout.

The animated parameter is optional and defaults to true.

Returns true when the callout is shown, or false when placement fails.