drawingcesiumjsturfjs

How can I draw a sector with internal radius using Turf


I know I can draw a sector using Turf

What I need is to give another radius information, to "cut" the internal part of the sector, like the image ( consider the red polygon my goal ).

enter image description here

I really need to use Turf and can't do complex calculations because the user will use the mouse to draw it in real time on the map.

MUST be Turf because I'm trying to extend this tool.


Solution

  • Try using turf.difference to clip a smaller circle of radius "red" from the larger green sector.