Select to view content in your preferred language

Can We rotate the extent of polygon?

a month ago
New Contributor III



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:



Thanks for help in advance



0 Kudos
1 Reply
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