-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multitouch pan and zoom support #59
base: master
Are you sure you want to change the base?
Conversation
touch.map = function(x) { | ||
if (!arguments.length) return map; | ||
map = x; | ||
// TODO remove from old map container? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you should do this. :)
…hough the map itself doesn't seem to change containers corrrectly)
I've fixed both the TODOs that the wheel code had, in both the original wheel function and the copy-paste to touch. As far as the second (container change) TODO that was in Wheel.js, the map itself doesn't seem to switch to a new container properly, so I'm not sure handling it was worth the extra code... |
Please disregard previous patches — the touch branch I started with was many commits behind trunk. Now works with the WebKit bug44083 workaround, and imitates the more recent wheel.map setter (without the TODOs). |
+1 for having this pull request accepted |
Hey @natevw! Thanks for your work. I incorporated pieces of this and Tom's earlier "touch" branch in the latest 2.5.0 release. My implementation is similar to yours, although I decided to limit events to 1 (pan) or 2 (pan+zoom) touches. On the plus side, I added double-tap and rotation support, which is kinda cool. :) Let me know if you want to make any further changes to touch support. |
see https://github.com/simplegeo/polymaps/issues#issue/39
I've ported the requisite code from my OL multitouch handler to Polymaps, and it's working rather well on my first-gen iPad and fourth-gen iPod touch. (Don't know much about what Android browser(s?) support; the webOS browser on my Pre 2 supports neither SVG nor multitouch DOM events.)