Merge pull request #321 from tonio/zoomdefault
Make Zoom control be default instead of PanZoom.
This commit is contained in:
@@ -195,7 +195,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* If not provided in the map options at construction, the map will
|
||||
* by default be given the following controls if present in the build:
|
||||
* - <OpenLayers.Control.Navigation> or <OpenLayers.Control.TouchNavigation>
|
||||
* - <OpenLayers.Control.PanZoom>
|
||||
* - <OpenLayers.Control.Zoom> or <OpenLayers.Control.PanZoom>
|
||||
* - <OpenLayers.Control.ArgParser>
|
||||
* - <OpenLayers.Control.Attribution>
|
||||
*/
|
||||
@@ -622,9 +622,12 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
} else if (OpenLayers.Control.TouchNavigation) {
|
||||
this.controls.push(new OpenLayers.Control.TouchNavigation());
|
||||
}
|
||||
if (OpenLayers.Control.PanZoom) {
|
||||
if (OpenLayers.Control.Zoom) {
|
||||
this.controls.push(new OpenLayers.Control.Zoom());
|
||||
} else if (OpenLayers.Control.PanZoom) {
|
||||
this.controls.push(new OpenLayers.Control.PanZoom());
|
||||
}
|
||||
|
||||
if (OpenLayers.Control.ArgParser) {
|
||||
this.controls.push(new OpenLayers.Control.ArgParser());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user