melowntech / vts-browser-js

JavaScript WebGL 3D map rendering engine
BSD 2-Clause "Simplified" License
220 stars 42 forks source link

Control over pitch change as you zoom into object? #212

Closed jrjdavidson closed 3 years ago

jrjdavidson commented 3 years ago

Hi,

In this example, as you zoom in the pitch gradually changes to 90. Is there any way to prevent this behaviour? I 'd like to be able to look at the cliff face when zoom in.

cheers

davidmtech commented 3 years ago

You can try constrainCamera : false parameter.

https://jsfiddle.net/2tq7mwud/

or modify source code: https://github.com/melowntech/vts-browser-js/blob/master/src/browser/control-mode/map-observer.js#L448

jrjdavidson commented 3 years ago

That's exactly what I needed thanks! I just re-read my comment and realised i forgot to link the example, sorry