[Geomoose-users] GeoMoose 2.9 popups on touch

James Klassen klassen.js at gmail.com
Fri Sep 22 15:57:40 PDT 2017


I doubt there is a wide audience for this, but I thought I'd share in case
someone else needs it.

Against my better judgment I added a hack [1] to OpenLayers 2.13.1 to allow
GeoMoose 2.9.x popups behave a little better on touch screens.  It
essentially shortcuts the OpenLayers Hover control and makes it respond to
touch events as if they were hover (really no mouse movement for awhile)
events by more or less merging the touch part of the Click handler with the
Hover handler.

It shouldn't change anything for mouse environments and it is still a bit
fiddly in touch environments (the user needs to turn on the Popup tool
immediately before trying to use popups for it to recognize the touch
events), but it at least gives a route where touch users can activate
popups.

Warning:  Use at your own risk. This is ugly, real ugly. It certainly isn't
the "right" way to do this. It probably breaks stuff (particularly
non-GeoMoose apps) in both spectacular and subtle ways that I can't begin
to imagine.  But it seems to work with GeoMoose as far as I need it to, so
far anyway.

[1] https://github.com/klassenjs/openlayers2/commit/
3cb2e53815b5e0a510165e5f879afdeb09b0a776
<https://github.com/klassenjs/openlayers2/commit/3cb2e53815b5e0a510165e5f879afdeb09b0a776>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20170922/5561ea5d/attachment.html>


More information about the Geomoose-users mailing list