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

Unable to zoom map if webpage is user-scalable #4015

Closed
IvanSanchez opened this issue Jan 19, 2017 · 2 comments
Closed

Unable to zoom map if webpage is user-scalable #4015

IvanSanchez opened this issue Jan 19, 2017 · 2 comments

Comments

@IvanSanchez
Copy link
Contributor

Steps to reproduce:

Also:

  • Try panning the map vertically
  • The map viewport will always display the same area, it will be impossible to pan the map to show something north or south of the initial view bbox.

Reproducible (at least) with chrome 55 on android and mapbox-gl-js v0.31.0.

The obvious workaround is to include a <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> tag in the <head> of the page, but some web authors (me included) will need to add maps to user-scalable pages.

I suggest applying the same behaviour as in Leaflet/Leaflet#4552 : apply a touch-action CSS property to the map, but only if the map is interactive. Or rather, only if the TouchZoomRotateHandler or the DragPanHandler are enabled, as appropriate.

@jdfx
Copy link

jdfx commented Feb 23, 2017

I am having the exact same issue, however this is not a problem on all mobiles.

Furthermore adding user-scalable=no does not fix my problem.

@jfirebaugh
Copy link
Contributor

#4259

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

No branches or pull requests

3 participants