Clarify the style function signature
This commit is contained in:
@@ -35,14 +35,14 @@ var vector = new ol.layer.Vector({
|
|||||||
projection: 'EPSG:3857',
|
projection: 'EPSG:3857',
|
||||||
url: 'data/geojson/countries.geojson'
|
url: 'data/geojson/countries.geojson'
|
||||||
}),
|
}),
|
||||||
styleFunction: function(feature, layer) {
|
styleFunction: function(feature, resolution) {
|
||||||
return unselectedStyle;
|
return unselectedStyle;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var select = new ol.interaction.Select({
|
var select = new ol.interaction.Select({
|
||||||
featureOverlay: new ol.FeatureOverlay({
|
featureOverlay: new ol.FeatureOverlay({
|
||||||
styleFunction: function(feature, layer) {
|
styleFunction: function(feature, resolution) {
|
||||||
return selectedStyle;
|
return selectedStyle;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user