npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gsvpano

v1.2.0

Published

Google Street View Panorama Util

Downloads

10

Readme

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 ) );

Installation

Dependencies:

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

<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
Github CDN
<script src="//juampi92.github.io/GSVPano/build/GSVPano.min.js"></script>

Or you can just use it with a specific version:

<script src="//juampi92.github.io/GSVPano/build/GSVPano-1.0.0.min.js"></script>
Bower
$ bower install GSVPano
npm
$ npm install gsvpano

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

API Reference

Events
  • panorama.data ( 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('panorama.data', function(pano) { 
	console.log('Panorama ' + pano.id + ' has been added');
});
Methods
  • 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

Contribute

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!

License

MIT License (MIT)