dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components

BasemapGalleryViewModel Class

Provides the logic for the BasemapGallery widget and component.
ArcGIS Maps SDK for JavaScript

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

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 BasemapGalleryViewModel

Constructors

BasemapGalleryViewModel() Constructor

Parameterless constructor for use as a Razor Component.

public BasemapGalleryViewModel();

BasemapGalleryViewModel(Basemap, IBasemapGalleryWidgetSource) Constructor

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

public BasemapGalleryViewModel(dymaptic.GeoBlazor.Core.Components.Basemap? activeBasemap=null, dymaptic.GeoBlazor.Core.Interfaces.IBasemapGalleryWidgetSource? source=null);

Parameters

activeBasemap Basemap

The map’s basemap.
ArcGIS Maps SDK for JavaScript

source IBasemapGalleryWidgetSource

The source for basemaps that the Basemap Gallery will display.
ArcGIS Maps SDK for JavaScript

Properties

BasemapGalleryViewModel.ActiveBasemap Property

The map’s basemap.
ArcGIS Maps SDK for JavaScript

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

Property Value

Basemap

BasemapGalleryViewModel.ActiveBasemapIndex Property

The current index of the active basemap
in the BasemapGallery.
ArcGIS Maps SDK for JavaScript

public System.Nullable<int> ActiveBasemapIndex { get; set; }

Property Value

System.Nullable<System.Int32>

BasemapGalleryViewModel.Items Property

A collection of BasemapGalleryItems representing basemaps.
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.BasemapGalleryItem>? Items { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<BasemapGalleryItem>

BasemapGalleryViewModel.Source Property

The source for basemaps that the Basemap Gallery will display.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Interfaces.IBasemapGalleryWidgetSource? Source { get; set; }

Property Value

IBasemapGalleryWidgetSource

BasemapGalleryViewModel.State Property

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

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.BasemapGalleryViewModelState> State { get; set; }

Property Value

System.Nullable<BasemapGalleryViewModelState>

Methods

BasemapGalleryViewModel.BasemapEquals(Basemap, Basemap) Method

A convenience function to check basemap equality.
param basemap2 The basemap to compare against basemap1.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<System.Nullable<bool>> BasemapEquals(dymaptic.GeoBlazor.Core.Components.Basemap basemap1, dymaptic.GeoBlazor.Core.Components.Basemap basemap2);

Parameters

basemap1 Basemap

The basemap to compare against basemap2.

basemap2 Basemap

The basemap to compare against

basemap1  
```.

#### Returns
[System.Threading.Tasks.Task&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')[System.Nullable&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Threading.Tasks.Task-1 'System.Threading.Tasks.Task`1')

<a name='dymaptic.GeoBlazor.Core.Components.BasemapGalleryViewModel.GetActiveBasemap()'></a>

## BasemapGalleryViewModel.GetActiveBasemap() Method

Asynchronously retrieve the current value of the ActiveBasemap property.

```csharp
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Basemap?> GetActiveBasemap();

Returns

System.Threading.Tasks.Task<Basemap>

BasemapGalleryViewModel.GetActiveBasemapIndex() Method

Asynchronously retrieve the current value of the ActiveBasemapIndex property.

public System.Threading.Tasks.Task<System.Nullable<int>> GetActiveBasemapIndex();

Returns

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

BasemapGalleryViewModel.GetItems() Method

Asynchronously retrieve the current value of the Items property.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.BasemapGalleryItem>?> GetItems();

Returns

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

BasemapGalleryViewModel.GetSource() Method

Asynchronously retrieve the current value of the Source property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IBasemapGalleryWidgetSource?> GetSource();

Returns

System.Threading.Tasks.Task<IBasemapGalleryWidgetSource>

BasemapGalleryViewModel.GetState() Method

Asynchronously retrieve the current value of the State property.

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

Returns

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

BasemapGalleryViewModel.SetActiveBasemap(Basemap) Method

Asynchronously set the value of the ActiveBasemap property after render.

public System.Threading.Tasks.Task SetActiveBasemap(dymaptic.GeoBlazor.Core.Components.Basemap? value);

Parameters

value Basemap

The value to set.

Returns

System.Threading.Tasks.Task

BasemapGalleryViewModel.SetSource(IBasemapGalleryWidgetSource) Method

Asynchronously set the value of the Source property after render.

public System.Threading.Tasks.Task SetSource(dymaptic.GeoBlazor.Core.Interfaces.IBasemapGalleryWidgetSource? value);

Parameters

value IBasemapGalleryWidgetSource

The value to set.

Returns

System.Threading.Tasks.Task

BasemapGalleryViewModel.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()