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

Disable image rotation from Mobile Devices #24

Open
biharck opened this issue Apr 1, 2019 · 1 comment
Open

Disable image rotation from Mobile Devices #24

biharck opened this issue Apr 1, 2019 · 1 comment

Comments

@biharck
Copy link
Contributor

biharck commented Apr 1, 2019

The current bootstrap style allows users to pinch zoom and rotate the screen but sometimes is annoying when users are drawing geometric such as Polygons, where the geometry is composed by multiple points and by mistake users, could rotate the screen.

There are some related topics over StackOverflow about the same thing:

const controls = ol.control.defaults({rotate: false}); 
const interactions = ol.interaction.defaults({altShiftDragRotate:false, pinchRotate:false});

const map = new ol.Map {
    controls: controls,
    interactions: interactions
};

and

view: new ol.View({ ... enableRotation: false })

But none of them worked properly.

@biharck
Copy link
Contributor Author

biharck commented Apr 1, 2019

P.S. To emulate the rotation over the laptop you can use alt+shift+mouse action

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

1 participant