// 设置标注样式函数
function createStyle(name) {
// 河流style
var riverStyle = new Style({
stroke: new Stroke({
color: '#4e89d4',
width: 2
}),
fill: new Fill({
color: '#eee'
})
})
// 省份style·
var provinceStyle = new Style({
stroke: new Stroke({
color: '#4e89d4',
width: 1
}),
fill: new Fill({
color: '#eee'
})
})
//城市style·
if (name != '') {
var cityStyle = new ol.style.Style({
image: new ol.style.Circle({
radius: 5,
fill: new ol.style.Fill({
color: '#05ab57',
}),
stroke: new ol.style.Stroke({
color: '#05ab57',
widt