I'm using arcGIS SceneView
in local viewing mode to display a WebMap
. I'm trying to constrain the zoom level and bounds of an area so that the user can only see the US, Hawaii, and Alaska and cannot pan outside of this. I also need to constrain the zoom level because if the user zooms out too far the over-zoom the map and see untiled/unmapped space.
Are there any potential solves for this? I first thought that using the constraints
property might solve it, but it appears the properties that can be fed to this are quite limited:
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#constraints
One way to achieve what I think you want is:
Take a look a the example I made for you. In it, I wait for the view to stop updating (
updating
property), then I check the constraints. If it is out of scale or out of the extent I reset the view. You probably want another action, I just made it simple.