Hi,
I have a need to take a 'aaData' returned JSON object and convert it to a graphics layer.
Does anyone know of an example out there?
my JSON object returned as aaData is below..
[["CityName","State","lat","lon"],["Washington","DC","38.901","-77.043"],["Richmond","VA","37.541","-77.439"],["VirginiaBeach","VA","36.859","-75.983"],["Salisbury","MD","38.36","-75.598"],["Greensboro","NC","36.079","-79.803"],["Raleigh","NC","35.777","-78.639"]]
Andy..
It is simple, just format your json to The way ESRI format a feature..eg
[HTML]{
"geometry" : {"x" : -118.15, "y" : 33.80},
"attributes" : {
"OWNER" : "Joe Smith",
"VALUE" : 94820.37,
"APPROVED" : true,
"LASTUPDATE" : 1227663551096
}
[/HTML]
and then create a featureLayer. Here is a very good example that you can look at it to start...
http://gis.stackexchange.com/questions/8791/featurelayer-creating-in-javascript-arcgis-api
Thanks