On Fri, Apr 18, 2008 at 8:47 PM, Yingqi <[EMAIL PROTECTED]> wrote:
>
>  All,
>
>  Using OL 2.5, I would like to write a Control inherit from
>  OpenLayers.Control and register the dblclick but I can not get it work. When
>  I double-click the map the callback method for dblclick never get called. So
>  just wonder if I did anything wrong. Here is initialize code of the control
>
>  initialize: function(layer, options) {
>         OpenLayers.Control.prototype.initialize.apply(this, [options]);
>         this.handler = new OpenLayers.Handler.Point(
>                 this,
>             {dblclick: this.reverseGeocode}
>         );
>        this.handler.activate();
>  }

You should use the click handler as opposed to the point handler. See
<http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Handler/Click-js.html>

Cheers,

--
Eric
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to