Select to view content in your preferred language

EXTENT not correct when rotating or tilting

564
5
10-24-2022 01:50 AM
MichaelK1
New Contributor III

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 

default extent.png

When rotating a view the extent does not change (with a watch util on view.extent):  

extent when rotating.png

When tilting or rotating in a SceneView.. Same results

sceneview-extent.png

Does ArcGis provide a way to get the actual extent (view area).

codepen: https://codepen.io/michaelk95/pen/BaVBrxo

Thanks

0 Kudos
5 Replies
JayakumarPD
Occasional Contributor

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.

 

0 Kudos
MichaelK1
New Contributor III

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

extent.png

Thanks

0 Kudos
by Anonymous User
Not applicable

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

0 Kudos
MichaelK1
New Contributor III

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

0 Kudos
by Anonymous User
Not applicable

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. 

0 Kudos