Beispiel #1
0
 public function post_records()
 {
     $table = new \app\models\Table(null);
     $name = $table->create($_REQUEST['name'], $_REQUEST['type'], $_REQUEST['srid']);
     // Set layer editable
     $join = new \app\models\Table("settings.geometry_columns_join");
     $data = (array) json_decode(urldecode('{"data":{"editable":true,"_key_":"' . \app\conf\Connection::$param["postgisschema"] . '.' . $name['tableName'] . '.the_geom"}}'));
     $response = $this->auth();
     return !$response['success'] ? $response : $join->updateRecord($data, "_key_");
 }