Hi Developers,<br><br>I found a little bug in the "Click Event Example" (1). There are two <br>commas (,) misplaced at the end of some object declarations. <br>I guess someone forgot to remove those commas after some <br>
refactoring in the code.<br><br>This is not a problem on good browsers, but unfurtunately, our best <br>friend ever IE simply returns an error on this case.<br><br>The 2 commas that should be removed are indicated in the following <br>
code:<br><pre id="line1"> initialize: function(options) {<br> this.handlerOptions = OpenLayers.Util.extend(<br> {}, this.defaultHandlerOptions<br> );<br>
OpenLayers.Control.prototype.initialize.apply(<br> this, arguments<br> ); <br> this.handler = new OpenLayers.Handler.Click(<br> this, {<br>
'click': this.trigger, <==REMOVE-THIS<br> }, this.handlerOptions<br> );<br> }, <br><br> trigger: function(e) {<br>
var lonlat = map.getLonLatFromViewPortPx(e.xy);<br> alert("You clicked near " + lonlat.lat + " N, " +<br> + lonlat.lon + " E");<br>
}, <==REMOVE-THIS
<br></pre><br>I've opened a new issue for this. The patch is in the tracker (2).<br><br>my best regards,<br><br>Pedro Simonetti.<br><br>(1) <a href="http://openlayers.org/dev/examples/click.html">http://openlayers.org/dev/examples/click.html</a><br>
(2) <a href="http://trac.openlayers.org/ticket/1525">http://trac.openlayers.org/ticket/1525</a><br>