Crude spherical photos
This commit is contained in:
18
webgis/js/components/SphericalPhoto.js
Normal file
18
webgis/js/components/SphericalPhoto.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Viewer } from '@photo-sphere-viewer/core';
|
||||
/**
|
||||
* @class SphericalPhoto
|
||||
*/
|
||||
export class SphericalPhoto {
|
||||
basePath = '/webgis/img/spherical';
|
||||
|
||||
/**
|
||||
* @param {string} filename Name of the spherical image
|
||||
*/
|
||||
setViewer(filename) {
|
||||
new Viewer({
|
||||
container: document.querySelector('#pano-viewer'),
|
||||
panorama: `${this.basePath}/${filename}`,
|
||||
defaultZoomLvl: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user