[GIS] How to create Esri Flex Geometry from WKT

arcgis-flex-apigeometrywell-known-text

I am working with Esri flex 2.3 API, I am also using Abode BlazeDS for server side binding. I am sending a geometry as WKT from server into my flex client and I am looking for a way to convert the string into a flex geometry so that i can make a Graphic object and add to Feature Layer! or do I have to write a parser myself to accomplish this?

Best Answer

On the server side, why not just format to ESRI's JSON format - which is very similar to GeoJSON? So, the workflow would look something like:

ON SERVER
1.  Convert geometry to GeoJSON
2.  Convert GeoJSON to ESRI JSON

ON CLIENT
3.  Create feature set by FeatureSet.fromJSON()