Use style option in vector layer examples
Providing a styleFunction option still works because the layer property is still named styleFunction.
This commit is contained in:
@@ -35,9 +35,7 @@ var vector = new ol.layer.Vector({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'data/geojson/countries.geojson'
|
||||
}),
|
||||
styleFunction: function(feature, resolution) {
|
||||
return unselectedStyle;
|
||||
}
|
||||
style: unselectedStyle
|
||||
});
|
||||
|
||||
var select = new ol.interaction.Select({
|
||||
|
||||
Reference in New Issue
Block a user