Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goto-bus-stop/street-view-embed-url
Get a URL to the street view image currently shown in a street view embed, with matching heading and zoom
https://github.com/goto-bus-stop/street-view-embed-url
Last synced: about 22 hours ago
JSON representation
Get a URL to the street view image currently shown in a street view embed, with matching heading and zoom
- Host: GitHub
- URL: https://github.com/goto-bus-stop/street-view-embed-url
- Owner: goto-bus-stop
- License: mit
- Created: 2022-08-13T14:01:52.000Z (over 2 years ago)
- Default Branch: default
- Last Pushed: 2022-08-13T14:30:18.000Z (over 2 years ago)
- Last Synced: 2024-10-24T16:25:31.295Z (21 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# street-view-embed-url
Get a [URL](https://developers.google.com/maps/documentation/urls/get-started#street-view-action)
to the street view image currently shown in a street view embed, with matching heading and zoom.[![npm][npm-image]][npm-url]
[![github][github-image]][github-url]
[![standard][standard-image]][standard-url][npm-image]: https://img.shields.io/npm/v/street-view-embed-url.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/street-view-embed-url
[github-image]: https://github.com/goto-bus-stop/street-view-embed-url/workflows/Node%20CI/badge.svg
[github-url]: https://github.com/goto-bus-stop/street-view-embed-url/actions
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard## Install
```
npm install street-view-embed-url
```## Usage
```js
import getStreetViewUrl from 'street-view-embed-url'const url = getStreetViewUrl(streetView)
// → "https://www.google.com/maps/@?api=1&map_action=pano&pano=4DlwePXzmIn0wVOUpVj2og&viewpoint=37.78229489108098%2C-122.3910949675839&heading=264.5694516879916&pitch=11.234184088912102&fov=133.163577613723"
```It returns a `URL` object.
## License
[MIT](LICENSE.md)