方法列表
(static) config(options, onSuccess可选, onError可选)
配置可视化效果
Parameters:
Name |
Type |
Attributes |
Description |
options |
Object
|
|
选项
Properties
Name |
Type |
Attributes |
Description |
configJson |
String
|
<optional>
|
可视化效果的配置,注意这是一个以JSON形式表示的字符串 |
|
onSuccess |
function
|
<optional>
|
请求成功的回调函数 |
onError |
function
|
<optional>
|
请求失败的回调函数 |
Returns:
Example
GAPI.dataviz.config(
{
configJson: '[{"dataUid":"college_bj","dataType":"public","vizConfig":{"type":"marker-simple","labelField":null,"labelFont":null,"labelSize":12,"markerColor":"#0900ff","markerSize":4,"markerOpacity":0.8,"outlineColor":"#ffffff","outlineWidth":1,"outlineOpacity":0.8}}]'
},
function(data){console.log(data)},
function(error){console.error(error)}
);
(static) identify(options, onSuccess可选, onError可选)
对若干已可视化的数据进行识别操作
Parameters:
Name |
Type |
Attributes |
Description |
options |
Object
|
|
选项
Properties
Name |
Type |
Attributes |
Default |
Description |
dataList |
String
|
<optional>
|
|
需要识别的数据列表,注意这是一个以JSON形式表示的字符串 |
geometry |
String
|
<optional>
|
|
指定几何对象进行识别 |
returnAll |
Boolean
|
<optional>
|
false
|
是否返回所有识别结果,默认只返回最先识别的对象 |
|
onSuccess |
function
|
<optional>
|
请求成功的回调函数 |
onError |
function
|
<optional>
|
请求失败的回调函数 |
Returns:
Example
GAPI.dataviz.identify(
{
dataList: '[{"uid": "36e9debaf3354dd29802405010c0d45c","type":"private"},{"uid":"mall_bj","type":"public"}]',
geometry: '[12917105,4812633,12918634,4814162]'
},
function(data){console.log(data)},
function(error){console.error(error)}
);