ZoomOut.js 939 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for
  2. * full list of contributors). Published under the Clear BSD license.
  3. * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  4. * full text of the license. */
  5. /**
  6. * @requires OpenLayers/Control.js
  7. */
  8. /**
  9. * Class: OpenLayers.Control.ZoomOut
  10. * The ZoomOut control is a button to decrease the zoom level of a map.
  11. *
  12. * Inherits from:
  13. * - <OpenLayers.Control>
  14. */
  15. OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, {
  16. /**
  17. * Property: type
  18. * {String} The type of <OpenLayers.Control> -- When added to a
  19. * <Control.Panel>, 'type' is used by the panel to determine how to
  20. * handle our events.
  21. */
  22. type: OpenLayers.Control.TYPE_BUTTON,
  23. /**
  24. * Method: trigger
  25. */
  26. trigger: function(){
  27. this.map.zoomOut();
  28. },
  29. CLASS_NAME: "OpenLayers.Control.ZoomOut"
  30. });