|
|
|
@ -500,6 +500,37 @@ export class KedaMarkerCluster extends KedaBasic implements IMarkerCluster { //M
|
|
|
|
|
constructor(map: IMap, list: Object[], options: any) { |
|
|
|
|
super(); |
|
|
|
|
this.map = map |
|
|
|
|
console.log(list,options,'聚合物配置') |
|
|
|
|
//聚合图层
|
|
|
|
|
this.map.self.addCustomLayer({ |
|
|
|
|
serviceName:'service_tzn_test7', //图层类型
|
|
|
|
|
isPublic: true, //是否查询纯公有空间数据
|
|
|
|
|
icons: [ //数据源属性匹配非聚合图标 icon
|
|
|
|
|
{ |
|
|
|
|
iconName: 'car-15', |
|
|
|
|
filter: [], |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
clustered: true, //是否聚合
|
|
|
|
|
clusteredFilters: [ //聚合条件
|
|
|
|
|
{//1-10
|
|
|
|
|
count: 1, |
|
|
|
|
circleColor: '#51bbd6', |
|
|
|
|
circleRadius: 20 //圆的半径
|
|
|
|
|
}, |
|
|
|
|
{//10-100
|
|
|
|
|
count: 10, |
|
|
|
|
circleColor: '#f1f075', |
|
|
|
|
circleRadius: 30 |
|
|
|
|
}, |
|
|
|
|
{//100以上
|
|
|
|
|
count: 100, |
|
|
|
|
circleColor: '#f28cb1', |
|
|
|
|
circleRadius: 35 |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
ended: (res) => { if (res.status === 10) { this.id = res.data } } |
|
|
|
|
}); //add
|
|
|
|
|
} |
|
|
|
|
on(eventName: string, callback: MarkerClusterCallback, component?: any): void { |
|
|
|
|
// 绑定聚合事件时获取信息
|
|
|
|
@ -532,11 +563,12 @@ export class KedaMarkerCluster extends KedaBasic implements IMarkerCluster { //M
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export class KedaRenderClusterMarkerr extends KedaBasic implements IRenderClusterMarker { //Marker 聚合物 配置项
|
|
|
|
|
discriminator: string = "ISelfCombine"; |
|
|
|
|
constructor() { |
|
|
|
|
super(); |
|
|
|
|
} |
|
|
|
|
getFirstImages(context: any): string { |
|
|
|
|
throw new Error('Method not implemented.'); |
|
|
|
|
return context.data[0].image; |
|
|
|
|
} |
|
|
|
|
contentRender: HtmlRender; |
|
|
|
|
contentNonRender: HtmlRender; |
|
|
|
|