Allow Over Zoom in Map View

463
1
Jump to solution
05-28-2021 03:00 AM
AJasper
New Contributor II

ArcGIS JavaScript API v4.19

I am trying to allow over zoom on my map but it is not working. Here is my code:

    const view = new MapView({
      container,
      map: this.map,
      constraints: {
        maxScale: 0,
      },
    });
 
According to the documentation, this should work - https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints. Setting maxScale to 0 should allow over zoom but it's not working. Can anyone help please?
Tags (2)
1 Solution

Accepted Solutions
AJasper
New Contributor II

I managed to solve this myself with the following code:

    const view = new MapView({
      container,
      map,
      constraints: {
        maxScale: 0,
        lods: TileInfo.create().lods, /* This was the missing part */
      },
    });

View solution in original post

1 Reply
AJasper
New Contributor II

I managed to solve this myself with the following code:

    const view = new MapView({
      container,
      map,
      constraints: {
        maxScale: 0,
        lods: TileInfo.create().lods, /* This was the missing part */
      },
    });