the format of json is
{
"currentVersion": 10.01,
"serviceDescription": "",
"mapName": "Layers",
"description": "",
"copyrightText": "",
"layers": [
{
"id": 0,
"name": "",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0000,
"maxScale": 0
}
],
"tables": [],
"spatialReference": {},
"singleFusedMapCache": false,
"initialExtent": {
"xmin": ,
"ymin": ,
"xmax": ,
"ymax": ,
"spatialReference": {}
},
"fullExtent": {
"xmin": -1.0547305
.
.
.
.
}
I know we can create layer using ArcGISDynamicMapServiceLayer(url) constructor, but i have json instead of URL.
iOS sdk provides this facility
AGSDynamicMapServiceLayer *dynamicLayer = [[AGSDynamicMapServiceLayer alloc] initWithJSON:mapJson];
so i believe it should be possible for android as well. But have no idea.. how
Hi Shailendra,
I'm afraid right now we don't have a similar method in Android to do so. Initialization parses Json from REST end point.
We're showing data from a JSON web service on our map. We grab the json from our web service. Take that and reformat it into the json format used by arcgis server (documented here - ArcGIS Server REST API ). Take the resulting json, feed it into FeatureSet.fromJson(JsonParser) to get a featureset and add that to a graphicslayer.
It's not simple/pretty, but it does the job.
Keith