[OpenLayers-Dev] click & pinch overhaul

Bruno Binet bruno.binet at camptocamp.com
Thu Mar 10 04:04:20 EST 2011


On 10 March 2011 01:50, Tim Schaub <tschaub at opengeo.org> wrote:
> On 3/9/11 3:54 PM, Bruno Binet wrote:
>>
>> Great job, thanks for your work on all this!
>> As a general feedback, the pinch and click handlers are now working
>> very well together on my samsung android 2.1 device, and I can now
>> pinch zoom, and zoom out by tapping with two fingers as expected.
>>
>> Btw, a small annoyance remains with the pinch handler while working
>> with the drag handler: if I drag the map with one finger then add a
>> second finger, the pinch handler successfully handles the pinch
>> gestures, but if I lift the second finger off the touchscreen, then I
>> can't drag anymore by keeping the first finger on the screen.
>>
>> That's a minor feature request, and it is even not related to the
>> click handler, so it could deserve a separate ticket if it sounds
>> reasonable to you.
>>
>
> Thanks for taking time to look at this Bruno.  Unless others see it as a
> blocker, I think the issue you mention above should be treated as a separate
> feature.

I agree. Ticket http://trac.osgeo.org/openlayers/ticket/3166

> Tomorrow I'm leaving town for a week+.  I'm hoping to be able to get in
> these changes (and others) before leaving.  I know the change is big, but if
> anybody can review the patch, I'd appreciate it.

I started looking at it yesterday, and I should be able to review it
more closely today.

> http://trac.osgeo.org/openlayers/ticket/3133
>
> Thanks,
> Tim
>
>> On 9 March 2011 08:11, Tim Schaub<tschaub at opengeo.org>  wrote:
>>>
>>> I've updated the sandbox with two changes:
>>>
>>> 1) Double click pixel tolerance is now 13.  This should give fewer
>>> ignored
>>> double clicks.
>>
>> The tests were broken in the sandbox because of the new double click
>> pixel tolerance value. The fix was trivial so I've just fixed the
>> tests in r11687 directly in your sandbox. Hope it's fine for you.
>>
>>> 2) The pinch handler now stops the browser default behavior on handled
>>> touch
>>> move events.  This may stop the page drag on older iOS.
>>>
>>> http://dev.openlayers.org/sandbox/tschaub/click/examples/mobile.html
>>>
>>> I'm still unclear about whether the undesired page dragging only occurs
>>> in
>>> the sandbox example, or whether you also see it on the trunk.
>>>
>>> Thanks for the testing&  feedback.
>>> Tim
>>>
>>> On 3/8/11 2:08 PM, Cédric MOULLET wrote:
>>>>
>>>> Hi Tim,
>>>> It's really a great function, and so fast !!!
>>>> I put two answers inline,
>>>> Cédric
>>>>
>>>> On Tue, Mar 8, 2011 at 8:48 AM, Tim Schaub<tschaub at opengeo.org
>>>> <mailto:tschaub at opengeo.org>>  wrote:
>>>>
>>>>    Thanks for the report Cédric.  Comments below.
>>>>
>>>>
>>>>    On 3/7/11 10:49 AM, Cédric MOULLET wrote:
>>>>
>>>>        Hi Tim,
>>>>
>>>>        Thanks for these improvements. I have tested on several
>>>>        plattforms (see
>>>>
>>>>
>>>>  https://spreadsheets.google.com/ccc?key=0AjTbLQNm01pfdEtUc0FkVm9DYnBtMTNkcWpTemw3T0E&authkey=CJGm_vQF&hl=fr#gid=0
>>>>
>>>>
>>>>  <https://spreadsheets.google.com/ccc?key=0AjTbLQNm01pfdEtUc0FkVm9DYnBtMTNkcWpTemw3T0E&authkey=CJGm_vQF&hl=fr#gid=0>
>>>>
>>>>
>>>>  <https://spreadsheets.google.com/ccc?key=0AjTbLQNm01pfdEtUc0FkVm9DYnBtMTNkcWpTemw3T0E&authkey=CJGm_vQF&hl=fr#gid=0
>>>>
>>>>
>>>>  <https://spreadsheets.google.com/ccc?key=0AjTbLQNm01pfdEtUc0FkVm9DYnBtMTNkcWpTemw3T0E&authkey=CJGm_vQF&hl=fr#gid=0>>).
>>>>        I face the same issues like Steven. In addition, I have observed
>>>> the
>>>>        following things:
>>>>        - iTouch 3.1.3: Pinch Zoom Dragging ->  it moves the browser
>>>>        instead of
>>>>        the map and makes the function ineffective
>>>>
>>>>
>>>>    I also saw the same on an iTouch before upgrading.  But I'm pretty
>>>>    sure I saw it on the trunk (instead of just on this sandbox).  Are
>>>>    you seeing the issue in this sandbox and not on the trunk?  (I've
>>>>    only got access to an upgraded iTouch, and pinch zooming works
>>>> there.)
>>>>
>>>>
>>>> I have tested on your sandbox: Here is a small video that presents the
>>>> issue:
>>>> http://www.youtube.com/watch?v=6VoVKeOy9dg&feature=player_embedded
>>>> <http://www.youtube.com/watch?v=6VoVKeOy9dg&feature=player_embedded>
>>>> (sorry for the quality, but I'm not Spielberg). I can observe that the
>>>> pinch function is working, but the browser window moves. I don't observe
>>>> that on the iPad 4.2. If it's an iOS version issue, I don't think it's
>>>> so important.
>>>>
>>>>
>>>>
>>>>        - Android Nexus S: the double click seems to work a bit better,
>>>>        but has
>>>>        still issues. No idea why (but this is a very empirical
>>>> observation)
>>>>
>>>>
>>>>    Sounds like the 10 pixel tolerance for double clicks may not be
>>>> enough.
>>>>
>>>>    I'd be curious what you see for pixel displacement on typical
>>>>    double-tap sequences (on a touch device).
>>>>
>>>>    http://dev.openlayers.org/sandbox/tschaub/click/examples/dpx.html
>>>>
>>>>
>>>> I have added an average and standard deviation function:
>>>> http://dev.openlayers.org/sandbox/cmoullet/openlayers/examples/dpx.html
>>>>
>>>> iTouch 3.1.3: pair: 30 - avg: 4.2 - std: 3.1
>>>> iPad 4.2: pair 30 - avg 6.7 - std: 2.5
>>>> Android Nexus S: pair 30 - avg: 8.3 - std: 4.5
>>>>
>>>> These are of course very empirical results, but it seems that I'm less
>>>> precise on an Android nexus S. So the tolerance should be a bit bigger.
>>>
>>>
>>> --
>>> Tim Schaub
>>> OpenGeo - http://opengeo.org
>>> Expert service straight from the developers.
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>>>
>>
>>
>>
>
>
> --
> Tim Schaub
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>



-- 
Bruno Binet

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

Mail : bruno.binet at camptocamp.com
http://www.camptocamp.com


More information about the Dev mailing list