Select to view content in your preferred language

How to draw a curve in ArcGIS JSAPI given a start point, bearing, radius and arc length

824
1
01-27-2022 08:58 AM
mohammed_raufshaikh
Emerging Contributor

Hello Friends,

I am trying to draw a curved segment given start point, bearing, radius and arc length. This functionality is present in ArcGIS Pro Traverse widget, looking to implement the same using ArcGIS JSAPI. Any direction on this is much appreciated, Thanks.

mohammed_raufshaikh_0-1643302576583.png

 

0 Kudos
1 Reply
JeffreyWilkerson
Frequent Contributor

I don't think the Javascript API has a 'curve' object, or capacity to draw one through a widget, but maybe you can draw one using Javascript and then use it as feature geometry.

Here are 2 concept pages I found:

https://gis.stackexchange.com/questions/153265/using-cubiccurve-in-openlayers-2 

Bezier curve (javascript.info)

Ooh, and this GitHub library looks like it has potential:

https://github.com/crazyxhz/ArcGIS-JavaScript-API-4.2-3D-Draw-Extension 

And be safe out there by always copying links into Notepad first.  There are now web sites that use Javascript to change the link you thought you had with a malicious one.

 

0 Kudos