How do I convert a polygon geometry into JSON format?
Hello. I've got a Display Capture Geometry activity that lets the user define a polygon. I need parse out the geometry into JSON format (see below), for input as a Web Request activity. Any ideas how I can do this?
"geometry": {
"rings": [
[
[
-122.60004000000001,
45.32413000000011
],
[
-122.5988199999999,
45.325010000000105
],
[
-122.59759,
45.324220000000111
],
[
-122.59887000000001,
45.323319999999995
],
[
-122.60004000000001,
45.32413000000011
]
]
]
}
Thanks!
0
-
OK, that was a lot easier than I thought. I just used geometry1.toJSON.
This begs the question - where is the best place to go for documentation on what methods/properties /members are available? Is it the esri javascript API documentation? Must admit I'm confused by all the different versions/platforms documents and I'm not sure of the best place to look.0 -
When working with Esri objects, like Geometries and FeatureSets, in a workflow Xaml document you want to use their WPF Runtime documentation http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html.
If you are developing custom client side activity implementations you would use the JavaScript API https://developers.arcgis.com/javascript/jsapi/.
--Ryan0 -
Thanks Ryan. That covers the esri side. What about the Geocortex objects? 0
Please sign in to leave a comment.
Comments
3 comments