We're using the extent property of a MapView/SceneView for calculating which graphics to apply for a specific area. (Based on which graphics are in bound of extent x - calculated server sided ).
Default extent property (simple fill red opacity 0.4) - working as expected
When rotating a view the extent does not change (with a watch util on view.extent):
When tilting or rotating in a SceneView.. Same results
Does ArcGis provide a way to get the actual extent (view area).
codepen: https://codepen.io/michaelk95/pen/BaVBrxo
Thanks
It is actually giving the actual extent only.
inside the map, what ever the graphic3(based on extent) you are rendering,
it is giving the actual extent only.
Are you expecting the map's extent? I think it is infinite in all direction.
View is dynamic, as and when user moves on, it will change. as per the function.
As you can see in the last image (SceneView), the actual view area is larger than the view's extent. (visible extent and yes it changes when a user is navigating or zooming). But is there any way of getting the actual viewing area? (Given a rotated sceneview or mapview).
Can you zoom a bit and rotate? You'll get the same result
Thanks
Hi @MichaelK1
Thanks for reaching out! So this extent actually works as expected, it is defined as the minimum and maximum X and Y coordinates of a bounding box (see documentation of extent). So this is a bounding box which cannot be rotated.
This is a very simple implementation of the extent and does not represent the view area correctly as you mentioned. Unfortunately it is currently not possible to easily extract this information. As @JayakumarPD mentioned, this area can have quite complex geometry since it stretches to infinity as soon as you look to the horizon.
Maybe you could provide us with some description of the use case of why you need this functionality and we can try to find a solution.
Best, Daniel
Thanks @Anonymous User
Is there an alternative for calculating the area based on camera position/heading/tilt/view's extent? ArcGis has this functionality by default?
Thanks
Hi @MichaelK1
Unfortunatly we currently offer no out-of-the-box alternative to this rectangular extent. However we are considering this feature for future releases.
We will give an update in this thread when we know more.