Hi all,
I'm creating a map application using the ArcGIS API for JS v4.18. I'm running into an issue where I can't add custom visible scales as in the Web AppBuilder.
It goes now to maxZoom 22 and I would add 3 more scales so I can go to maxZoom 25, as I have done in the Web AppBuilder. I tried increasing the maxZoom, but it didn't work out. I'm using the OSM basemap by Esri.
Is there a way to set custom scales/zoomlevels? And if so, how could I do that?
Thanks for any help!
Yes. However, this is in the web AppBuilder where i can add more scales. So i was wondering how i could do the same with the JS 4x API.
Have you looked here:
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#stationary
view.constraints = {
geometry: { // Constrain lateral movement to Lower Manhattan
type: "extent",
xmin: -74.020,
ymin: 40.700,
xmax: -73.971,
ymax: 40.73
},
minScale: 500000, // User cannot zoom out beyond a scale of 1:500,000
maxScale: 0, // User can overzoom tiles
rotationEnabled: false // Disables map rotation
};
The views constraints has a LODs property. See this thread.