(500) Backend Error on update style id by Google Fusion Table REST API -
i updating fusiontable style rest api.
but got error (500) backend error message. on same time got successful message in fusiontable insert/update row rest api.
how can debug/resolve issue.
here code:
$columnname = self::getstylecolumnprefix($style_id); $strokeopacity = '1'; $fillopacity = '1'; $kind = 'fusiontables#fromcolumn'; $tableid = $this->table; $styleid = $style_id; $fillcolorstyler = new \google_service_fusiontables_stylefunction(); $fillcolorstyler->setcolumnname($columnname); $fillcolorstyler->setkind($kind); $polygonoptions = new \google_service_fusiontables_polygonstyle(); $polygonoptions->setfillcolorstyler($fillcolorstyler); $polygonoptions->setstrokeopacity($strokeopacity); $polygonoptions->setfillopacity($fillopacity); $postbody = new \google_service_fusiontables_stylesetting(); $postbody->setpolygonoptions($polygonoptions); // $this->service = new \google_service_fusiontables_style_resource(); $results = $this->service->style->update($tableid, $styleid, $postbody);
i getting error in last line
$results = $this->service->style->update($tableid, $styleid, $postbody);
stack trace
file: d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\http\rest.php:110 message: error calling put https://www.googleapis.com/fusiontables/v2/tables/1ycofad3brvz248zxausz4kke66jj3fzdekvxlbmy/styles/1: (500) backend error stack trace: @0 d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\http\rest.php(62): google_http_rest::decodehttpresponse(object(google_http_request), object(google_client)) @1 [internal function]: google_http_rest::doexecute(object(google_client), object(google_http_request)) @2 d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\task\runner.php(174): call_user_func_array(array, array) @3 d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\http\rest.php(46): google_task_runner->run() @4 d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\client.php(590): google_http_rest::execute(object(google_client), object(google_http_request)) @5 d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\service\resource.php(237): google_client->execute(object(google_http_request)) @6 d:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\google\service\fusiontables.php(904): google_service_resource->call('update', array, 'google_service_...') @7 d:\xampp2\htdocs\itp-benchmarking\branches\development\module\benchmarking\src\benchmarking\model\fusiontablemodel.php(494): google_service_fusiontables_style_resource->update('1ycofad3brvz248...', 1, object(google_service_fusiontables_stylesetting)) @8 d:\xampp2\htdocs\itp-benchmarking\branches\development\module\benchmarking\src\benchmarking\controller\fusiontablecontroller.php(268): benchmarking\model\fusiontablemodel->setstyleidofmeasure(1)
i using google-api-php-client (v1.1).
it looks can't set both colorstyler
and other properties strokeopacity
. when removed latter, no longer received error.
it's not documented , api error response should clearer on matter...
Comments
Post a Comment