Fix support for older browsers (Most notability pre iOS 10). (#16)

A chart can be seen here showing the browsers that support arrow functions: https://caniuse.com/#feat=es6
This commit is contained in:
modmuss50
2020-03-02 23:13:36 +00:00
committed by GitHub
parent f0e7dbd50d
commit 05ee6868a1

View File

@@ -253,27 +253,29 @@ function createBaseLayers() {
projection: 'EPSG:3857'
})
}),
style: (feature) => new ol.style.Style({
fill: new ol.style.Fill({
color : fill
}),
stroke: new ol.style.Stroke({
color: stroke,
width: 1
}),
text: new ol.style.Text({
text: feature.get("name"),
overflow: OLMap.getView().getZoom() > 5,
scale: 1.25,
style: function style(feature) {
return new ol.style.Style({
fill: new ol.style.Fill({
color: '#000000'
color : fill
}),
stroke: new ol.style.Stroke({
color: '#FFFFFF',
width: 2
color: stroke,
width: 1
}),
text: new ol.style.Text({
text: feature.get("name"),
overflow: OLMap.getView().getZoom() > 5,
scale: 1.25,
fill: new ol.style.Fill({
color: '#000000'
}),
stroke: new ol.style.Stroke({
color: '#FFFFFF',
width: 2
})
})
})
})
});
}
});
};