Using a map for controls also.

This commit is contained in:
ahocevar
2012-06-21 19:33:33 +02:00
parent 9bd507e9b8
commit 188615391d
4 changed files with 12 additions and 15 deletions

View File

@@ -322,7 +322,7 @@ ol.Map.prototype.setControls = function(opt_controls) {
for (var i=0, ii=opt_controls.length; i<ii; ++i) {
control = opt_controls[i];
if (!(control instanceof ol.control.Control)) {
control = new ol.control[control]();
control = new ol.control.CONTROL_MAP[control]();
}
control.setMap(this);
}