Map: check default controls are in build
This commit is contained in:
@@ -577,14 +577,20 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
}
|
||||
|
||||
if (this.controls == null) {
|
||||
this.controls = [];
|
||||
if (OpenLayers.Control != null) { // running full or lite?
|
||||
this.controls = [ new OpenLayers.Control.Navigation(),
|
||||
new OpenLayers.Control.PanZoom(),
|
||||
new OpenLayers.Control.ArgParser(),
|
||||
new OpenLayers.Control.Attribution()
|
||||
];
|
||||
} else {
|
||||
this.controls = [];
|
||||
if (OpenLayers.Control.Navigation) {
|
||||
this.controls.push(new OpenLayers.Control.Navigation())
|
||||
}
|
||||
if (OpenLayers.Control.PanZoom) {
|
||||
this.controls.push(new OpenLayers.Control.PanZoom())
|
||||
}
|
||||
if (OpenLayers.Control.ArgParser) {
|
||||
this.controls.push(new OpenLayers.Control.ArgParser())
|
||||
}
|
||||
if (OpenLayers.Control.Attribution) {
|
||||
this.controls.push(new OpenLayers.Control.Attribution())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user