Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Panode

A NodeJS module to generate Google Streetview Panoramas for a given lat / lon, using Hugin.

Panoramas

Example 1 Example 2 Example 3

Installation

We depend on the crossplatform Hugin command line software, which you can find here.

Make sure you add the paths to your environment, so node can find it. On my Mac I had to add the following to my environment variables:

export PATH=$PATH:/Applications/Hugin/HuginTools
export PATH=$PATH:/Applications/Hugin/Hugin.app/Contents/MacOS

Next, simply install the NPM module:

npm install panode

Example usage

Let's say you geocoded an address to a lat / lon coordinate. To generate a streetview panorama for it, simply do:

var pano = require('./panode');

var myPano = pano.generate({
	lat: '52.347358',
	lng: '4.847041',
	outputLocation: __dirname + '/panorama.jpg'
}, function() {
	console.log("Panorama saved, do something else");
});

Options

If you don't specifiy the outputLocation it will save per default to `panorama.jpg'

If you want to use a Google API Key (and you do, if you plan to use the streetview api extensively), you can pass it to the generate function as well:

var pano = require('./panode');

var myPano = pano.generate({
	lat: '52.347358',
	lng: '4.847041',
	apiKey: 'yOuR_UnIqUe_kEy' // Like so
}, function() {
	console.log("Panorama saved, do something else");
});

About

Generate Google Streetview Panoramas for a given lat / lon

Resources

Stars

8 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages