melowntech / vts-browser-js

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

Panning the map via script #168

Closed coyfi closed 5 years ago

coyfi commented 5 years ago

Greetings,

would there be a way to pan the JavaScript VTS map programmatically? With Leaftlet and Google Maps, for example, this can be achieved with their panBy functions. The VTS C++ map has also a "Pan" function as part of its Navigation, but I couldn't find something similar from the JavaScript version. Have I managed to miss it both from the API documentation and code, or is it yet to be implemented? Or would there be there something else that achieves the same functionality?

Thank you.

davidmtech commented 5 years ago

Yes you can pan with position. I have updated documentation.

https://github.com/melowntech/vts-browser-js/wiki/VTS-Browser-Map-API#method-for-panning-position

There is demo: https://jsfiddle.net/0osub138/

coyfi commented 5 years ago

Thank you very much for the quick reply and demo! These solved the issue.