On Mon, Sep 10, 2012 at 1:38 PM, Puneet Kishor <[email protected]> wrote:
> In OL 2.11 I used to do the following successfully
>
> map.events.register(
> "click",
> map,
> function(e) {
> fancyFunction({evt: e, other_params: "foo"});
> }
> );
>
> The above has stopped working in Firefox (currently using FF v. 15.0.1)
> without any errors. It does work in Safari 6, but gives the following warning
> in the console.log
>
>> event.layerX and event.layerY are broken and deprecated in WebKit. They will
>> be removed from the engine in the near future.
>
> Suggestions to fix both problems would be welcomed with thanks.
I believe the correct way to register a click handler is something like:
var click = new OpenLayers.Control.Click( {
trigger: function(e) {
/* do stuff */
}
});
map.addControl(click);
click.activate();
--
Richard Greenwood
[email protected]
www.greenwoodmap.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users