Skip to main content Link Menu Expand (external link) Document Search Copy Copied

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components

Constraints Class

Specifies constraints to scale, zoom, and rotation that may be applied to the MapView. The constraints.lods should
be set in the MapView constructor, if the map does not have a basemap or when the basemap does not have tileInfo.

ArcGIS
  
JS API

</a>

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

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

Properties

Constraints.Geometry Property

The area in which the user is allowed to navigate laterally. Only Extent and Polygon geometry types are supported.
Z-values are ignored.

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

Property Value

Geometry

Constraints.Lods Property

An array of LODs. If not specified, this value is read from the Map.

public System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Components.LOD>? Lods { get; set; }

Property Value

System.Collections.Generic.List<LOD>

Constraints.MaxScale Property

The maximum scale the user is allowed to zoom to within the view. Setting this value to 0 allows the user to
overzoom layer tiles.

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

Property Value

System.Nullable<System.Double>

Constraints.MaxZoom Property

The maximum zoom level the user is allowed to zoom to within the view. Setting this value to 0 allows the user to
over-zoom layer tiles.

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

Property Value

System.Nullable<System.Double>

Constraints.MinScale Property

The minimum scale the user is allowed to zoom to within the view.

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

Property Value

System.Nullable<System.Double>

Constraints.MinZoom Property

The minimum zoom level the user is allowed to zoom to within the view.

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

Property Value

System.Nullable<System.Double>

Constraints.RotationEnabled Property

Indicates whether the user can rotate the map. If not set, defaults to true.

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

Property Value

System.Nullable<System.Boolean>

Constraints.SnapToZoom Property

When true, the view snaps to the next LOD when zooming in or out. When false, the zoom is continuous. This does not
apply when zooming in/out using two finger pinch in/out.

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

Property Value

System.Nullable<System.Boolean>

Methods

Constraints.RegisterChildComponent(MapComponent) Method

Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnAfterRenderAsync(System.Boolean) to “Register” the current component with it’s parent.

public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The calling, child component to register

Returns

System.Threading.Tasks.Task

Exceptions

InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.

Constraints.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

System.Threading.Tasks.Task

Constraints.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();

Exceptions

MissingRequiredChildElementException
The consumer needs to provide the missing child component

MissingRequiredOptionsChildElementException
The consumer needs to provide ONE of the options of child components