Use ol.Collection#extend in examples
This commit changes the examples to using ol.control.defaults().extend to extend the collection of controls. This is in preparation for a future commit that will remove the 2nd argument to ol.control.defaults. The same is done for ol.interaction.defaults.
This commit is contained in:
@@ -11,7 +11,7 @@ goog.require('ol.source.OSM');
|
||||
var scaleLineControl = new ol.control.ScaleLine();
|
||||
|
||||
var map = new ol.Map({
|
||||
controls: ol.control.defaults({}, [
|
||||
controls: ol.control.defaults().extend([
|
||||
scaleLineControl
|
||||
]),
|
||||
layers: [
|
||||
|
||||
Reference in New Issue
Block a user