Google Street View Panorama Util
Switch branches/tags
Nothing to show
Clone or download
konforti Merge pull request #3 from juampi92/master
Autocompose toggle feature, Prototypal PanoLoader
Latest commit 4314d5e Sep 28, 2015

GSVPano - Google Street View Panorama lib

Build Status

Library to help requesting and stitching Google Street View panoramas.

Given a Google Maps Location, this library downloads each part of the corresponding panorama, and gives you the complete image ready to use.

Simple Example

// Create a PanoLoader object
var loader = new GSVPANO.PanoLoader({
	zoom: 3

// Implement the onPanoramaLoad handler
loader.on('panorama.load', function(panorama) {
	// panorama will now be loaded

  // for individual progress
  panorama.on('progress', changeProgress); 
  // for individual complete callback
  panorama.on('complete', completeCallback);

// Invoke the load method with a LatLng point
loader.load( new google.maps.LatLng( 42.216188,-75.726578 ) );



Remember that you'll need google.maps API, so don't forget this script tag.

<script src=""></script>
Github CDN
<script src="//"></script>

Or you can just use it with a specific version:

<script src="//"></script>
$ bower install GSVPano
$ npm install gsvpano

And you can require the source files and compile it using browserify

API Reference

  • ( pano ) When a new panorama has been added and its about to start downloading
  • panorama.nodata ( location, status ) When the location had trouble fetching the panorama
  • panorama.progress ( p , pano ) Shows the panorama load progress
  • panorama.load ( pano ) When the panorama has finished loading
  • error ( message ) When the panorama has finished loading
loader.on('', function(pano) { 
	console.log('Panorama ' + + ' has been added');
  • on ( eventName, callback ) EventEmitter inheritance
  • load ( location ) Starts the load of the panorama on that location
  • setZoom ( z ) Sets the zoom
Read the Documentation for more detail


First, do

	$ npm install
	$ npm install -g grunt-cli

to get all the dependencies.

$ grunt build

lints the project, browserifies it, minifies it and builds the documentation also.

If you just wanna build it with browserify, use

$ grunt watch

that will watchify the src/ folder.

Forks, pull requests and code critiques are welcome!


MIT License (MIT)