dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Popups
PopupTemplate Class
A PopupTemplate formats and defines the content of a Popup for
a specific Layer or Graphic.
ArcGIS Maps SDK for JavaScript
public class PopupTemplate : dymaptic.GeoBlazor.Core.Components.MapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 PopupTemplate
Constructors
PopupTemplate() Constructor
Parameterless constructor for using as a razor component
public PopupTemplate();
PopupTemplate(string, string, IReadOnlyList, IReadOnlyList, IReadOnlyList, IReadOnlyList, Nullable, Nullable, IReadOnlyList) Constructor
Constructs a new PopupTemplate in code with parameters
public PopupTemplate(string? title=null, string? stringContent=null, System.Collections.Generic.IReadOnlyList<string>? outFields=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FieldInfo>? fieldInfos=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Popups.PopupContent>? content=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Popups.PopupExpressionInfo>? expressionInfos=null, System.Nullable<bool> overwriteActions=null, System.Nullable<bool> returnGeometry=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ActionBase>? actions=null);
Parameters
title
System.String
The title of the popup
stringContent
System.String
Use this parameter if the content is a simple string
outFields
System.Collections.Generic.IReadOnlyList<System.String>
An array of field names used in the PopupTemplate.
fieldInfos
System.Collections.Generic.IReadOnlyList<FieldInfo>
An array of FieldInfo that defines how fields in the dataset or values from Arcade expressions participate in a popup.
content
System.Collections.Generic.IReadOnlyList<PopupContent>
Pass advanced PopupContent parameters
expressionInfos
System.Collections.Generic.IReadOnlyList<PopupExpressionInfo>
An array of objects or ExpressionInfo[] that reference Arcade expressions following the specification defined by the Arcade Popup Profile.
overwriteActions
System.Nullable<System.Boolean>
Indicates whether actions should replace existing popup actions.
returnGeometry
System.Nullable<System.Boolean>
Indicates whether to include the feature’s geometry for use by the template.
actions
System.Collections.Generic.IReadOnlyList<ActionBase>
Defines actions that may be executed by clicking the icon or image symbolizing them in the popup
Properties
PopupTemplate.Actions Property
A Collection of action or action toggle objects.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ActionBase>? Actions { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<ActionBase>
PopupTemplate.Content Property
The template for defining and formatting a popup’s content, provided as a collection of PopupContent s.
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Popups.PopupContent>? Content { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<PopupContent>
Remarks
Either Content or StringContent should be defined, but not both.
PopupTemplate.ContentFunction Property
Defines a delegate function which will generate the PopupContents for the template.
public System.Func<dymaptic.GeoBlazor.Core.Components.Graphic,System.Threading.Tasks.ValueTask<dymaptic.GeoBlazor.Core.Components.Popups.PopupContent[]?>>? ContentFunction { get; set; }
Property Value
System.Func<Graphic,System.Threading.Tasks.ValueTask<PopupContent[]>>
PopupTemplate.ExpressionInfos Property
An array of objects or ExpressionInfo[] that reference
Arcade expressions following
the specification defined by the Arcade Popup Profile.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Popups.PopupExpressionInfo>? ExpressionInfos { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<PopupExpressionInfo>
PopupTemplate.FieldInfos Property
An array of FieldInfo that defines how fields in the dataset
or values from Arcade expressions participate
in a popup.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FieldInfo>? FieldInfos { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<FieldInfo>
PopupTemplate.HasContentFunction Property
Identifies that the ContentFunction is defined.
public bool HasContentFunction { get; }
Property Value
PopupTemplate.LastEditInfoEnabled Property
Indicates whether or not editor tracking should display.
default true
ArcGIS Maps SDK for JavaScript
public System.Nullable<bool> LastEditInfoEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
PopupTemplate.LayerOptions Property
Additional options that can be defined for the popup layer.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.LayerOptions? LayerOptions { get; set; }
Property Value
PopupTemplate.OnTriggerAction Property
Event Listener for TriggerAction.
public Microsoft.AspNetCore.Components.EventCallback<dymaptic.GeoBlazor.Core.Events.PopupTriggerActionEvent> OnTriggerAction { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<PopupTriggerActionEvent>
PopupTemplate.OutFields Property
An array of field names used in the PopupTemplate.
default null
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<string>? OutFields { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<System.String>
PopupTemplate.OverwriteActions Property
Indicates whether actions should replace existing popup actions.
public System.Nullable<bool> OverwriteActions { get; set; }
Property Value
System.Nullable<System.Boolean>
PopupTemplate.ReturnGeometry Property
Indicates whether to include the feature’s geometry for use by the template. This property should be set to true if needing to access the popup’s selected feature’s geometry. Access the geometry via the returned graphic from the popup’s selectedFeatureWidget. This is needed since the geometry is not automatically queried and returned in the popup’s selected feature.
If the feature layer does not specify its outFields and the template’s outFields isn’t set, the returned popup’s
geometry is only returned if returnGeometry is set to true. This also applies when working with WebMaps.
public System.Nullable<bool> ReturnGeometry { get; set; }
Property Value
System.Nullable<System.Boolean>
PopupTemplate.StringContent Property
The template for defining and formatting a popup’s content, provided as a simple string.
public string? StringContent { get; set; }
Property Value
Remarks
Either Content or StringContent should be defined, but not both.
PopupTemplate.StringTitle Property
The template for defining how to format the title used in a popup.
ArcGIS Maps SDK for JavaScript
public string? StringTitle { get; set; }
Property Value
PopupTemplate.TaskCollectionTitle Property
The template for defining how to format the title used in a popup.
ArcGIS Maps SDK for JavaScript
public System.Func<System.Threading.Tasks.Task>? TaskCollectionTitle { get; set; }
Property Value
System.Func<System.Threading.Tasks.Task>
PopupTemplate.Title Property
The template for defining how to format the title used in a popup.
public string? Title { get; set; }
Property Value
Methods
PopupTemplate.AddToActions(ActionBase[]) Method
Asynchronously adds elements to the Actions property.
public System.Threading.Tasks.Task AddToActions(params dymaptic.GeoBlazor.Core.Components.ActionBase[] values);
Parameters
values
ActionBase[]
The elements to add.
Returns
PopupTemplate.AddToExpressionInfos(PopupExpressionInfo[]) Method
Asynchronously adds elements to the ExpressionInfos property.
public System.Threading.Tasks.Task AddToExpressionInfos(params dymaptic.GeoBlazor.Core.Components.Popups.PopupExpressionInfo[] values);
Parameters
values
PopupExpressionInfo[]
The elements to add.
Returns
PopupTemplate.AddToFieldInfos(FieldInfo[]) Method
Asynchronously adds elements to the FieldInfos property.
public System.Threading.Tasks.Task AddToFieldInfos(params dymaptic.GeoBlazor.Core.Components.FieldInfo[] values);
Parameters
The elements to add.
Returns
PopupTemplate.AddToOutFields(string[]) Method
Asynchronously adds elements to the OutFields property.
public System.Threading.Tasks.Task AddToOutFields(params string[] values);
Parameters
values
System.String[]
The elements to add.
Returns
PopupTemplate.GetActions() Method
Asynchronously retrieve the current value of the Actions property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ActionBase>?> GetActions();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<ActionBase>>
PopupTemplate.GetExpressionInfos() Method
Asynchronously retrieve the current value of the ExpressionInfos property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Popups.PopupExpressionInfo>?> GetExpressionInfos();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<PopupExpressionInfo>>
PopupTemplate.GetFieldInfos() Method
Asynchronously retrieve the current value of the FieldInfos property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FieldInfo>?> GetFieldInfos();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<FieldInfo>>
PopupTemplate.GetLastEditInfoEnabled() Method
Asynchronously retrieve the current value of the LastEditInfoEnabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetLastEditInfoEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
PopupTemplate.GetLayerOptions() Method
Asynchronously retrieve the current value of the LayerOptions property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.LayerOptions?> GetLayerOptions();
Returns
System.Threading.Tasks.Task<LayerOptions>
PopupTemplate.GetOutFields() Method
Asynchronously retrieve the current value of the OutFields property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>?> GetOutFields();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>
PopupTemplate.GetOverwriteActions() Method
Asynchronously retrieve the current value of the OverwriteActions property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetOverwriteActions();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
PopupTemplate.GetReturnGeometry() Method
Asynchronously retrieve the current value of the ReturnGeometry property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetReturnGeometry();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
PopupTemplate.GetStringTitle() Method
Asynchronously retrieve the current value of the StringTitle property.
public System.Threading.Tasks.Task<string?> GetStringTitle();
Returns
System.Threading.Tasks.Task<System.String>
PopupTemplate.GetTaskCollectionTitle() Method
Asynchronously retrieve the current value of the TaskCollectionTitle property.
public System.Threading.Tasks.Task<System.Func<System.Threading.Tasks.Task>?> GetTaskCollectionTitle();
Returns
System.Threading.Tasks.Task<System.Func<System.Threading.Tasks.Task>>
PopupTemplate.OnJsContentFunction(Graphic) Method
JS-invokable method that triggers a custom ContentFunction for building the popup content.
Should not be called by consuming code.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Popups.PopupContent[]?> OnJsContentFunction(dymaptic.GeoBlazor.Core.Components.Graphic graphic);
Parameters
graphic
Graphic
Returns
System.Threading.Tasks.Task<PopupContent[]>
PopupTemplate.OnJsTriggerAction(PopupTriggerActionEvent) Method
JS-invokable method for triggering actions.
public System.Threading.Tasks.Task OnJsTriggerAction(dymaptic.GeoBlazor.Core.Events.PopupTriggerActionEvent triggerActionEvent);
Parameters
triggerActionEvent
PopupTriggerActionEvent
The event that contains the action to be triggered.
Returns
PopupTemplate.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with its parent.
public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The calling, child component to register
Returns
Exceptions
InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.
PopupTemplate.RemoveFromActions(ActionBase[]) Method
Asynchronously remove an element from the Actions property.
public System.Threading.Tasks.Task RemoveFromActions(params dymaptic.GeoBlazor.Core.Components.ActionBase[] values);
Parameters
values
ActionBase[]
The elements to remove.
Returns
PopupTemplate.RemoveFromExpressionInfos(PopupExpressionInfo[]) Method
Asynchronously remove an element from the ExpressionInfos property.
public System.Threading.Tasks.Task RemoveFromExpressionInfos(params dymaptic.GeoBlazor.Core.Components.Popups.PopupExpressionInfo[] values);
Parameters
values
PopupExpressionInfo[]
The elements to remove.
Returns
PopupTemplate.RemoveFromFieldInfos(FieldInfo[]) Method
Asynchronously remove an element from the FieldInfos property.
public System.Threading.Tasks.Task RemoveFromFieldInfos(params dymaptic.GeoBlazor.Core.Components.FieldInfo[] values);
Parameters
The elements to remove.
Returns
PopupTemplate.RemoveFromOutFields(string[]) Method
Asynchronously remove an element from the OutFields property.
public System.Threading.Tasks.Task RemoveFromOutFields(params string[] values);
Parameters
values
System.String[]
The elements to remove.
Returns
PopupTemplate.SetActions(IReadOnlyList) Method
Asynchronously set the value of the Actions property after render.
public System.Threading.Tasks.Task SetActions(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ActionBase>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<ActionBase>
The value to set.
Returns
PopupTemplate.SetExpressionInfos(IReadOnlyList) Method
Asynchronously set the value of the ExpressionInfos property after render.
public System.Threading.Tasks.Task SetExpressionInfos(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Popups.PopupExpressionInfo>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<PopupExpressionInfo>
The value to set.
Returns
PopupTemplate.SetFieldInfos(IReadOnlyList) Method
Asynchronously set the value of the FieldInfos property after render.
public System.Threading.Tasks.Task SetFieldInfos(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.FieldInfo>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<FieldInfo>
The value to set.
Returns
PopupTemplate.SetLastEditInfoEnabled(Nullable) Method
Asynchronously set the value of the LastEditInfoEnabled property after render.
public System.Threading.Tasks.Task SetLastEditInfoEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
PopupTemplate.SetLayerOptions(LayerOptions) Method
Asynchronously set the value of the LayerOptions property after render.
public System.Threading.Tasks.Task SetLayerOptions(dymaptic.GeoBlazor.Core.Components.LayerOptions? value);
Parameters
value
LayerOptions
The value to set.
Returns
PopupTemplate.SetOutFields(IReadOnlyList) Method
Asynchronously set the value of the OutFields property after render.
public System.Threading.Tasks.Task SetOutFields(System.Collections.Generic.IReadOnlyList<string>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<System.String>
The value to set.
Returns
PopupTemplate.SetOverwriteActions(Nullable) Method
Asynchronously set the value of the OverwriteActions property after render.
public System.Threading.Tasks.Task SetOverwriteActions(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
PopupTemplate.SetReturnGeometry(Nullable) Method
Asynchronously set the value of the ReturnGeometry property after render.
public System.Threading.Tasks.Task SetReturnGeometry(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
PopupTemplate.SetStringTitle(string) Method
Asynchronously set the value of the StringTitle property after render.
public System.Threading.Tasks.Task SetStringTitle(string? value);
Parameters
value
System.String
The value to set.
Returns
PopupTemplate.SetTaskCollectionTitle(Func) Method
Asynchronously set the value of the TaskCollectionTitle property after render.
public System.Threading.Tasks.Task SetTaskCollectionTitle(System.Func<System.Threading.Tasks.Task>? value);
Parameters
value
System.Func<System.Threading.Tasks.Task>
The value to set.
Returns
PopupTemplate.UnregisterChildComponent(MapComponent) Method
Undoes the “Registration” of a child with its parent.
public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The child to unregister
Returns
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.
PopupTemplate.ValidateRequiredChildren() Method
When a MapView is prepared to render, this will check to make sure that all properties with the RequiredPropertyAttribute are provided.
public override void ValidateRequiredChildren();
Implements ValidateRequiredChildren()
Exceptions
MissingRequiredChildElementException
The consumer needs to provide the missing child component
MissingRequiredOptionsChildElementException
The consumer needs to provide ONE of the options of child components
PopupTemplate.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()