def map_wms(request, mapid):
 map_obj = _resolve_map(request, mapid, 'base.view_resourcebase', _PERMISSION_MSG_VIEW)
 if (request.method == 'PUT'):
  try:
   layerGroupName = map_obj.publish_layer_group()
   response = dict(layerGroupName=layerGroupName, ows=getattr(ogc_server_settings, 'ows', ''))
   return HttpResponse(json.dumps(response), content_type='application/json')
  except:
   return HttpResponseServerError()
 if (request.method == 'GET'):
  response = dict(layerGroupName=getattr(map_obj.layer_group, 'name', ''), ows=getattr(ogc_server_settings, 'ows', ''))
  return HttpResponse(json.dumps(response), content_type='application/json')
 return HttpResponseNotAllowed(['PUT', 'GET'])

def map_wms ( request , mapid ) : map_obj = _resolve_map ( request , mapid , 'base.view_resourcebase' , _PERMISSION_MSG_VIEW ) if ( request . method == 'PUT' ) : try : layerGroupName = map_obj . publish_layer_group ( ) response = dict ( layerGroupName = layerGroupName , ows = getattr ( ogc_server_settings , 'ows' , '' ) ) return HttpResponse ( json . dumps ( response ) , content_type = 'application/json' ) except : return HttpResponseServerError ( ) if ( request . method == 'GET' ) : response = dict ( layerGroupName = getattr ( map_obj . layer_group , 'name' , '' ) , ows = getattr ( ogc_server_settings , 'ows' , '' ) ) return HttpResponse ( json . dumps ( response ) , content_type = 'application/json' ) return HttpResponseNotAllowed ( [ 'PUT' , 'GET' ] )
publish local map layers as group layer in local ows .