Add logo control by default

This commit is contained in:
Tom Payne
2013-04-05 18:15:35 +02:00
parent dfed88a8c2
commit cfe5234104
2 changed files with 11 additions and 0 deletions

View File

@@ -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) {