Hi All,
I have an array that contains coordinates, I want to use those coordinates to draw a polygon, how can I do that?
var myArr = [3364047.4454315286,-3228904.4514530962,
3364900.9929277417,-3228484.0477610803,
3365799.1274269233,-3229152.871795023,
3365206.741040882,-3229535.056936448,
3364047.4454315286,-3228904.4514530962];
I want to manipulate the contents of the above array to be something like this so that I can be able to draw the polygon:
const vertices = [
[3364047.4454315286, -3228904.4514530962],
[3364900.9929277417, -3228484.0477610803],
[3365799.1274269233, -3229152.871795023],
[3365206.741040882,-3229535.056936448],
[3364047.4454315286,-3228904.4514530962]
];
I am using JavaScript, I want to draw a polygon on an Esri map.
Kind Regards
Siyabonga Kubeka