OpenLayers Street View
Street View implementation for Open Layers.
Tested with OpenLayers version 5 and 6.
Disclaminer
If you are going to use this module, read the Google Terms of Service
Examples
- Basic usage: create an OpenLayers map instance, and pass that map and options to the Street View constructor.
Install
Browser
JS
Load ol-street-view.js
after OpenLayers and interactjs. StreetView is available as StreetView
.
<script src="https://unpkg.com/ol-street-view@1.0.2"></script>
CSS
<link rel="stylesheet" href="https://unpkg.com/ol-street-view@1.0.2/dist/css/ol-street-view.min.css" />
Parcel, Webpack, etc.
NPM package: ol-street-view.
JS
Install the package via npm
npm install ol-street-view --save-dev
CSS
The CSS files can be found in ./node_modules/ol-street-view/lib
TypeScript type definition
TypeScript types are shipped with the project in the dist directory and should be automatically used in a TypeScript project. Interfaces are provided for Wfst Options.
API
Table of Contents
StreetView
Street View implementation for Open Layers.
Parameters
showStreetView
Returns void
hideStreetView
Returns void
transform =
Options
[interface] - StreetView Options specified when creating an instance
Default values:
{
apiKey: null;
size: 'lg';
language: 'en';
}
Todo
Add resizable screen option- Add feedback support when element can't be dropped
- Add extra layouts
License
MIT (c) Gastón Zalba.