Last change
on this file since 28897 was 28897, checked in by davidb, 10 years ago |
GUI front-end to server base plus web page content
|
File size:
1.1 KB
|
Line | |
---|
1 | # GSVPano.js - Google Street View Panorama lib
|
---|
2 |
|
---|
3 | Library to help requesting and stitching Google Street View panoramas.
|
---|
4 |
|
---|
5 | You can see it in use in a [WebGL Google Street View Panorama Viewer](http://www.clicktorelease.com/code/street).
|
---|
6 |
|
---|
7 | Forks, pull requests and code critiques are welcome!
|
---|
8 |
|
---|
9 | #### Using the code ####
|
---|
10 |
|
---|
11 | Include GSVPano.[min.]js and Google Maps API lib.
|
---|
12 |
|
---|
13 | The lib uses google.maps.LatLng to specify the location and google.maps.StreetViewService.
|
---|
14 |
|
---|
15 | ```html
|
---|
16 | <script src="GSVPano.min.js"></script>
|
---|
17 | <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
---|
18 | ````
|
---|
19 |
|
---|
20 | Add this basic code:
|
---|
21 |
|
---|
22 | ```js
|
---|
23 | // Create a PanoLoader object
|
---|
24 | var loader = new GSVPANO.PanoLoader();
|
---|
25 |
|
---|
26 | // Implement the onPanoramaLoad handler
|
---|
27 | loader.onPanoramaLoad = function() {
|
---|
28 |
|
---|
29 | /*
|
---|
30 | Do your thing with the panorama:
|
---|
31 | this.canvas: an HTML5 canvas with the texture
|
---|
32 | this.copyright: the copyright of the images
|
---|
33 | */
|
---|
34 |
|
---|
35 | };
|
---|
36 |
|
---|
37 | // Invoke the load method with a LatLng point
|
---|
38 | loader.load( new google.maps.LatLng( 42.216188,-75.72657859999998 ) );
|
---|
39 | ```
|
---|
40 |
|
---|
41 | #### License ####
|
---|
42 |
|
---|
43 | MIT licensed
|
---|
44 |
|
---|
45 | Copyright (C) 2012 Jaume Sanchez Elias, http://www.clicktorelease.com |
---|
Note:
See
TracBrowser
for help on using the repository browser.