Select to view content in your preferred language

Allow Over Zoom in Map View

1444
1
Jump to solution
05-28-2021 03:00 AM
AJasper
Emerging Contributor

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
Emerging Contributor

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
Emerging Contributor

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 */
      },
    });