function styleFunction(feature) {
var coordinates = feature.getGeometry().getType() != 'Polygon' ? feature.getGeometry().getCoordinates() : feature.getGeometry().getCoordinates()[0];
if (feature.getGeometry().getType() == 'MultiPolygon') {
var coordinates_ = [];
coordinates.forEach(function (item) {
coordinates_ = coordinates_.concat(item[0]);
})
coordinates = coordinates_;
}
var multipoint = new ol.geom.MultiPoint(coordinates);
var styles = [
new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#00aaff',
width: 3
}),
fill: new ol.style.Fill({
color: 'rgba(255,255,255,0.4)'
})
})
];
multipoint.getCoordinates().forEach(function (coordinates, index, arr) {
styles.push(new ol.style.Style({