首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >(500)更新样式id的后端错误

(500)更新样式id的后端错误
EN

Stack Overflow用户
提问于 2015-07-22 10:53:49
回答 1查看 115关注 0票数 1

我正在通过REST更新Fusiontable样式。

但是我发现了(500)后端错误消息的错误。同时,我通过REST在fusiontable insert/update行中获得了成功的消息。

如何调试/解决此问题。

这是我的代码:

代码语言:javascript
复制
$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);

我在最后一行出错了

$results = $this->service->style->update($tableId,$styleId,$postBody);

堆栈跟踪

文件: D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Http\REST.php:110消息:错误调用PUT https://www.googleapis.com/fusiontables/v2/tables/1ycoFAd3BrVZ248zXausz4kKe66Jj3fZDeKvxlBMy/styles/1:(500)后端错误堆栈跟踪:@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),对象( 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,数组) @3 D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Http\REST.php(46):_ D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Client.php(590):Google_Http_REST::execute(Object(Google_Client),_>run() @4 D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Client.php(590):Google_Http_REST::execute(Object(Google_Client),对象( D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Service\Resource.php(237):Google_Client->execute(Object(Google_Http_Request)) @5 D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Service\Fusiontables.php(904):@6 D:\xampp2\htdocs\itp-benchmarking\branches\development\vendor\google\apiclient\src\Google\Service\Fusiontables.php(904):_Service_Resource->调用(‘Google_Http_Request’,数组,@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)

我使用的是google(1.1版)。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-07 09:14:27

看起来您无法同时设置colorStyler和其他属性(如strokeOpacity )。当我移除后者时,我不再收到错误。

目前它还没有文档化,API错误响应在这件事上肯定会更清楚.

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31561077

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档