node-google-panorama-equirectangular
v1.0.5
Published
Get google panorama streetview image by id (based on jimp), such google-panorama-equirectangular for node applications
Downloads
7
Maintainers
Readme
NodeGooglePanoramaEquirectangular
Description
Package to bring https://github.com/mattdesl/google-panorama-equirectangular to node
Install
#npm
npm install node-google-panorama-equirectangular --save
#yarn
yarn add node-google-panorama-equirectangular
Basic use
const load = require('node-google-equirectangular')
// Use an id
load('dXZfBMex9_L7jO2JW3FTdA', { zoom: 3 } )
.on('complete', function () {
// everything's finished
})
.on('progress', function (progress) {
console.log(progress + '%')
})
.on('imageready', function (image) {
image.jimpImage.write(image.id + '.jpg')
})
// ...
//use an array of id
load(['dXZfBMex9_L7jO2JW3FTdA', 'dXZfBMex9_L7jO2JW3FTdA'], { zoom: 4 })
.on('complete', function () {
// everything's finished
})
.on('progress', function (progress) {
console.log(progress + '%')
})
.on('imageready', function (image) {
image.jimpImage.write(image.id + '.jpg')
})