AnsweredAssumed Answered

adding evt to array

Question asked by mallareddy2271 on Jul 25, 2018
Latest reply on Jul 25, 2018 by rscheitlin

buffer_polygons is a array

below pic is the value of it

var x= geometryEngine.union(buffer_polygons);// this is line that unions of it values

in one condition i want to manually add evt.geometry value into buffer_polygons array

(evt.geometry can be polyline or point)

I tried with

1.

var x= geometryEngine.union(buffer_polygons, evt.geometry);// getting value, but it is wrong

when i try with

2.

buffer_polygons = buffer_polygons.push(evt.geometry);

var x= geometryEngine.union(buffer_polygons);//here getting error as "TypeError: Cannot read property 'spatialReference' of undefined"

3.

 buffer_polygons[0].push(evt.geometry);//this also not working

 

Any suggestions

 

Thank you

 

 

Outcomes