Select to view content in your preferred language

Can We rotate the extent of polygon?

148
1
4 weeks ago
SaiPeketi
New Contributor III

Hi,

 

Is it possible to rotate the extent of the polygon based on the angle? I'm able to create a grid on the top of polygon but it's not coming properly with the grid boundaries. I can rotate the map view but the extent is always pick the north direction. So, it looks odd on the map. 

 

Here the Codepen example: https://codepen.io/Andy0206/pen/yLrpXjp

 

SaiPeketi_0-1715803056175.png

Thanks for help in advance

 

 

0 Kudos
1 Reply
JoelBennett
MVP Regular Contributor

Are you trying to rotate the grid to match the polygon, or are you trying to rotate the polygon to match the grid?  Either way, I think the key would be to use geometryEngine.rotate.  The first parameter would be the geometry you want to rotate, and the second parameter would be the angle.

0 Kudos