Esempio n. 1
0
    def get(self):
        res = SensorData.all_newest()

        logging.info(res)

        features = [self.geojson(r) for r in res]

        jsn = {
            "type": "FeatureCollection",
            "features": features
        }

        # write response
        self.response.content_type = "application/json"
        self.response.write(jsonify(jsn))