容器
Protected _setProtected _showOptional menu: any设置所有要素样式,根据classname字段设置 @description:
styleClassOptions 是一个数组结构
[{ style 内是可选参数,根据需要设置
className: "字段名",
classValue: "字段值",
style: {
Font: "12px Microsoft YaHei",
FontColor: "#8B4513",
FontStrokeColor: "#fff",
FontStrokeWidth: 2,
FontoffsetX: 0,
FontoffsetY: -10,
fillcolor: "rgba(255, 221, 0, 1)",
strokecolor: "rgba(255, 255, 255,1)", //通过要素拿到具体的值
strokewidth: 1,
radius: 3,
scale: 1,
text: ""//可以用{字段名}格式化显示字段
},
}]
设置所有要素样式 @description:
Optional callback: Function回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
styleOptions 内容
{
Font: "12px Microsoft YaHei",
FontColor: "#8B4513",
FontStrokeColor: "#fff",
FontStrokeWidth: 2,
FontoffsetX: 0,
FontoffsetY: -10,
fillcolor: "rgba(0, 153, 255,1)",
strokecolor: "rgba(255, 255, 255,1)", // 通过要素拿到具体的值
strokewidth: 1,
radius: 10,
scale: 1,
text: "标注示例" //可以用{字段名}格式化显示字段
}
根据classname字段设置所有要素样式,按字段名及字段值匹配设置
Optional callback: Function回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
styleOptions 是一个json结构
{
Font: "12px Microsoft YaHei",
FontColor: "#8B4513",
FontStrokeColor: "#fff",
FontStrokeWidth: 2,
FontoffsetX: 0,
FontoffsetY: -10,
fillcolor: "rgba(0,0,0,0.5)",
strokecolor: "rgba(255,255,0,1)",
strokewidth: 1,
scale: 1,
radius: 10,
text: ""//可以用{字段名}格式化显示字段
}
根据features设置所有要素样式,按字段名及字段值匹配设置
Optional callback: Function回调函数,可选 回调会返回每个feature的getProperties()属性,根据属性使用回调函数设置每个要素的styleOptions样式
styleOptions 是一个json结构
{
Font: "12px Microsoft YaHei",
FontColor: "#8B4513",
FontStrokeColor: "#fff",
FontStrokeWidth: 2,
FontoffsetX: 0,
FontoffsetY: -10,
fillcolor: "rgba(0,0,0,0.5)",
strokecolor: "rgba(255,255,0,1)",
strokewidth: 1,
scale: 1,
radius: 10,
text: ""//可以用{字段名}格式化显示字段
}
设置所有要素样式,按字段名及字段值匹配设置 @description:
styleClassOptions 是一个数组结构
[{
className: "字段名",
classValue: "字段值",
style: {
Font: "12px Microsoft YaHei",
FontColor: "#8B4513",
FontStrokeColor: "#fff",
FontStrokeWidth: 2,
FontoffsetX: 0,
FontoffsetY: -10,
fillcolor: "rgba(0,0,0,0.5)",
strokecolor: "rgba(255,255,0,1)",
strokewidth: 1,
scale: 1,
radius: 10,
text: ""//可以用{字段名}格式化显示字段
}
}]
设置要素分级颜色样式,按字段名及字段值匹配设置
json参数
参与分级的要素字段名
Optional autolevel?: boolean是否自动分级,自动分级时默认5级颜色
参与分级的要素分组 classname
Optional level分级设置
levelColor:[
{
maxnum: 0, // 分级最大值
fillcolor: "rgba(255,255,255,0.1)",
strokecolor: "rgba(255, 255, 255,1)",
strokewidth: 1
},
{
maxnum: 1, // 分级最大值
fillcolor: "rgba(255,255,255,0.1)",
strokecolor: "rgba(255, 255, 255,1)",
strokewidth: 1
}
]
Protected showGenerated using TypeDoc
ClusterImageLayer