GeoBlazor Pro

dymaptic.GeoBlazor.Pro

dymaptic.GeoBlazor.Pro.Components

PrintViewModel Class

Provides the logic for the Print widget.
ArcGIS Maps SDK for JavaScript

public class PrintViewModel : dymaptic.GeoBlazor.Core.Components.MapComponent

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 PrintViewModel

Constructors

PrintViewModel() Constructor

Parameterless constructor for use as a Razor Component.

public PrintViewModel();

PrintViewModel(string, Nullable, Portal, string, Nullable, Nullable, string, string, IReadOnlyList, IReadOnlyList, Dictionary<string,Dictionary<string,string>>, Nullable) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public PrintViewModel(string? extraParameters=null, System.Nullable<bool> includeDefaultTemplates=null, dymaptic.GeoBlazor.Core.Components.Portal? portal=null, string? printServiceUrl=null, System.Nullable<double> printTimeout=null, System.Nullable<bool> showPrintAreaEnabled=null, string? stringAllowedFormats=null, string? stringAllowedLayouts=null, System.Collections.Generic.IReadOnlyList<string>? stringCollectionAllowedFormats=null, System.Collections.Generic.IReadOnlyList<string>? stringCollectionAllowedLayouts=null, System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,string?>?>? templateCustomTextElements=null, System.Nullable<double> updateDelay=null);

Parameters

extraParameters System.String

This option allows passing extra parameters to the print (export webmap) requests.
ArcGIS Maps SDK for JavaScript

includeDefaultTemplates System.Nullable<System.Boolean>

Indicates whether or not to include defaultTemplates.
default true
ArcGIS Maps SDK for JavaScript

portal dymaptic.GeoBlazor.Core.Components.Portal

It is possible to search a specified portal instance’s locator services.
ArcGIS Maps SDK for JavaScript

printServiceUrl System.String

The URL of the REST endpoint of the Export Web Map Task.
ArcGIS Maps SDK for JavaScript

printTimeout System.Nullable<System.Double>

Print timeout value in milliseconds.
default 120000
ArcGIS Maps SDK for JavaScript

showPrintAreaEnabled System.Nullable<System.Boolean>

The initial state of the print area toggle in the Print widget UI.
default false
ArcGIS Maps SDK for JavaScript

stringAllowedFormats System.String

Specify the print output file format(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

stringAllowedLayouts System.String

Specify the print output layout(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

stringCollectionAllowedFormats System.Collections.Generic.IReadOnlyList<System.String>

Specify the print output file format(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

stringCollectionAllowedLayouts System.Collections.Generic.IReadOnlyList<System.String>

Specify the print output layout(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

templateCustomTextElements System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.String>>

An object containing an array of customTextElements name-value pair objects
for each print template in a custom print service.
ArcGIS Maps SDK for JavaScript

updateDelay System.Nullable<System.Double>

The time interval in milliseconds between each job status request sent to an asynchronous GP task.
default 1000
ArcGIS Maps SDK for JavaScript

Properties

PrintViewModel.DefaultTemplates Property

A collection of print templates defined on the Portal.
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Model.CustomTemplate>? DefaultTemplates { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<CustomTemplate>

PrintViewModel.EffectivePrintServiceUrl Property

The effective URL of the REST endpoint of the Export Web Map Task.
ArcGIS Maps SDK for JavaScript

public string? EffectivePrintServiceUrl { get; set; }

Property Value

System.String

PrintViewModel.EffectiveTemplateCustomTextElements Property

Returns an array of objects of all print templates available on the custom print
service to see which templates were published with customTextElements.
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,string?>?>? EffectiveTemplateCustomTextElements { get; set; }

Property Value

System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.String>>

PrintViewModel.ExtraParameters Property

This option allows passing extra parameters to the print (export webmap) requests.
ArcGIS Maps SDK for JavaScript

public string? ExtraParameters { get; set; }

Property Value

System.String

PrintViewModel.IncludeDefaultTemplates Property

Indicates whether or not to include defaultTemplates.
default true
ArcGIS Maps SDK for JavaScript

public System.Nullable<bool> IncludeDefaultTemplates { get; set; }

Property Value

System.Nullable<System.Boolean>

PrintViewModel.Portal Property

It is possible to search a specified portal instance’s locator services.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Components.Portal? Portal { get; set; }

Property Value

dymaptic.GeoBlazor.Core.Components.Portal

PrintViewModel.PrintServiceUrl Property

The URL of the REST endpoint of the Export Web Map Task.
ArcGIS Maps SDK for JavaScript

public string? PrintServiceUrl { get; set; }

Property Value

System.String

PrintViewModel.PrintTimeout Property

Print timeout value in milliseconds.
default 120000
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> PrintTimeout { get; set; }

Property Value

System.Nullable<System.Double>

PrintViewModel.ShowPrintAreaEnabled Property

The initial state of the print area toggle in the Print widget UI.
default false
ArcGIS Maps SDK for JavaScript

public System.Nullable<bool> ShowPrintAreaEnabled { get; set; }

Property Value

System.Nullable<System.Boolean>

PrintViewModel.State Property

The view model’s state.
default “disabled”
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Pro.Enums.PrintViewModelState> State { get; set; }

Property Value

System.Nullable<PrintViewModelState>

PrintViewModel.StringAllowedFormats Property

Specify the print output file format(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

public string? StringAllowedFormats { get; set; }

Property Value

System.String

PrintViewModel.StringAllowedLayouts Property

Specify the print output layout(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

public string? StringAllowedLayouts { get; set; }

Property Value

System.String

PrintViewModel.StringCollectionAllowedFormats Property

Specify the print output file format(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.IReadOnlyList<string>? StringCollectionAllowedFormats { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<System.String>

PrintViewModel.StringCollectionAllowedLayouts Property

Specify the print output layout(s) that the user can select based on the options available from the print service.
default “all”
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.IReadOnlyList<string>? StringCollectionAllowedLayouts { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<System.String>

PrintViewModel.TemplateCustomTextElements Property

An object containing an array of customTextElements name-value pair objects
for each print template in a custom print service.
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,string?>?>? TemplateCustomTextElements { get; set; }

Property Value

System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.String>>

PrintViewModel.TemplatesInfo Property

The service metadata that contains the format
and layout information for the printout.
ArcGIS Maps SDK for JavaScript

public string? TemplatesInfo { get; set; }

Property Value

System.String

PrintViewModel.UpdateDelay Property

The time interval in milliseconds between each job status request sent to an asynchronous GP task.
default 1000
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> UpdateDelay { get; set; }

Property Value

System.Nullable<System.Double>

Methods

PrintViewModel.GetDefaultTemplates() Method

Asynchronously retrieve the current value of the DefaultTemplates property.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Model.CustomTemplate>?> GetDefaultTemplates();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<CustomTemplate>>

PrintViewModel.GetEffectivePrintServiceUrl() Method

Asynchronously retrieve the current value of the EffectivePrintServiceUrl property.

public System.Threading.Tasks.Task<string?> GetEffectivePrintServiceUrl();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.GetEffectiveTemplateCustomTextElements() Method

Asynchronously retrieve the current value of the EffectiveTemplateCustomTextElements property.

public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,string?>?>?> GetEffectiveTemplateCustomTextElements();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.String>>>

PrintViewModel.GetExtraParameters() Method

Asynchronously retrieve the current value of the ExtraParameters property.

public System.Threading.Tasks.Task<string?> GetExtraParameters();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.GetIncludeDefaultTemplates() Method

Asynchronously retrieve the current value of the IncludeDefaultTemplates property.

public System.Threading.Tasks.Task<System.Nullable<bool>> GetIncludeDefaultTemplates();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Boolean>>

PrintViewModel.GetLayoutTemplateById(string) Method

Returns a CustomTemplate with the specified id.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Model.CustomTemplate?> GetLayoutTemplateById(string id);

Parameters

id System.String

The id of the CustomTemplate.

Returns

System.Threading.Tasks.Task<CustomTemplate>

PrintViewModel.GetPortal() Method

Asynchronously retrieve the current value of the Portal property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Portal?> GetPortal();

Returns

System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Portal>

PrintViewModel.GetPrintServiceUrl() Method

Asynchronously retrieve the current value of the PrintServiceUrl property.

public System.Threading.Tasks.Task<string?> GetPrintServiceUrl();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.GetPrintTimeout() Method

Asynchronously retrieve the current value of the PrintTimeout property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetPrintTimeout();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

PrintViewModel.GetShowPrintAreaEnabled() Method

Asynchronously retrieve the current value of the ShowPrintAreaEnabled property.

public System.Threading.Tasks.Task<System.Nullable<bool>> GetShowPrintAreaEnabled();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Boolean>>

PrintViewModel.GetState() Method

Asynchronously retrieve the current value of the State property.

public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Pro.Enums.PrintViewModelState>> GetState();

Returns

System.Threading.Tasks.Task<System.Nullable<PrintViewModelState>>

PrintViewModel.GetStringAllowedFormats() Method

Asynchronously retrieve the current value of the StringAllowedFormats property.

public System.Threading.Tasks.Task<string?> GetStringAllowedFormats();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.GetStringAllowedLayouts() Method

Asynchronously retrieve the current value of the StringAllowedLayouts property.

public System.Threading.Tasks.Task<string?> GetStringAllowedLayouts();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.GetStringCollectionAllowedFormats() Method

Asynchronously retrieve the current value of the StringCollectionAllowedFormats property.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>?> GetStringCollectionAllowedFormats();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>

PrintViewModel.GetStringCollectionAllowedLayouts() Method

Asynchronously retrieve the current value of the StringCollectionAllowedLayouts property.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>?> GetStringCollectionAllowedLayouts();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>

PrintViewModel.GetTemplateCustomTextElements() Method

Asynchronously retrieve the current value of the TemplateCustomTextElements property.

public System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,string?>?>?> GetTemplateCustomTextElements();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.String>>>

PrintViewModel.GetTemplatesInfo() Method

Asynchronously retrieve the current value of the TemplatesInfo property.

public System.Threading.Tasks.Task<string?> GetTemplatesInfo();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.GetUpdateDelay() Method

Asynchronously retrieve the current value of the UpdateDelay property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetUpdateDelay();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

PrintViewModel.Load() Method

This method should be called to load the view model’s printing resources.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<string?> Load();

Returns

System.Threading.Tasks.Task<System.String>

PrintViewModel.Print(PrintTemplate) Method

Prints (exports) the current MapView according to selected options.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Results.PrintResult?> Print(dymaptic.GeoBlazor.Pro.Components.PrintTemplate template);

Parameters

template PrintTemplate

The PrintTemplate is used to specify the layout template options which is then used by the PrintTask to generate the print page.

Returns

System.Threading.Tasks.Task<PrintResult>

PrintViewModel.SetExtraParameters(string) Method

Asynchronously set the value of the ExtraParameters property after render.

public System.Threading.Tasks.Task SetExtraParameters(string? value);

Parameters

value System.String

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetIncludeDefaultTemplates(Nullable) Method

Asynchronously set the value of the IncludeDefaultTemplates property after render.

public System.Threading.Tasks.Task SetIncludeDefaultTemplates(System.Nullable<bool> value);

Parameters

value System.Nullable<System.Boolean>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetPortal(Portal) Method

Asynchronously set the value of the Portal property after render.

public System.Threading.Tasks.Task SetPortal(dymaptic.GeoBlazor.Core.Components.Portal? value);

Parameters

value dymaptic.GeoBlazor.Core.Components.Portal

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetPrintServiceUrl(string) Method

Asynchronously set the value of the PrintServiceUrl property after render.

public System.Threading.Tasks.Task SetPrintServiceUrl(string? value);

Parameters

value System.String

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetPrintTimeout(Nullable) Method

Asynchronously set the value of the PrintTimeout property after render.

public System.Threading.Tasks.Task SetPrintTimeout(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetShowPrintAreaEnabled(Nullable) Method

Asynchronously set the value of the ShowPrintAreaEnabled property after render.

public System.Threading.Tasks.Task SetShowPrintAreaEnabled(System.Nullable<bool> value);

Parameters

value System.Nullable<System.Boolean>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetStringAllowedFormats(string) Method

Asynchronously set the value of the StringAllowedFormats property after render.

public System.Threading.Tasks.Task SetStringAllowedFormats(string? value);

Parameters

value System.String

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetStringAllowedLayouts(string) Method

Asynchronously set the value of the StringAllowedLayouts property after render.

public System.Threading.Tasks.Task SetStringAllowedLayouts(string? value);

Parameters

value System.String

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetStringCollectionAllowedFormats(IReadOnlyList) Method

Asynchronously set the value of the StringCollectionAllowedFormats property after render.

public System.Threading.Tasks.Task SetStringCollectionAllowedFormats(System.Collections.Generic.IReadOnlyList<string>? value);

Parameters

value System.Collections.Generic.IReadOnlyList<System.String>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetStringCollectionAllowedLayouts(IReadOnlyList) Method

Asynchronously set the value of the StringCollectionAllowedLayouts property after render.

public System.Threading.Tasks.Task SetStringCollectionAllowedLayouts(System.Collections.Generic.IReadOnlyList<string>? value);

Parameters

value System.Collections.Generic.IReadOnlyList<System.String>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetTemplateCustomTextElements(Dictionary<string,Dictionary<string,string») Method

Asynchronously set the value of the TemplateCustomTextElements property after render.

public System.Threading.Tasks.Task SetTemplateCustomTextElements(System.Collections.Generic.Dictionary<string,System.Collections.Generic.Dictionary<string,string?>?>? value);

Parameters

value System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.Dictionary<System.String,System.String>>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.SetUpdateDelay(Nullable) Method

Asynchronously set the value of the UpdateDelay property after render.

public System.Threading.Tasks.Task SetUpdateDelay(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

PrintViewModel.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()