Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Touchmove binding gets triggered if touching outside of map container #83

Open
kjaebker opened this Issue May 27, 2011 · 0 comments

Comments

Projects
None yet
1 participant

The touchmove binding is currently assigned to the window and gets triggered if a user is touching outside of the map container. This causes a javascript error because a location cannot be calculated. I think I have fixed this by binding the touchmove event to the container instead of the window. Here are the changes I made:

1871c1873
<   window.addEventListener("touchmove", touchmove, false);

---
>   //window.addEventListener("touchmove", touchmove, false);
1930a1933
>       container.removeEventListener("touchmove", touchmove, false);
1935a1939
>       container.addEventListener("touchmove", touchmove, false);

I've tested this out on the latest iOS and it didn't throw anymore errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment