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 compass interactivity for interactive: false maps #8618

Open
pathmapper opened this issue Aug 10, 2019 · 4 comments
Open

Disable compass interactivity for interactive: false maps #8618

pathmapper opened this issue Aug 10, 2019 · 4 comments

Comments

@pathmapper
Copy link
Contributor

pathmapper commented Aug 10, 2019

mapbox-gl-js version: v1.2.1

browser: Chrome/Firefox, likely any

Steps to Trigger Behavior

https://docs.mapbox.com/mapbox-gl-js/example/animate-camera-around-point/ with
interactive: false and

map.addControl(new mapboxgl.NavigationControl({
  visualizePitch: true,
  showZoom: false
}));

Link to Demonstration

https://jsbin.com/yatuvegeti/1/edit?html,output

Expected Behavior

It's not possible for the user to interrupt/alter the animation. Also the compass tooltip Reset bearing to north should not be displayed.

Actual Behavior

It's possible to rotate / tilt the map dragging the compass icon and the tooltip is displayed.


One could argue that this is not a bug, because the compass is a navigation control. In this case it would be appreciated if this issue would be considered as feature request. It would be useful to be able to use the compass for indicating bearing/pitch while animating the camera and the user is not able to interrupt/alter the animation.

@peterqliu
Copy link
Contributor

I'm unclear about what this issue is requesting.

It would be useful to be able to use the compass for indicating bearing/pitch while animating the camera and the user is not able to interrupt/alter the animation.

This is the current behavior.

One could argue that this is not a bug, because the compass is a navigation control.

Agree, preserving compass functionality despite interactive: false is intentional.

@pathmapper
Copy link
Contributor Author

This is the current behavior.

Don't think so. Currently it is possible for the user to interupt/alter the animation via the compass icon (gif from the demonstration linked above):

compass_interrupt_animation

I'm unclear about what this issue is requesting.

Show the compass while animating the camera and this animation cannot be interrupted/altered by the user. Hope it is clearer now.

@peterqliu
Copy link
Contributor

Hope it is clearer now.

It's still fairly confusing, but if this is solely about removing compass interactivity when map is interactive: false, then we'll decline for now.

@peterqliu
Copy link
Contributor

Per chat with several other developers, this could be desirable. Reopening

@peterqliu peterqliu reopened this Aug 14, 2019
@peterqliu peterqliu changed the title Possible to rotate / tilt a map with interactive: false via compass icon Disable compass interactivity for interactive: false maps Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants