Adapt styleFunction in synthetic-points example

This commit is contained in:
Éric Lemoine
2013-11-26 11:11:24 +01:00
parent 9be03b2e3a
commit 972deebbc6

View File

@@ -25,23 +25,23 @@ for (var i = 0; i < count; ++i) {
}
var styles = {
'10': new ol.style.Style({
'10': [new ol.style.Style({
image: ol.shape.renderCircle(5,
new ol.style.Fill({color: '#666666'}),
new ol.style.Stroke({color: '#bada55', width: 1}))
}),
'20': new ol.style.Style({
})],
'20': [new ol.style.Style({
image: ol.shape.renderCircle(10,
new ol.style.Fill({color: '#666666'}),
new ol.style.Stroke({color: '#bada55', width: 1}))
})
})]
};
var vector = new ol.layer.Vector({
source: new ol.source.Vector({
features: features
}),
styleFunction: function(feature) {
styleFunction: function(feature, resolution) {
return styles[feature.get('size')];
}
});