How to create a polygon in a workflow?
Hi. I'm trying to add a polygon markup through a workflow. I'm able to add a point just fine but am having no luck adding a polygon.
I've defined a variable "poly" with a type of ESRI.ArcGIS.Client.Geometry.Polygon. I then use an Assign activity and set poly to be:
New ESRI.ArcGIS.Client.Geometry.Polygon([[7655000,613000],[7655000,620000],[7675000,620000],[7675000,613000],[7655000,613000]])
However, it won't compile. Am I missing something obvious?
As an aside, what's the best place to view documentation on the ESRI.ArcGIS.Client.Geometry namespace? Is it the ArcGIS API for Javascript? ArcGIS API for Silverlight? I'm never sure where to look.
Thanks!
Chris
0
-
forgot to actually tell you where I went for reference: https://developers.arcgis.com/javascript/jsapi/polygon-amd.html 0 -
Thanks Marshall! Quite a tricky set of procedures.... But it got me what I needed!
What I'm not sure about is why the "new Polygon(coordinates)" constructor doesn't work...0 -
Yeah, I know, you have me intrigued. I got this to at least compile, but it is still not an inline constructor (not sure if it works:
thePolygon = new Polygon
thePolygon.rings(0) = new PointCollection(new MapPoint() {new MapPoint(7655000,613000), new MapPoint(7655000,620000),new MapPoint(7675000,620000), new MapPoint(7675000,613000), new MapPoint(7655000,613000)})
I haven't tested it, just happy I could compile it before the end of the day...I'll test tomorrow0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare