layout: default title: Constraints parent: Core Classes —

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 Maps SDK for JavaScript

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

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.

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

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.