amitengg26 / PanomNom.js

Panorama fetching tools in JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PanomNom.js

Panorama fetching tools for JavaScript

Current supported sources

  • Google Street View panoramas
  • Google PhotoSpheres

Upcoming sources

  • Yandex Street View
  • Bing StreetSide

###How to use

Include the library.

<script src="PanomNom.min.js"></script>

Create a loader. There's two loaders, one for Street View panoramas and the other for PhotoSpheres:

var loader = new PANOMNOM.GoogleStreetViewLoader();
var loader = new PANOMNOM.GooglePhotoSphereLoader();

Attach onLoad event listener (there's also progress and error):

loader.addEventListener( 'load', function() {
    // Do whatever with this.canvas
} );

Start loading the panorama. There's several methods:

/* Load from ID: pano id, zoom 3 */
loader.load( panoId, 3 );

/* Load from location: google.maps.LatLng, zoom default 1 */
loader.loadFromLocation( panoLatLng ); 

/* Load from URL: URL from maps.google.com, zoom 2 */
loader.loadFromURL( panoURL, 2 );

Note: loader.loadFromLocation is only available for PANOMNOM.GoogleStreetViewLoader

Please see the examples folder for proper implementations of each case.

#License

MIT licensed

Copyright (C) 2014 Jaume Sanchez Elias http://twitter.com/thespite

http://www.clicktorelease.com

About

Panorama fetching tools in JavaScript

License:MIT License


Languages

Language:JavaScript 99.0%Language:Shell 1.0%