def building():
 ctable = s3db.gis_config
 config = db((ctable.name == 'Queens')).select(ctable.id, limitby=(0, 1)).first()
 if config:
  gis.set_config(config.id)
 def prep(r):
  if r.interactive:
   if (r.method == 'map'):
    s3db.configure('assess_building', marker_fn=building_marker_fn)
  elif (r.representation == 'geojson'):
   mtable = s3db.gis_marker
   s3db.configure('assess_building', marker_fn=building_marker_fn)
  return True
 s3.prep = prep
 return s3_rest_controller(rheader=s3db.assess_building_rheader)

def building ( ) : ctable = s3db . gis_config config = db ( ( ctable . name == 'Queens' ) ) . select ( ctable . id , limitby = ( 0 , 1 ) ) . first ( ) if config : gis . set_config ( config . id ) def prep ( r ) : if r . interactive : if ( r . method == 'map' ) : s3db . configure ( 'assess_building' , marker_fn = building_marker_fn ) elif ( r . representation == 'geojson' ) : mtable = s3db . gis_marker s3db . configure ( 'assess_building' , marker_fn = building_marker_fn ) return True s3 . prep = prep return s3_rest_controller ( rheader = s3db . assess_building_rheader )
restful crud controller .