obj.put("maxInstances", mapServiceDesc.getMaxInstances());
obj.put("maxResults", mapServiceDesc.getMaxResults());
arrayTemp = new JSONArray();
for (int i = 0, count = mapDesc.getLayerInfos().size(); i < count; i++) {
LayerInfo layerInfo = mapDesc.getLayerInfo(i);
objTemp = new JSONObject();
objTemp.put("id", i);
objTemp.put("name", layerInfo.getName());
objTemp.put("defaultVisibility", layerInfo.isVisible());
objTemp.put("editable", layerInfo.isEditable());
arrayTemp.put(objTemp);
}
obj.put("layers", arrayTemp);
objSR = new JSONObject();