The ZoomToMaxExtent control should extend the OpenLayers.Control.Button

and not OpenLayers.Control.
This commit is contained in:
Marc Jansen
2012-04-13 09:59:44 +02:00
parent 84e5c47caa
commit 029bdaccde

View File

@@ -4,7 +4,7 @@
* full text of the license. */ * full text of the license. */
/** /**
* @requires OpenLayers/Control.js * @requires OpenLayers/Control/Button.js
*/ */
/** /**
@@ -16,19 +16,14 @@
* Inherits from: * Inherits from:
* - <OpenLayers.Control> * - <OpenLayers.Control>
*/ */
OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control, { OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control.Button, {
/** /**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/*
* Method: trigger * Method: trigger
* Do the zoom. *
* Called whenever this control is being rendered inside of a panel and a
* click occurs on this controls element. Actually zooms to the maximum
* extent of this controls map.
*/ */
trigger: function() { trigger: function() {
if (this.map) { if (this.map) {