rexbradford

Clicking markers on iPad

Discussion created by rexbradford on Feb 13, 2012
Latest reply on Feb 14, 2012 by rexbradford
I'm testing a map on the iPad, and almost everything works.  This is developed using regular javascript framework, not the IOS one.

I can pan and zoom the map with my finger, and double-click to zoom in.

But it's very hard to click on a marker to bring up an infowindow.  The first click acts like a hover, bringing up the tooltip.  Then if you click again on the same marker, you get the real "click" event that fires the infowindow.  But if the second click lands on some other marker, you get the hover/tooltip on that instead.  In a crowded area, it becomes almost impossible to get an infowindow to appear.

I understand that a touchscreen has to somehow deal with the fact that hover and click and intertwingled.  But I wanted to know if the above is "as designed and expected", or whether it should be behaving in some better way.

// Code looks something like this (the layer is a Graphics layer):
    layer.dojoLinkonMouseOver = dojo.connect(layer, "onMouseOver", layerUI.tooltipShow);
    layer.dojoLinkonMouseMove = dojo.connect(layer, "onMouseMove", layerUI.tooltipUpdate);
    layer.dojoLinkonMouseOut = dojo.connect(layer, "onMouseOut", layerUI.tooltipClose);
// On iPad, very hard to get the onClick to fire in a crowded area
    layer.dojoLinkonClick = dojo.connect(layer, "onClick", function(evt) {
        layerUI.handleClick(evt);       
    });

Thanks,

Rex Bradford
Direct Relief International

Outcomes