Select to view content in your preferred language

How to create a curve with two points or three points

706
2
02-24-2021 10:05 AM
Robertzhu
New Contributor

I want to create a curve line, when I use API addFeatures, I don't know what is the params should be. 

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor
0 Kudos
Robertzhu
New Contributor

Hi, thanks for replied. When I tried to use that curve format, it shows error: { code: 1500, description: 'Incorrect geometry type.' }.

My format is : 

geometry: {
type: 'polyline',
// paths: [[[ item.from_geo[1], item.from_geo[0] ], [ mid1, mid0 ], [ item.to_geo[1], item.to_geo[0] ]]],
curvePaths: [[[ item.from_geo[1], item.from_geo[0] ], [ mid1, mid0 ], [ item.to_geo[1], item.to_geo[0] ]]],
spatialReference: { wkid: 4326 },
},
 
0 Kudos