The data for a Callout view. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: |
Properties
- detail : string
- geoElement : GeoElement
- imageUrl : url
- location : Point
- screenPoint : point
- showCalloutForLocationDisplay : bool
- tapLocation : Point
- title : string
- visible : bool
Signals
- detailChanged()
- geoElementChanged()
- imageUrlChanged()
- locationChanged()
- screenPointChanged()
- showCalloutForLocationDisplayChanged()
- tapLocationChanged()
- titleChanged()
- visibleChanged()
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 totrue
, 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 totrue
, 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
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.
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.
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.
Signal Documentation
Emitted when the detail property changes.
Note: The corresponding handler is onDetailChanged
.
Emitted when the geoElement property changes.
Note: The corresponding handler is onGeoElementChanged
.
Emitted when the imageUrl property changes.
Note: The corresponding handler is onImageUrlChanged
.
Emitted when the location property changes.
Note: The corresponding handler is onLocationChanged
.
Emitted when the screenPoint property changes.
Note: The corresponding handler is onScreenPointChanged
.
Emitted when the showCalloutForLocationDisplay property changes.
Note: The corresponding handler is onShowCalloutForLocationDisplayChanged
.
Emitted when the tapLocation property changes.
Note: The corresponding handler is onTapLocationChanged
.
Emitted when the title property changes.
Note: The corresponding handler is onTitleChanged
.
Emitted when the visible property changes.
Note: The corresponding handler is onVisibleChanged
.