<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sorry, my thread appears to have been quickly hijacked.<br>Is there any interest in getting the multitouch-oriented improvements described and demonstrated below into trunk?<br><br>thanks,<br>-natevw<br><a href="http://calftrail.com/">http://calftrail.com</a><br><br><br><br><br>On May 4, 2010, at 3:00 PM, Nathan Vander Wilt wrote:<br><blockquote type="cite">Hello all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have created a number of patches to OpenLayers around the overall goal of having it work well in iPhone/iPad's Mobile Safari (and preliminary testing in Android). While there are still a few remaining issues on my own TODO list, I'd appreciate some code review/advice for potential integration of these contributions with trunk at some point.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Here's what I've done:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">=== SCROLL WHEEL TWEAKS ===<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Some modifications to OpenLayers.Handler.MouseWheel.prototype.wheelZoom to only respond to vertical zoom events. (Not directly related to multitouch, but was bothering me while I tested on the desktop.)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Reverted OpenLayers.Control.Navigation.prototype.wheelChange back to 2.8 so it once again allows fractional zoom (and modified .wheelUp/.wheelDown to pass original fractional delta).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">=== MULTITOUCH CONTROLS ===<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Made an OpenLayers.Handler.Multitouch that mimics Handler.Drag to work for OpenLayers.Control.MultitouchNavigation. This latter is a simple subclass of OpenLayers.Control.DragPan to instantiate the correct handler and to handle the zoom events (simply using OpenLayers.Control.Navigation.wheelChange code in its OpenLayers 2.8 form.)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Some previous work on this had been done (<a href="http://trac.openlayers.org/ticket/1994">http://trac.openlayers.org/ticket/1994</a>), but I wanted to do it in less code in a way that was more compatible with the existing mouse controls/handlers.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">=== New Tile layer ===<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is the big one, but also most likely in need of discussion. With multitouch, the layer needs to follow the fingers in real time, which means the map should support fractional zooming. So I have created an OpenLayers.Layer.Tile subclass of OpenLayers.Layer.HTTPRequest that basically replaces OpenLayers.Layer.Grid, but focuses only on powers-of-two style tilesets.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I initially planned to just modify OpenLayers.Layer.Grid to support the fractional zooming, but their were a number of issues with its architecture (esp. with regard to tile callbacks) that would have basically meant adding a third "mode" to that existing class.&nbsp;<br></blockquote><blockquote type="cite">There was some work done to that effect a while back (<a href="http://trac.openlayers.org/ticket/442">http://trac.openlayers.org/ticket/442</a>) but it was only for animation tweening.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This new layer is designed to rest at any zoom level whatsoever; it will "overzoom" the best available tiles when necessary. It preserves loaded tiles until its replacements from a new zoom level load, although it does not use Tile.Image backbuffer and does some other semi-kludgy things to deal with the OpenLayers.Tile architecture. The callback is tile (z, x, y)-based rather than bounds, so that all a user/subclass typically needs to do is form an appropriate URL string instead of any geometry calculations.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">You can see a demo of all of this working together at&nbsp;<a href="http://calftrail.com/Share/multitouch/">http://calftrail.com/Share/multitouch/</a>&nbsp;(for best results use Safari with a smooth-scrolling mouse/trackpad or on the iPhone/iPad). What I'm wondering is how well this all fits in with OpenLayer's goals and how I can go about getting this contributed and integrated. Would it be best to split each area into its own ticket and attach patches for individual review? Are there upcoming changes on the roadmap that this code should target?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">thanks,<br></blockquote><blockquote type="cite">-natevw<br></blockquote><blockquote type="cite"><a href="http://calftrail.com/">http://calftrail.com</a><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Dev mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br></blockquote><blockquote type="cite"><a href="http://openlayers.org/mailman/listinfo/dev">http://openlayers.org/mailman/listinfo/dev</a><br></blockquote><div><br></div></body></html>