# Class MapConstraints

Settings that pertain to map constraints.

#### Hierarchy (view full)

- Settings<MapConstraintsProperties>
  - MapConstraints

#####
Index

### Constructors

constructor

### Properties

@eventTypes

### Accessors

maxScale
minScale
parent
rotationEnabled
snapToZoom
viewSync

### Methods

_getCollectionSetting
_getNestedSettings
_getSerializableProperties
_getSetting
_hasSettingIncludingAncestor
_setParent
_setSetting
_toPropertyDef
assignProperties
assignPropertiesAsync
finishAssignProperties
getDefault
getDefaults
getSerializableProperties
isModified
reset
toJSON

##
Constructors

### constructor

- new MapConstraints(_properties?): MapConstraints

- #### Parameters

  - `Optional`_properties: unknown

  #### Returns MapConstraints

  Inherited from Settings.constructor

##
Properties

### @eventTypes

@eventTypes: SettingsEvents<MapConstraints>

#### Deprecated

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

Inherited from Settings.@eventTypes

##
Accessors

### maxScale

- get maxScale(): number

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

  #### Returns number

- set maxScale(value): void

- #### Parameters

  - value: number

  #### Returns void

### minScale

- get minScale(): number

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

  #### Returns number

- set minScale(value): void

- #### Parameters

  - value: number

  #### Returns void

### parent

- get parent(): this

- The parent settings that these settings will inherit from.

  #### Returns this

  Inherited from Settings.parent

- set parent(value): void

- #### Parameters

  - value: this

  #### Returns void

  Inherited from Settings.parent

### rotationEnabled

- get rotationEnabled(): boolean

- Indicates whether the user can rotate the map. The default is true.

  #### Returns boolean

- set rotationEnabled(value): void

- #### Parameters

  - value: boolean

  #### Returns void

### snapToZoom

- get snapToZoom(): boolean

- When true, the view snaps to the next LOD when zooming in or out. When false, the zoom is continuous. The default is false.

  #### Returns boolean

- set snapToZoom(value): void

- #### Parameters

  - value: boolean

  #### Returns void

### viewSync

- get viewSync(): ViewSyncConstraints

- Properties on the view that get constrained when it is synchronized with another map.

  #### Returns ViewSyncConstraints

- set viewSync(value): void

- #### Parameters

  - value: ViewSyncConstraints

  #### Returns void

##
Methods

### `Protected`_getCollectionSetting

- _getCollectionSetting<T>(setting): Collection<T>

- Gets the value for a setting that represents a collection.

  #### Type Parameters

  - T

  #### Parameters

  - setting: keyof MapConstraints

    The setting name.

  #### Returns Collection<T>

  Inherited from Settings._getCollectionSetting

### `Protected`_getNestedSettings

- _getNestedSettings<T>(setting, factory): T

- Gets a property which is itself an instance of Settings.

  #### Type Parameters

  - T extends Settings<unknown>

  #### Parameters

  - setting: keyof MapConstraints

    The setting name.

  - factory: (() => T)

    A factory for creating the nested settings.

    - - (): T

      - #### Returns T

  Inherited from Settings._getNestedSettings

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<MapConstraintsProperties>

- The property keys and their metadata that are used to implement serializing and deserializing the class instance.

  #### Returns PropertyDefs<MapConstraintsProperties>

  Overrides Settings._getSerializableProperties

### `Protected`_getSetting

- _getSetting<K>(setting, defaultValue?): MapConstraints[K]

- Gets the value for a setting.

  #### Type Parameters

  - K extends keyof MapConstraints

  #### Parameters

  - setting: K

    The setting name.

  - `Optional` defaultValue: MapConstraints[K]

    The default value if the setting is not explicitly set.

  #### Returns MapConstraints[K]

  Inherited from Settings._getSetting

### `Protected`_hasSettingIncludingAncestor

- _hasSettingIncludingAncestor<K>(setting): boolean

- Determines whether the specified setting has been modified locally or by any parent of the current settings instance.

  #### Type Parameters

  - K extends keyof MapConstraints

  #### Parameters

  - setting: K

    The setting to check.

  #### Returns boolean

  Inherited from Settings._hasSettingIncludingAncestor

### `Protected`_setParent

- _setParent(parent): void

- Sets the parent settings that these settings will inherit from.

  #### Parameters

  - parent: MapConstraints

    The parent settings to inherit from.

  #### Returns void

  Inherited from Settings._setParent

### `Protected`_setSetting

- _setSetting<K>(setting, value): void

- Sets the value for a setting. This will override any inherited value for the setting.

  #### Type Parameters

  - K extends keyof MapConstraints

  #### Parameters

  - setting: K

    The setting name.

  - value: MapConstraints[K]

    The setting value.

  #### Returns void

  Inherited from Settings._setSetting

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from Settings._toPropertyDef

### assignProperties

- assignProperties(properties): void

- #### Parameters

  - properties: Partial<unknown>

  #### Returns void

  #### Inherit Doc

  Inherited from Settings.assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- #### Parameters

  - properties: Partial<unknown>

  #### Returns Promise<void>

  #### Inherit Doc

  Inherited from Settings.assignPropertiesAsync

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- #### Returns Promise<void>

  #### Inherit Doc

  Inherited from Settings.finishAssignProperties

### getDefault

- getDefault<K>(key): unknown

- #### Type Parameters

  - K extends never

  #### Parameters

  - key: K

  #### Returns unknown

  #### Inherit Doc

  Inherited from Settings.getDefault

### getDefaults

- getDefaults(): MapConstraintsProperties

- #### Returns MapConstraintsProperties

  #### Inherit Doc

  Inherited from Settings.getDefaults

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<unknown>

- Returns the serializable properties.

  #### Parameters

  - serializeMode: SerializeMode = "all"

    Optional. If specified, only properties that support the given serialization mode will be returned.

  #### Returns PropertyDefs<unknown>

  Inherited from Settings.getSerializableProperties

### isModified

- isModified(): boolean

- Determines whether the settings have been locally modified in any way.

  #### Returns boolean

  Inherited from Settings.isModified

- isModified(setting): boolean

- Determines whether the specified setting has been locally modified, and is thus overriding any inherited value.

  #### Parameters

  - setting: keyof MapConstraints

    The setting to check.

  #### Returns boolean

  Inherited from Settings.isModified

### reset

- reset(): void

- Removes all local overrides, resetting all settings to their inherited values, if any.

  #### Returns void

  Inherited from Settings.reset

- reset(setting): void

- Removes a local override for a setting and resets it to its inherited value, if any.

  #### Parameters

  - setting: keyof MapConstraints

    The setting to reset.

  #### Returns void

  Inherited from Settings.reset

### toJSON

- toJSON(serializeMode?): MapConstraintsProperties

- #### Parameters

  - serializeMode: SerializeMode = "all"

  #### Returns MapConstraintsProperties

  #### Inherit Doc

  Overrides Settings.toJSON