0

I'm very new to ArcGIS and I'm currently exploring the js API. I haven't seen documentation for this but can i use a json datasource (returned from an ajax call) as the data items/points for my map? Can anyone point me to an example?

1 Answer 1

2

If you don't have any Map Service (ArcGIS, WMS, KML, etc) but just a list of geometries fetched from somewhere else you must use a GraphicsLayer. You can use the default GraphicsLayer of the map or add another GraphicsLayer.

for each geometry:

map.graphics.add(new Graphic(geometry, symbol));
1
  • thank you so much! I struggled a little creating the graphic from a json object but i got it working! Commented Oct 17, 2014 at 21:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.