Select to view content in your preferred language

Point layer from JSON webservice

658
1
06-20-2013 08:11 AM
GlenReid
Deactivated User
All,

Similar to the new CSVLayer, I'd like to create a layer from a JSON webservice (has lat/lon for points).  What are my options?  GraphicsLayer?  FeatureLayer?

Thanks,
Glen
Tags (2)
0 Kudos
1 Reply
BjornSvensson
Esri Regular Contributor
I'd like to create a layer from [some data].  What are my options?  GraphicsLayer?  FeatureLayer?


Yes (both). Or a custom layer that extends either of those. 
Using a FeatureLayer and it's feature collection is probably one of the first options you should look into.  There's a sample for that:
http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Time_rendered_5K_run_gpx/01nq000000...
That specific sample also deals with time-awareness, but if you simplify it and parse your json instead of gpx, you should be able to get your json point data onto the map.
0 Kudos