|
ArcGIS Runtime SDK for iOS
100.9
|
A Popup which displays a geo-element's information.
Instances of this class represent a Popup which associates a geo-element with Popup definition for the purpose of displaying in an AGSPopupsViewController.
Instance Methods | |
| (id< AGSCancelable >) | - evaluateExpressionsWithCompletion: |
| (NSString *) | - formattedValueForField: |
| (instancetype) | - initWithGeoElement: |
| (instancetype) | - initWithGeoElement:popupDefinition: |
| (nullable NSString *) | - stringForTemplatedString: |
Class Methods | |
| (instancetype) | + popupWithGeoElement: |
| (instancetype) | + popupWithGeoElement:popupDefinition: |
Properties | |
| id< AGSGeoElement > | geoElement |
| AGSPopupDefinition * | popupDefinition |
| AGSSymbol * | symbol |
| NSString * | title |
| - (id<AGSCancelable>) evaluateExpressionsWithCompletion: | (void(^)(NSArray< AGSPopupExpressionEvaluation * > *__nullable results, NSError *__nullable error)) | completion |
Asynchronously evaluates all expressions, including Arcade FeatureSet functions available at AGSPopupDefinition::expressions. This method must be called before displaying the popup information in a UI so you can use synchronous methods formattedValueForField: and stringForTemplatedString: to get the formatted NSString representation. If there are no AGSPopupDefinition::expressions then result array will be empty. The AGSPopupExpression may be used in the AGSPopupDefinition::fields, AGSPopupDefinition.media, AGSPopupDefinition.title and AGSPopupDefinition.description.
| completion | Block that is invoked when the operation finishes. The results parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
| - (NSString*) formattedValueForField: | (AGSPopupField *) | popupField |
Returns a string you can use in a display for the Popup's field value. String will have the proper formatting based on the field type and AGSPopupField configuration. Dates and times are returned in the local timezone. If AGSPopupDefinition::expressions is not empty then the AGSPopupField may be using expressions with Arcade FeatureSet functions. Use evaluateExpressionsWithCompletion: to evaluate the Arcade expressions before trying to get the formatted NSString representation of the popup field's value, otherwise it may return an empty string.
| popupField | The field for which a properly formatted value is desired |
| - (instancetype) initWithGeoElement: | (id< AGSGeoElement >) | geoElement |
Initialize the Popup for the provided geo-element. A default Popup definition will be created based on the geo-element's attributes or schema specifying how the geo-element should be represented in the Popup.
| geoElement | for which to create a Popup |
| - (instancetype) initWithGeoElement: | (id< AGSGeoElement >) | geoElement | |
| popupDefinition: | (nullable AGSPopupDefinition *) | popupDefinition | |
Initialize the Popup for the provided geo-element based on the Popup definition.
| geoElement | for which to create a Popup |
| popupDefinition | specifying how the geo-element should be represented in the Popup If you pass nil for the popupDefinition a default one will be created for you based on the geo-element's attributes or schema. |
| + (instancetype) popupWithGeoElement: | (id< AGSGeoElement >) | geoElement |
Initialize the Popup for the provided geo-element. A default Popup definition will be created based on the geo-element's attributes or schema specifying how the geo-element should be represented in the Popup.
| geoElement | for which to create a Popup |
| + (instancetype) popupWithGeoElement: | (id< AGSGeoElement >) | geoElement | |
| popupDefinition: | (nullable AGSPopupDefinition *) | popupDefinition | |
Initialize the Popup for the provided geo-element based on the Popup definition.
| geoElement | for which to create a Popup |
| popupDefinition | specifying how the geo-element should be represented in the Popup If you pass nil for the popupDefinition a default one will be created for you based on the geo-element's attributes or schema. |
| - (nullable NSString*) stringForTemplatedString: | (NSString *) | templatedString |
Substitutes attribute templates in a string with actual values. If AGSPopupDefinition::expressions is not empty then the AGSPopupField may be using expressions with Arcade FeatureSet functions. Use evaluateExpressionsWithCompletion: to evaluate the Arcade expressions before trying to get the NSString for templated string, otherwise it may return an empty string.
| templatedString | The templated string. |
|
readnonatomicstrong |
The geoElement which this Popup is associated with.
|
readnonatomicstrong |
A Popup definition that dictates which information belonging to the geo-element should be displayed in the Popup and how it should be formatted.
|
readnonatomicstrong |
The Popup symbol.
|
readnonatomiccopy |
The text to display as the Popup title.