Mapbox-gl-js: ui for changing pitch

Created on 6 Mar 2015  路  8Comments  路  Source: mapbox/mapbox-gl-js

How can a user change the pitch of a map? A button? or mouse action?

feature

Most helpful comment

We should support two finger swipe up/down for adjusting pitch, this has become a standard.

touch_zoom_rotate_pitch?

We really should just name that handler touch.

All 8 comments

One vote for a button, at least at first, for normal pitch and some nice 45掳 or something.

My first instinct is shift + left click drag to tilt up and down, and a button to restore to a full 90 degrees.

How would we handle touchscreens?

On second thought, we already rotate around the Z axis with right-click and drag.

Let's make the right mouse button the center of all rotations: drag to rotate around Z axis, shift-drag to rotate around the X axis (adjusting pitch).

Hi guys, i wanted a way to illustrate the pitch change, so I went ahead and made a (rater rudimentary) button added to the navigation control, inspired by Google Earth, If it's of any interest check out https://github.com/Norkart/mapbox-gl-js/tree/tilt-control2 and let me know if you want a pull request on this

We should support two finger swipe up/down for adjusting pitch, this has become a standard.

touch_zoom_rotate_pitch?

We really should just name that handler touch.

We have a keyboard shortcut for changing pitch. If we decide to add additional interactions or a UI element, let's ticket out that separately.

@bhousel Did your suggestion of "two finger swipe up/down for adjusting pitch" ever make it live? I do not see an easy way to tilt the map on mapboxgl-js mobile. Is there a way to tilt using finger gestures?

Sorry @fedex1 - I am not working on mapbox-gl-js these days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

foundryspatial-duncan picture foundryspatial-duncan  路  3Comments

aendrew picture aendrew  路  3Comments

jfirebaugh picture jfirebaugh  路  3Comments

aaronlidman picture aaronlidman  路  3Comments

yoursweater picture yoursweater  路  3Comments