Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
openpanos-client
Advanced tools
OpenPanos is a platform for creating linked, navigable networks of 360 panoramas. This is the Pannellum-based client component. You can use it either with openpanos-server or your own server.
A platform for creating linked, navigable networks of 360 panoramas.
OpenPanos is a platform for creating linked networks of 360 panoramas. It is based on the core engine of OpenTrailView, a project to create 360 tours of paths and trails. It uses various other libraries:
OpenPanos consists of two parts, a client and a server. It is possible to use the client without the server if you provide your own server.
The client (openpanos-client
; this package) is Photo Sphere Viewer and GeoJSON Path Finder-based, and handles displaying and linking the panoramas. By default, the client will work with a given set of API endpoints. However this is configurable and you can connect it to your own PostGIS-based API.
You use the Client
object, which is exported from the openpanos-client
module, e.g.:
// Import the module
const openpanos = require('openpanos-client');
const client = new openpanos.Client();
The Client
object has various methods. Note that many of these rely on a
server-side API being available, see below for details. In particular, to load the panoramas, you must provide a panoImg
API endpoint which serves a given panorama by ID.
Note all methods are asynchronous and thus return a promise, except for the on
event-handling method.
findPanoramaByLonLat(lon, lat)
: finds and loads the nearest panorama
to a given latitude and longitude.
nearest
API endpoint setup, to find the nearest panorama server-side.loadPanorama(id)
- will load a given panorama by ID.
byID
API endpoint setup, to find the panorama with that ID.moveTo(id)
- moves to an already-loaded panorama with a given ID. DEPRECATED - as of 0.2.2, just use loadPanorama()
update(id, properties)
- updates selected metadata of a given panorama
referenced by ID. The properties
parameter is an object containing this
metadata and can contain one or both of the following properties:
position
(a two-member array of longitude and latitude);poseheadingdegrees
(a float, the bearing of the centre point of the panorama).on(eventname, eventhandler)
- handle events with an event handler function.
The events that are currently handled are:
panoChanged
: when the current panorama changes. The ID of the new panorama is passed as an argument to the event handler.locationChanged
: when the current location changes. The new longitude and latitude, respectively, are passed as arguments to the event handler.For OpenPanos to work, you need a server set up which will provide your panorama images, find panorama metadata by ID, find the nearest panorama to a given latitude and longitude, and find panoramas near to the current one.
These endpoints can be specified as options when you create your Client
object:
const Client = new openpanos.Client({
api: {
byId: , // ... returns metadata of a panorama with a given ID
nearest: , // ... finds the nearest panorama to a given lat/lon
panoImg: , // ... returns the actual image of a panorama with a given ID
panoImgResized: , // ... returns the panorama image resized to a given pixel width (optional)
geojson: , // returns GeoJSON of all routes (such as OSM ways) within a given bounding box
nearby: , // returns panoramas near to a given panorama
}
});
Each endpoint is described in detail below, along with its default value. Note that values in braces will be replaced by the code with whatever the current value is.
byId
endpoint (default op/panorama/{id}
) : returns a JSON object with these properties:
id
: the pano IDuserid
: the ID of the user the pano belongs to (optional)authorised
: is the panorama authorised yet? (optional)lon
: the longitudelat
: the latitudeposeheadingdegrees
: the bearing of the centre of the panorama.nearest
endpoint (default op/panorama/nearest/{lon}/{lat]
) : returns a JSON object containing the panorama nearest to the given lon and lat. Returns the same JSON as byID
.
panoImg
endpoint (default op/panorama/{id}.jpg
) : returns the JPEG image of the panorama itself. May contain checks, e.g. has the panorama been authorised yet.
panoImgResized
endpoint (default op/panorama/{id}w{width}.jpg
) : returns the JPEG image of the panorama itself, resized to a given width. Useful for thumbnails and previews. Optional.
geojson
endpoint (default op/map/highways
) : expects one query string parameter bbox
containing w,s,e,n in WGS84 lat/lon. Returns GeoJSON data of all highways (routes, including paths) in the given bounding box, for example OpenStreetMap highways.
nearby
endpoint (default op/panorama/{id}/nearby
} : returns all panoramas nearby to a given source panorama. It's up to you how you define "nearby", but this call is necessary to link panoramas to adjacent ones, so don't set the value too small. It should return a JSON object containing:
panos
: an array of individual panorama objects (see byId
and nearest
above);bbox
: the bounding box of all panoramas returned.FAQs
OpenPanos is a platform for creating linked, navigable networks of 360 panoramas. This is the Pannellum-based client component. You can use it either with openpanos-server or your own server.
We found that openpanos-client demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.