Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Basic popup overlay for an 'ol' map. By default the map is centred so that the popup is entirely visible.
Compatible with OpenLayers version 5, 6, 7, 8 and 9 (see note in Install - Parcel,
Webpack etc. regarding installing the appropriate version
of ol-popup
for OpenLayers).
The examples demonstrate usage and can be viewed online thanks to raw.githack.com:
ol
package and a module bundler such as Vite, Parcel, Webpack etc. see ol-popup sandbox.The source for all examples can be found in examples.
Load ol-popup.js
after OpenLayers. The popup overlay is available as Popup
or ol.Overlay.Popup
.
<script src="https://unpkg.com/ol-popup@latest/dist/ol-popup.js"></script>
<link rel="stylesheet" href="https://unpkg.com/ol-popup@latest/dist/ol-popup.css" />
NPM package: ol-popup.
Install the package via npm
npm install ol-popup --save
:warning: If you're using the ol
package prior to v5 you'll need to install ol-popup@v3.0.0
.
The CSS file ol-popup.css
can be found in ./node_modules/ol-popup/src
Extends Overlay
OpenLayers Popup Overlay. See the examples for usage. Styling can be done via CSS.
opt_options
ol_Overlay_Options? OpenLayers Overlay options,
defaults to {autoPan: {animation: {duration: 250}}}
Show the popup.
coord
ol_coordinate_Coordinate Where to anchor the popup.html
(String | HTMLElement) String or element of HTML to display within the popup.Returns Popup The Popup instance
Hide the popup.
Returns Popup The Popup instance
Indicates if the popup is in open state
Returns Boolean Whether the popup instance is open
Contributions are welcome, please create an issue first to discuss any potential contributions.
The API section of the README.md
is generated from the JSDoc comments in the source code. To update the API docs edit the comments in the code then run:
npm run doc
In order to use the doc
npm script you will need to install the devDependencies
:
npm install --only=dev
MIT (c) Matt Walker.
Based on an example by Tim Schaub posted on the OL3-Dev list.
If you find the popup useful you might also like the ol-layerswitcher.
FAQs
Popup overlay for OpenLayers
We found that ol-popup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.