Test for the presence of OpenLayers.Control before attempting to load controls. Makes it possible to run Map.js in the lightweight version.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1595 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -162,8 +162,12 @@ OpenLayers.Map.prototype = {
|
||||
this.layers = [];
|
||||
|
||||
if (this.controls == null) {
|
||||
this.controls = [ new OpenLayers.Control.MouseDefaults(),
|
||||
new OpenLayers.Control.PanZoom()];
|
||||
if (OpenLayers.Control != null) { // running full or lite?
|
||||
this.controls = [ new OpenLayers.Control.MouseDefaults(),
|
||||
new OpenLayers.Control.PanZoom()];
|
||||
} else {
|
||||
this.controls = [];
|
||||
}
|
||||
}
|
||||
|
||||
for(var i=0; i < this.controls.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user