google-panorama-tiles
Normalizes tile data for Google Street View tiles, typically used for "quilting" or stitching it into a single equirectangular image.
Kudos to @thespite and PanomNom.js, which was used as reference here.
Example
Here is an example using google-panorama-by-location to get the StreetView data.
var normalize = var panorama = var zoom = 1var location = 5150700703827454 -012791916931155356
Usage
data = normalize(zoom, [tiles])
Gets StreetView tiling data from the given zoom
level (0, 1, 2, etc) and optional tiles
data.
The tiles
are the result of a getPanoramaByLocation
or getPanoramaById
call, and contain { tileSize, worldSize }
dimensions.
If they are not specified, the resulting data will be approximated by assuming the panorama is a StreetView. However, passing tiles
is recommended to support PhotoSphere imagery.
The returned data has the form:
columns: Number rows: Number tileWidth: Number tileHeight: Number width: Number height: Number
See Also
License
MIT, see LICENSE.md for details.