ZoomOut.js 732 B

1234567891011121314151617181920212223242526272829
  1. /* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
  2. * full list of contributors). Published under the 2-clause BSD license.
  3. * See license.txt in the OpenLayers distribution or repository for the
  4. * full text of the license. */
  5. /**
  6. * @requires OpenLayers/Control/Button.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.Button, {
  16. /**
  17. * Method: trigger
  18. */
  19. trigger: function(){
  20. if (this.map) {
  21. this.map.zoomOut();
  22. }
  23. },
  24. CLASS_NAME: "OpenLayers.Control.ZoomOut"
  25. });