You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the API docs it says:
"Options common to Map#jumpTo, Map#easeTo, and Map#flyTo, controlling the destination location, zoom level, bearing and pitch."
I tried setting pitch from within flyTo but it does not work (it flies fine but without pitch). This is the code:
var isAtStart = true;
function fly() {
// depending on whether we're currently at point a or b, aim for
// point a or b
var target = isAtStart ? end : start;
// and now we're at the opposite point
isAtStart = !isAtStart;
map.flyTo({
// These options control the ending camera position: centered at
// the target, at zoom level 15, and north up.
center: target,
zoom: 19,
bearing: 0, // Map rotation bearing in degrees counter-clockwise from north
pitch: 110, // Angle of cameraview
// These options control the flight curve, making it move
// slowly and zoom out almost completely before starting
// to pan.
speed: 0.9, // speed of flying
curve: 1.1, // curve of zoom
// This can be any easing function: it takes a number between
// 0 and 1 and returns another number between 0 and 1.
easing: function (t) {
return t;
}
});
}
Furthermore, I set pitch and flyto up under a two separate clickable buttons and then both work (can fly with a pitch). When I run my pitchfunction without clicking it also works. However running in a script Pitch() and then flyTo(), it ignores Pitch() and starts flying without pitch.
The text was updated successfully, but these errors were encountered:
In the API docs it says:
"Options common to Map#jumpTo, Map#easeTo, and Map#flyTo, controlling the destination location, zoom level, bearing and pitch."
I tried setting pitch from within flyTo but it does not work (it flies fine but without pitch). This is the code:
Furthermore, I set pitch and flyto up under a two separate clickable buttons and then both work (can fly with a pitch). When I run my pitchfunction without clicking it also works. However running in a script Pitch() and then flyTo(), it ignores Pitch() and starts flying without pitch.
The text was updated successfully, but these errors were encountered: