
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
alt-route-labeller
Advanced tools
A library to compute the best position to put labels on multiple routes between two points
A library to compute the best position to put labels on multiple routes between two points.
Depending on your package manager:
npm install --save alt-route-labeller
or
yarn add alt-route-labeller
The lib exposes the getLabelPositions
function.
routes
: the multiple routes to apply the labelling to. Can be expressed as a GeoJSON FeatureCollection, an array of Feature objects, or an array of Geometry objects.An array of label positions, one for each of the routes, in the same order as they where passed to the function.
Each label position has the following properties:
lngLat
: the best position of the label on the route, put on a non-ambiguous section not shared with other routes (if one can be found, otherwise fallback on the route middle position).anchor
: a hint value to minimize collisions if we want to display labels. Possible values: top
|bottom
|left
|right
. Inspired by the anchor
property of MapBox-GL-JS markers.import { getLabelPositions } from 'alt-route-labeller';
const routes = getGeoJSONRoutesFromSomewhere();
const labels = getLabelPositions(routes);
labels.forEach(label => {
createMarkerOnMap(label.lngLat, { anchor: label.anchor });
});
FAQs
A library to compute the best position to put labels on multiple routes between two points
We found that alt-route-labeller 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.