CalloutData QML Type

The data for a Callout view. More...

Import Statement: import Esri.ArcGISRuntime 100.15
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.

Note: The corresponding handler is onDetailChanged.


geoElementChanged()

Emitted when the geoElement property changes.

Note: The corresponding handler is onGeoElementChanged.


imageUrlChanged()

Emitted when the imageUrl property changes.

Note: The corresponding handler is onImageUrlChanged.


locationChanged()

Emitted when the location property changes.

Note: The corresponding handler is onLocationChanged.


screenPointChanged()

Emitted when the screenPoint property changes.

Note: The corresponding handler is onScreenPointChanged.


showCalloutForLocationDisplayChanged()

Emitted when the showCalloutForLocationDisplay property changes.

Note: The corresponding handler is onShowCalloutForLocationDisplayChanged.


tapLocationChanged()

Emitted when the tapLocation property changes.

Note: The corresponding handler is onTapLocationChanged.


titleChanged()

Emitted when the title property changes.

Note: The corresponding handler is onTitleChanged.


visibleChanged()

Emitted when the visible property changes.

Note: The corresponding handler is onVisibleChanged.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.