OpenLayers LayerSwitcher Control acts weird on Android

المشرف العام

Administrator
طاقم الإدارة
I built up an OpenLayers Map with a layer switcher and some other controls. For most of the controls I wrote handler which make use of touch-events. Now the default OpenLayers.Control.LayerSwitcher kind of works on my Android tablet, BUT only if I press the chosen layer really quick and precisely. (it seems like if I enter the 'touchmove' of something the switcher does not appreciate the input)


  • I enlarged the control successfully via css, so the Layers are written really big now and also the panel is huge.
  • Also I successfully disabled the currently activated map tool (its a navigation/pan tool) on the touchstart event of the layerswitcher, and reactivate it on the touchend event of the layerswitcher.
As I said, it just works not really well. When I put the finger on it, and drive around with my finger over the map, it doesn't move around any more -> so I know, that the tool in fact is deactivated.

My questions:


  • Do controls which are not activated in the toolbar also catch events in my kind of case here?
  • Is there a specific LayerSwitcher which is optimized for touch (didn't find any)?
  • Does anybody know a trick to make that work more smoothly, a workaround or such? (Please not a layerswitcher outside the map..)
thanks in advance, best regards, Stephan



أكثر...
 
أعلى