ArcGIS Runtime SDK for iOS: AGSPopupDefinition Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSPopupDefinition Class Reference

Description

A popup definition.

Instances of this class respresent popup definitions for geo-elements that need to be displayed in popups. Popup definitions contain information such as -

  • Which attributes of the geo-element should the popup display, whether they are editable, how to format numbers and dates, etc
  • Whether the popup should show attachments for the geo-element
  • What media, such as charts and images, should be displayed for the geo-element
Since
100
Inheritance diagram for AGSPopupDefinition:
AGSObject

Instance Methods

(instancetype) - initWithGeoElement:
 
(instancetype) - initWithPopupSource:
 

Class Methods

(instancetype) + popupDefinition
 
(instancetype) + popupDefinitionWithGeoElement:
 
(instancetype) + popupDefinitionWithPopupSource:
 

Properties

BOOL allowDelete
 
BOOL allowEdit
 
BOOL allowEditGeometry
 
NSString * customDescription
 
NSArray< AGSPopupElement * > * elements
 
NSArray< AGSPopupExpression * > * expressions
 
NSArray< AGSPopupField * > * fields
 
NSArray< AGSPopupMedia * > * media
 
AGSPopupRelatedFeaturesDefinitionrelatedFeaturesDefinition
 
BOOL showAttachments
 
BOOL showEditSummary
 
BOOL showRelatedRecords
 
NSString * title
 

Method Documentation

◆ initWithGeoElement:

- (instancetype) initWithGeoElement: (id< AGSGeoElement >)  geoElement

Creates a new popup definition with default properties and default popup elements based on the geo-element fields.

By default, all the attributes will be included in the popup fields.

Parameters
geoElementThe geo-element for the popup definition, such as an AGSFeature or AGSGraphic.
Since
100

◆ initWithPopupSource:

- (instancetype) initWithPopupSource: (id< AGSPopupSource >)  popupSource

Creates new popup definition with default properties and default popup elements based on the popup source fields.

By default, all the fields available in the source will be included in the popup fields.

Parameters
popupSourceA popup source for which popup definition should be created.
Since
100

◆ popupDefinition

+ (instancetype) popupDefinition

Creates a new popup definition.

Use this object to define the look and feel of pop-up windows when users click or query a feature.

Returns
A new popup definition.
Since
100.0

◆ popupDefinitionWithGeoElement:

+ (instancetype) popupDefinitionWithGeoElement: (id< AGSGeoElement >)  geoElement

Creates a new popup definition with default properties and default popup elements based on the geo-element fields.

By default, all the attributes will be included in the popup fields.

Parameters
geoElementThe geo-element for the popup definition, such as an AGSFeature or AGSGraphic.
Returns
A new popup definition.
Since
100

◆ popupDefinitionWithPopupSource:

+ (instancetype) popupDefinitionWithPopupSource: (id< AGSPopupSource >)  popupSource

Creates new popup definition with default properties and default popup elements based on the popup source fields.

By default, all the fields available in the source will be included in the popup fields.

Parameters
popupSourceA popup source for which popup definition should be created.
Returns
A new popup definition.
Since
100

Property Documentation

◆ allowDelete

- (BOOL) allowDelete
readwritenonatomicassign

Whether or not the popup should allow the geo-element to be deleted.

Since
100

◆ allowEdit

- (BOOL) allowEdit
readwritenonatomicassign

Whether or not the popup should allow the geo-element to be edited.

Since
100

◆ allowEditGeometry

- (BOOL) allowEditGeometry
readwritenonatomicassign

Whether or not the popup should allow the geo-element's geometry should be edited. Only applicable when allowEdit is YES.

Since
100

◆ customDescription

- (NSString*) customDescription
readwritenonatomiccopy

The description that is shown for the geo-element in the popup. This can be html. If description is nil then the #popupFields are used when viewing attributes. This can contain a literal value, or a placeholder for value from the geo-element's attribute. The placeholder needs to be of the form {field_name} where field_name is a key in the geo-element's attributes.

Since
100

◆ elements

- (NSArray<AGSPopupElement *>*) elements
readwritenonatomiccopy

An array of AGSPopupElement objects that represent an ordered list of pop-up elements.

The order of the array is the order that elements are shown in the pop-up window.

For backward compatibility with a webmap or webscene created by clients that don't support the popup elements, a few popup elements are created to match the legacy popup style when reading a popup definition without popup elements:

Vice versa, if the user updates the popup elements, the legacy popup style is updated during the AGSPopupDefinition serialization, in order to match as much as possible the popup elements, so that older clients can display a popup that looks similar.

Since
100.14

◆ expressions

- (NSArray<AGSPopupExpression*>*) expressions
readwritenonatomiccopy

A list of expressions based on the Arcade language that can be evaluated to display computed information in fields, media, title, or customDescription.

Since
100.3

◆ fields

- (NSArray<AGSPopupField*>*) fields
readwritenonatomiccopy

The geo-element's fields (as an array of AGSPopupField objects) that are to be displayed in the popup. If description is not nil then the popup fields are not used when viewing attributes. The order of the array is the order that fields are shown in the popup.

Since
100

◆ media

- (NSArray<AGSPopupMedia*>*) media
readwritenonatomiccopy

The media (as an array of AGSPopupMedia objects) that is to be displayed in the popup.

The order of the array is the order that medias are shown in the pop-up window.

Since
100

◆ relatedFeaturesDefinition

- (AGSPopupRelatedFeaturesDefinition*) relatedFeaturesDefinition
readwritenonatomicstrong

A definition that dictates whether related features should be displayed in the popup and how they should be sorted.

Since
100.1

◆ showAttachments

- (BOOL) showAttachments
readwritenonatomicassign

Whether or not the popup should show attachments of the geo-element.

Since
100

◆ showEditSummary

- (BOOL) showEditSummary
readwritenonatomicassign

Whether or not the popup should display a summary of when the geo-element was last edited and by whom.

Since
100

◆ showRelatedRecords

- (BOOL) showRelatedRecords
readwritenonatomicassign

Whether or not the popup should show additional geo-elements that are related to this popup's geo-element.

Since
100
Deprecated:
100.1. Use #relatedFeaturesDefinition.showRelatedFeatures instead.

◆ title

- (NSString*) title
readwritenonatomiccopy

The title that is displayed for the geo-element in the popup. This can contain a literal value, or a placeholder for value from the geo-element's attribute. The placeholder needs to be of the form {field_name} where field_name is a key in the geo-element's attributes.

Since
100