I need to send a collection of points to a geometry service for reprojection. The points are in a graphics layer from when the users clicked on the map.
the code I am using is:
var arraycollhope:Object;
arraycollhope = myXYGraphicsLayer.graphicProvider
var outSR:SpatialReference = new SpatialReference(2230);
geometry1.project(arraycollhope.toArray(), outSR);
where myXYGraphicsLayer is the graphics layer.
This seems to work but what i don't understand why. arraycollhope is defined as an object not as an array collection. If I define it as an array collection I get an implicit conversion error as myXYGraphicsLayer.graphicProvider returns an object. Yet when I call the method .toArray it appears to work, even though this isn't a method on IObject. To me this implies an implicit conversion anyway.
Is there another preferred way of doing this?
Thanks for any help or comments
Drew