new PointClusterLayer(options)
构造函数
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 参数列表 Properties
|
Example
$.ajax({
type: 'GET',
url: 'https://www.thingjs.com/uearth/res/beijing-POIs-3211.geojson',
dataType: 'json',
success: function (data) {
var pointClusterLayer = app.create({
type: 'PointClusterLayer',
dataSource: data, //数据源 geojson格式
name: 'pointClusterLayer',
minimumClusterSize:5, //最小聚合点个数
renderer:{
type:'image', // 目前仅支持image 代表采用图片渲染
imageUrl:'./uGeo/circle.png', //图标路径
showNonCluster:true, //是否显示未聚合的点
size:3, // 图标尺寸
fontColor:[255,255,255] //字体颜色
fontSize:50 //字体大小 在给定图标尺寸的情况下 fontSize越大 字体在图表内所占得尺寸越大
},
change:function(ev){
//每次聚合结果改变时会触发该事件
consloe.log(ev.data);
}
});
map.addLayer(heatmapLayer);
}
});