Add logo control by default
This commit is contained in:
@@ -2,6 +2,7 @@ goog.provide('ol.control.defaults');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('ol.control.Attribution');
|
||||
goog.require('ol.control.Logo');
|
||||
goog.require('ol.control.Zoom');
|
||||
|
||||
|
||||
@@ -25,6 +26,14 @@ ol.control.defaults = function(opt_options, opt_controls) {
|
||||
controls.push(new ol.control.Attribution(attributionControlOptions));
|
||||
}
|
||||
|
||||
var logoControl = goog.isDef(options.logo) ?
|
||||
options.logo : true;
|
||||
if (logoControl) {
|
||||
var logoControlOptions = goog.isDef(options.logoOptions) ?
|
||||
options.logoOptions : undefined;
|
||||
controls.push(new ol.control.Logo(logoControlOptions));
|
||||
}
|
||||
|
||||
var zoomControl = goog.isDef(options.zoom) ?
|
||||
options.zoom : true;
|
||||
if (zoomControl) {
|
||||
|
||||
Reference in New Issue
Block a user