Draw sector of circle on map

530
2
01-04-2022 09:02 AM
JohnWyant
New Contributor

Hello,

I've been searching for a way to draw a portion of a circle on the map. For example, if you want to portray where someone is looking - they are at coordinates X, Y; looking northeast; with a field of view of 90 degrees.

Thanks in advance!

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

Perhaps you will find this sample useful: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=featurelayerview-query-g...

Circle is drawn on the map. It can be moved and resized after it is created. Please take a look atet drawBufferPolygon function in particular. 

 

-Undral

0 Kudos
JohnGrayson
Esri Regular Contributor

I recently did something similar using the JS API CIMSymbol.  Here's a simple CodePen showing the concept: https://codepen.io/john-grayson/pen/dyVjomE 

0 Kudos