is there any way to draw a map using JSON data which contains a polygon or circle in it?
Sameer,
You can create a web map using a JSON object:
Web map using JSON | ArcGIS API for JavaScript
And you can also create feature layers within the map using JSON:
Importing GeoJSON data in ArcGIS Javascript maps | GeoThread
In my own application, I create JSON point layers that are populated by a separate SQL query - the lat/longs are returned and programmatically made into a JSON object, then displayed on the map. I'm sorry I can't link directly to it, but the above link should give you a sample that will put you in the right direction.
Chris,
can i also achieve this functionality:
Draw a polygon on a basemap layer, get its JSON and use the same JSON object to create a whole new map?
like save a map into JSON and load it whenever required?
So, you're looking to serialize the entire map as JSON and load it somewhere else? Not just for like printing the map, but actually as the entire application? Or, are you just looking to save the polygon feature layer as JSON?
Yes, i am looking to serialize the entire map as JSON and load it somewhere else
Sammer ,this link is a opensource site,you can look up it;hope to find something
Documentation - Leaflet - a JavaScript library for interactive maps