var points = [
{
attributes: {
id: 'sfasdfasdf',
name: '不知道的名称', // 必须有name 做totle用
csx: 'dddddd',
tableKey: [
{
comment: '显示的气泡label名称',
name: 'name' // 指定的显示的attributes属性里的字段值 的 key
},
{
comment: 'csxcsxcsxcsx',
name: 'csx' // 指定的显示的attributes属性里的字段值 的 key
}
]
},
geometry: 'POINT (103.2 24.983333333333334)',
geometryType: 'Point'
},
{
attributes: {
id: 'sfasdfasssssdf',
name: '不知道的名称1',
csx: '不知道的名称1',
tableKey: [
{
comment: '显示的气泡label名称',
name: 'name' // 指定的显示的attributes属性里的字段值 的 key
}
],
style: { // 如果需要处理不同颜色 在数组里替换
image: {
type: 'icon',
image: {
imageSrc: '/images/map/point-red.png', // 图片必须放在public 里边 路径可自取
imageAnchor: [0.5, 1]
}
}
}
},
geometry: 'POINT (103.89250000000001 25.29638888888889)',
geometryType: 'Point'
}
]
this.setPoint(points)
//-------
style: {
color: '#1C8FFA',
element: {
className: 'iconditu',
fontSize: '28px'
}
},
//-------
// let colorStyle = { color: '#21A826',
// element: {
// className: 'iconditu',
// fontSize: '28px'
// } }
--- addPoints addOverlayPoints ----
gis气泡添加
最新推荐文章于 2022-12-07 22:32:50 发布