Skip to content
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

[wip] Mobile touch events #949

Merged
merged 7 commits into from
Jun 12, 2015
Merged

[wip] Mobile touch events #949

merged 7 commits into from
Jun 12, 2015

Conversation

edenh
Copy link
Contributor

@edenh edenh commented Jan 22, 2015

Previously #749.

A work in progress, resolves #657. Rendering is pretty funny though #750.

  • panning
  • pinch zoom
  • pinch rotate
  • panning while pinch-zooming
  • double tap
  • add tests for updated easeTo

@edenh edenh changed the title Touch Mobile touch events Jan 22, 2015
@edenh edenh mentioned this pull request Jan 22, 2015
6 tasks
@jfirebaugh jfirebaugh modified the milestone: v0.6.0 Jan 22, 2015
@alakra
Copy link

alakra commented Feb 3, 2015

Looking forward to this functionality. Thanks for doing this!

@madjam002
Copy link

I gave this a try on my single page app, it works really well apart from one problem I seemed to be having.
The map I was using it on covered the whole page, but when I called map.remove(), I couldn't scroll on any other page on my app even though the map was no longer visible and the map DOM element had been removed. Maybe the touch events aren't being unregistered?

@jfirebaugh jfirebaugh modified the milestone: v0.6.0 Feb 10, 2015
@1ec5
Copy link
Contributor

1ec5 commented May 11, 2015

Might be worth ensuring that how the map responds to touch gestures matches what’s been implemented in Mapbox GL for iOS and Android (mapbox/mapbox-gl-native#1292, mapbox/mapbox-gl-native#553).

@blq
Copy link

blq commented May 22, 2015

What's the status of touch for the web version?
I don't get any touch response in Chrome on Sony Z3 or HTC One M8 for example :(

var zoom = map.transform.scaleZoom(startScale * e.scale),
bearing = startBearing + e.bearing;

map.easeTo(null, zoom, bearing, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use undefined here instead of having add the null check on the other side?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1215 removes the need for null or undefined positional arguments.

@tmcw tmcw changed the title Mobile touch events [wip] Mobile touch events May 26, 2015
@vespakoen
Copy link

Hey guys,

Thanks for this! I am able to use mapbox-gl-js on my android phone now because of your great work!

I merged the latest master branch into the touch branch, and only had to change a couple of things afterwards to make it work again (at least on my Samsung Galaxy Mini S4)

I have published it here: https://github.com/trappsnl/mapbox-gl-js/tree/touch

Not sure if I should make a new pull request now? or I guess @edenh can merge my changes into this one?

Anyways, I'll try to help as much as I can for Android support, and have some more devices where I will test this on.

@stepankuzmin
Copy link
Contributor

+1 for this. I'm using https://mapbox.s3.amazonaws.com/mapbox-gl-js/master/mapbox-gl-dev.js but touch events still not working (iPhone 5s with iOS 8, Safari, Chrome).

@mourner
Copy link
Member

mourner commented Jun 5, 2015

I'll look into finishing and merging this early next week.
@vespakoen thanks for the help!

@mourner mourner self-assigned this Jun 11, 2015
@mourner mourner force-pushed the touch branch 3 times, most recently from 6b7d4ab to 057d4ab Compare June 11, 2015 16:13
@jfirebaugh jfirebaugh added this to the 0.8 milestone Jun 11, 2015
@mourner
Copy link
Member

mourner commented Jun 12, 2015

Currently broken because of #1268

@mourner mourner merged commit 1d03d91 into master Jun 12, 2015
@mourner mourner deleted the touch branch June 12, 2015 16:48
@mourner
Copy link
Member

mourner commented Jun 12, 2015

Will handle subsequent improvements in further commits.

@vespakoen
Copy link

👍 Awesome!! Thanks a lot!

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

Successfully merging this pull request may close these issues.

Support touch events on mobile
10 participants