New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ol-street-view

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ol-street-view

Street View implementation for Open Layers

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
167
decreased by-16.08%
Maintainers
1
Weekly downloads
 
Created
Source

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.7"></script>
CSS
<link rel="stylesheet" href="https://unpkg.com/ol-street-view@1.0.7/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

Show Street View mode

Returns void

hideStreetView

Disables Street View mode

Returns void

For Ol5

Options

[interface] - StreetView Options specified when creating an instance

Default values:

{
  apiKey: null,
  size: 'lg',
  resizable: true,
  sizeToggler: true,
  defaultMapSize: 'expanded',
  language: 'en'
}
apiKey

Google Maps Api Key If not provided, the map will be in inverted colors withe the message "For development purposes only"

Type: string

size

Size of the Pegman Control in the map

Type: ("sm" | "md" | "lg")

resizable

To display a handler that enable dragging changing the height of the layout

Type: boolean

sizeToggler

Control displayed once Street View is activated, to allow compact/expand the size of the map

Type: boolean

defaultMapSize

Default size of the map

Type: ("expanded" | "compact")

language

Language support

Type: ("es" | "en")

Todo

  • Find the argument in the XYZ request that enables the Photo Spheres in the map
  • Add resizable screen option
  • Add feedback support when element can't be dropped
  • Add extra layout (vertical)
  • Add size toggler

License

MIT (c) Gastón Zalba.

Keywords

FAQs

Package last updated on 16 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc