Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ol-street-view
Advanced tools
Street View implementation for Open Layers.
Tested with OpenLayers version 5 and 6. For Ol5, you must set a custom "target" to prevent the control from being rendered at the default target ("ol-overlaycontainer-stopevent"), because that messes up the events and breaks the control.
If you are going to use this module, read the Google Terms of Service
Load ol-street-view.js
after OpenLayers and interactjs. StreetView is available as StreetView
.
<script src="https://unpkg.com/ol-street-view@1.1.2"></script>
<link rel="stylesheet" href="https://unpkg.com/ol-street-view@1.1.2/dist/css/ol-street-view.min.css" />
NPM package: ol-street-view.
Install the package via npm
npm install ol-street-view --save-dev
The CSS files can be found in ./node_modules/ol-street-view/lib
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.
Street View implementation for Open Layers.
map
PluggableMap Instance of the created mapopt_options
Options? StreetView options, see StreetView Options for more details.Show Street View mode
Returns void
Disables Street View mode
Returns void
[interface] - StreetView Options specified when creating an instance
Default values:
{
apiKey: null,
size: 'lg',
resizable: true,
sizeToggler: true,
defaultMapSize: 'expanded',
language: 'en',
i18n: {...} // Translations according to selected language
}
Google Maps Api Key If not provided, the map will be in inverted colors withe the message "For development purposes only"
Type: string
Size of the Pegman Control in the map
Type: ("sm"
| "md"
| "lg"
)
To display a handler that enable dragging changing the height of the layout
Type: boolean
Control displayed once Street View is activated, to allow compact/expand the size of the map
Type: boolean
Default size of the map
Type: ("expanded"
| "compact"
)
Specify a target if you want the control to be rendered outside of the map's viewport. For Ol5, you must set a target to prevent the control from being rendered at the default target ("ol-overlaycontainer-stopevent"), otherwise the control will not work.
Type: (HTMLElement | string)
Language support
Type: ("es"
| "en"
)
Add custom translations
Type: i18n
MIT (c) Gastón Zalba.
v1.1.2
FAQs
Street View implementation for Open Layers
The npm package ol-street-view receives a total of 157 weekly downloads. As such, ol-street-view popularity was classified as not popular.
We found that ol-street-view demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.