Closed jrjdavidson closed 3 years ago
There is a function for saving screen shots:
renderer.saveScreenshot(output, filename, filetype);
e.g: renderer.saveScreenshot('file', 'screenshot.png', 'png');
But important prerequisite is to initialize browser with browser option rendererAllowScreenshots : true
. This option sets WebGL into mode where WebGL screen pixels are accessible. Otherwise you will receive empty screenshot. This option can lead to worse performance so it is not enabled by default.
https://github.com/melowntech/vts-browser-js/wiki/VTS-Browser-API#advanced-options
Works great, thanks!
I noticed there is a function to generate a screenshot(shift+p in inspector) .. I want to add a button that will save a screenshot of the map and all the geodata on top. Any chance you can point me in the right direction?
thanks