title: OpenLayers adding custom button
body: <p>I'm trying to modify an OpenLayers example to add my custom button but I can't click this button. I've tryied everything but it is as if the click event couldn't be attached to the button....Where is the problem? I'm getting mad. Any help will be appreciated! Here is my code (sorry to post a full example but I can't shorten it):</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;OpenLayers Editing Toolbar Example&lt;/title&gt;
  
          &lt;link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css"&gt;
          &lt;link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css"&gt;
          &lt;style type="text/css"&gt;
          #btnHiLite {  
          top: 50%;
          left: 3%;
          height: 10px;
          z-index: 3000;
  
          background: url('http://s11.postimg.org/s3u0s4pjj/marker.png') no-repeat center;
          padding: 5px 10px;
          -webkit-border-radius: 8px;
          -moz-border-radius: 8px;
          border-radius: 8px;
          -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
          text-shadow: rgba(0,0,0,.4) 0 1px 0;
          color: #9c494e;
          font-size: 12px;
          font-family: Georgia, serif;
          text-decoration: none;
          vertical-align: middle;
      }
          &lt;/style&gt;
  
  
          &lt;script src="http://openlayers.org/api/OpenLayers.js"&gt;&lt;/script&gt;
           &lt;script type="text/javascript"&gt;
              var map, layer;
  
              function rotate_image() {
            alert("Button clicked!");
          }
  
              function init(){
  
          var btnHiLite = new OpenLayers.Control.Button({ 
            title: "click it to rotate image 90º",
            id: 'btnHiLite',
            trigger: rotate_image,
            type: OpenLayers.Control.TYPE_BUTTON
          });   
  
          var graphic = new OpenLayers.Layer.Image(
              'Document Page',
              "http://www.hdwallpapersinn.com/wp-content/uploads/2013/03/landscape_7.jpg",
              new OpenLayers.Bounds(-250, -100, 250, 100),
              new OpenLayers.Size(250, 100)
          );
  
                  map = new OpenLayers.Map( 'map', {
                      controls: [new OpenLayers.Control.PanZoom(), btnHiLite]
                  });
  
                  map.addLayers([graphic]);
                  map.zoomToMaxExtent();
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body onload="init()"&gt;
          &lt;h1 id="title"&gt;Editing Toolbar Example&lt;/h1&gt;
  
          &lt;div id="tags"&gt;
              digitizing, point, line, linestring, polygon, editing
          &lt;/div&gt;
  
          &lt;p id="shortdesc"&gt;
              Demonstrate polygon, polyline and point creation and editing tools.
          &lt;/p&gt;
  
          &lt;div id="panel"&gt;&lt;/div&gt;
          &lt;div id="map" class="smallmap"&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>