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:
@@ -118,7 +118,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
});
|
||||
map.getLayers().push(new ol.layer.Vector({
|
||||
source: vectorSource,
|
||||
styleFunction: styleFunction
|
||||
style: styleFunction
|
||||
}));
|
||||
var view2D = map.getView().getView2D();
|
||||
view2D.fitExtent(vectorSource.getExtent(), map.getSize());
|
||||
|
||||
Reference in New Issue
Block a user