[OpenLayers-Users] How can I get a mobile browser to trap a click event like I can for a PC web browser?

Eric Lemoine eric.lemoine at camptocamp.com
Tue Oct 18 14:36:52 EDT 2011


On Tue, Oct 18, 2011 at 5:30 PM, John Mitchell <mitchelljj98 at gmail.com> wrote:
> I tried using the suggested below code but I get an OpenLayers.Control.Click
> is not a constructor error:
>
> var click = new OpenLayers.Control.Click( {
>    trigger: function(e) {
>       // do your thing
>    }
> });
> map.addControl(click);
> click.activate();

There's no click control in OpenLayers. Look at this example
<http://www.openlayers.org/dev/examples/click-handler.html> for how to
build one.


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list