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));
Sign up to request clarification or add additional context in comments.

1 Comment

thank you so much! I struggled a little creating the graphic from a json object but i got it working!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.