Hi,I have been checking out available samples and other threads about this topic, and would appreciate any guidance the community has to offer.I am trying to add a layer to my map based upon a JSON string.I believe it can be done, based on other threads etc...here is the piece that is giving me trouble:
var nStr:String = "[{"json_featuretype":"rejected(49)","SolutionLon":"-96.7678697","Amplitude":"0","SolutionLat":"53.7175418","Date_Time":"11/10/2012 12:09:19","CloudGround":"0","json_ogc_wkt_crs":"GEOGCS[\"WGS84 Lat/Longs\",DATUM[\"WGS_1984\",SPHEROID[\"World Geodetic System of 1984, GEM 10C\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]]","json_geometry":{"type":"Point","coordinates":[-96.7678697,53.7175418]}}]";
var nFeatureSet:FeatureSet = FeatureSet.fromJSON(nStr);
var nLayerDetails:LayerDetails = new LayerDetails();
var nFeatureCollection:FeatureCollection = new FeatureCollection(nFeatureSet,nLayerDetails);
var nFeatureLayer:FeatureLayer = new FeatureLayer();
nFeatureLayer.featureCollection = nFeatureCollection;
nFeatureLayer.mode = "MODE_SNAPSHOT";
nFeatureLayer.id = "Lightning";
nFeatureLayer.name = "Lightning";
map.addLayer(nFeatureLayer);
I'm not sure what it is that I am doing wrong.Is it my JSON? any insight would be greatly appreciated.My environment:arcgis flex api 3.1flex 4.6