Skip To Content ArcGIS for Developers Sign In Dashboard

CalloutData QML Type

The data for a Callout view. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Detailed Description

This class works in conjunction with the Callout view in the ArcGIS Runtime Toolkit, which is used to display information on a map. CalloutData provides the Callout with the content to display in the view and the screen coordinates detailing where to display the view. The content of the callout consists of a title and a detail string. It can also display an image to the left of the title and detail, and an accessory button to the right. The accessory button can be used to present a secondary view with more details, such as a pop up.

A Callout can be displayed for several different scenarios:

  • To display the coordinates where a user tapped on the map. To do this, you could set location to where the tap occurred, set title to "Location", set detail to a string containing the map coordinates, and set visible to true, so the Callout will display.
  • To display information about a GeoElement that has been identified on the MapView. To do this, you could set geoElement to the GeoElement that has been identified, set title to one of the GeoElement's fields, set imageUrl to a swatch of the GeoElement's symbol, and set visible to true, so the Callout will display.
  • To display a callout at your current location. To do this, set showCalloutForLocationDisplay to true, set title to "Current Location", set detail to a string containing your current location, and set visible to true, so the Callout will display.

Obtain CalloutData from MapView::calloutData. You can change the content of the callout by setting properties on this class. To change the look and feel of the Callout view, set properties on the Callout in the toolkit.

Example:

Initialize CalloutData, and apply to a Callout view component:

// initialize Callout
calloutData {
    imageUrl: "qrc:/Samples/DisplayInformation/ShowCallout/RedShinyPin.png"
    title: "Location"
    location: calloutLocation
    detail: "x: " + xCoor + " y: " + yCoor
}

Callout {
    id: callout
    calloutData: parent.calloutData
    leaderPosition: leaderPositionEnum.Automatic
}

Property Documentation

detail : string

The detail text for the callout.


geoElement : GeoElement

The GeoElement for which the callout should be displayed.

If you specify the optional tapLocation property, the callout displays at the point on the geometry nearest to tapLocation.

Note: Only supports Feature and Graphic GeoElements.


imageUrl : url

The URL to a local or remote image file.

If the callout is displayed for a GeoElement, the symbol swatch for that GeoElement is autogenerated and imageUrl will contain that path. This can be overridden by specifying the URL to a different image.


location : Point

The map location at which the callout should be displayed.


screenPoint : point

The screen coordinates at which the callout is displayed (read-only).


showCalloutForLocationDisplay : bool

Whether the callout is being shown for the LocationDisplay on the map.

Set this property to true if you want the callout to be displayed for your current location.


tapLocation : Point

The tap location of the callout.

If the callout is shown for a GeoElement, tapLocation specifies the optional location where the callout should be displayed.


title : string

The title text for the callout.


visible : bool

Whether the callout is visible.

Set this to true if the callout should be shown.


Signal Documentation

detailChanged()

Emitted when the detail property changes.


geoElementChanged()

Emitted when the geoElement property changes.


imageUrlChanged()

Emitted when the imageUrl property changes.


locationChanged()

Emitted when the location property changes.


screenPointChanged()

Emitted when the screenPoint property changes.


showCalloutForLocationDisplayChanged()

Emitted when the showCalloutForLocationDisplay property changes.


tapLocationChanged()

Emitted when the tapLocation property changes.


titleChanged()

Emitted when the title property changes.


visibleChanged()

Emitted when the visible property changes.



Feedback on this topic?