def building():

    # @ToDo: deployment_setting
    ctable = s3db.gis_config
    config = db(ctable.name == "Queens").select(ctable.id,
                                                limitby=(0, 1)).first()
    if config:
        gis.set_config(config.id)

    # Pre-processor
    def prep(r):
        # Location Filter
        #s3db.gis_location_filter(r)

        if r.interactive:
            if r.method == "map":
                # Tell the client to request per-feature markers
                s3db.configure("assess_building", marker_fn=building_marker_fn)

        elif r.representation == "geojson":
            # Load these models now as they'll be needed when we encode
            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
dataset/ETHPy150Open sahana/eden/controllers/assess.py/building