Gathering detailed insights and metrics for react-mapbox-gl-spiderifier
Gathering detailed insights and metrics for react-mapbox-gl-spiderifier
Gathering detailed insights and metrics for react-mapbox-gl-spiderifier
Gathering detailed insights and metrics for react-mapbox-gl-spiderifier
npm install react-mapbox-gl-spiderifier
Typescript
Module System
Node Version
NPM Version
48.6
Supply Chain
88.1
Quality
69.4
Maintenance
100
Vulnerability
91.9
License
JavaScript (85.77%)
CSS (8.21%)
HTML (6.02%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
124 Commits
5 Forks
1 Watchers
7 Branches
1 Contributors
Updated on Aug 15, 2024
Latest Version
1.12.0
Package Id
react-mapbox-gl-spiderifier@1.12.0
Unpacked Size
29.18 kB
Size
7.84 kB
File Count
17
NPM Version
8.15.1
Node Version
16.13.1
Published on
Aug 15, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
Rendering the spiderifier into react-mapbox-gl
as React
component.
Spiral/Circle positioning logic taken from and credits goes to https://github.com/jawj/OverlappingMarkerSpiderfier.
Please note that the ReactMapboxGlSpiderifier
should be used together with the React
wrapper of mapbox-gl
e.g. react-mapbox-gl
.
https://github.com/alex3165/react-mapbox-gl
1import ReactMapboxGl from 'react-mapbox-gl'; 2import { ReactMapboxGlSpiderifier } from 'react-mapbox-gl-spiderifier'; 3 4const Map = ReactMapboxGl({ 5 accessToken: '...', 6}); 7 8const mapProps = { 9 style: 'mapbox://styles/mapbox/streets-v8', 10}; 11 12class App extends Component { 13 onStyleLoad = (map) => { 14 this.map = map; 15 }; 16 17 renderPopup(properties, coordinates, offset) { 18 if (this.currentPopup) { 19 this.currentPopup.remove(); 20 } 21 22 setTimeout(() => { 23 this.currentPopup = new MapboxGl.Popup({ offset }) 24 .setLngLat(coordinates) 25 .setHTML(`Some description for node ${properties.value}`) 26 .addTo(this.map); 27 }); 28 } 29 30 renderSpiderifierContent(key, value) { 31 return ( 32 <div className="spiderifier-marker-content" key={key} properties={{ value }}> 33 <div>{value}</div> 34 </div> 35 ) 36 } 37 38 render() { 39 return ( 40 <div className="App"> 41 <Map {...mapProps} onStyleLoad={this.onStyleLoad}> 42 <ReactMapboxGlSpiderifier 43 coordinates={[-0.2268, 51.5361]} 44 onClick={(properties, coords, offset) => this.renderPopup(properties, coords, offset)} 45 > 46 {[100, 200, 300, 400, 500].((n, index) => this.renderSpiderifierContent(index, n))} 47 </ReactMapboxGlSpiderifier> 48 </Map> 49 </div> 50 ); 51 } 52}
coordinates ([number, number])
Display the Spiderifier at the given position
circleSpiralSwitchover (number)
Show spiral instead of circle from this marker count upwards, 0 -> always spiral; Infinity -> always circle
circleFootSeparation (number)
Related to circumference of circle
spiralFootSeparation (number)
Related to size of spiral
spiralLengthStart (number)
Related to size of spiral
spiralLengthFactor (number)
Related to size of spiral
animate (bool)
To enable animate the spiral
animationSpeed (number)
Animation speed in milliseconds
transformSpiderLeft (number)
The margin in left side of each spider
transformSpiderTop (number)
The margin in top of each spider
showingLegs (bool)
Indicate if the legs should be shown even when the spiderifier only have one spider element
onClick (function)
The click event handler
onMouseDown (function)
The mouse down event handler
onMouseEnter (function)
The mouse enter event handler
onMouseLeave (function)
The mouse leave event handler
onMouseMove (function)
The mouse move event handler
onMouseOut (function)
The mouse out event handler
onMouseOver (function)
The mouse over event handler
onMouseUp (function)
The mouse up event handler
react
, mapbox-gl
, react-mapbox-gl
,....env
fileREACT_APP_MAPBOX_GL_TOKEN
into the .env
fileyarn start
yarn upgrade-interactive --latest
yarn start
yarn build
package.json
README
npm publish
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
42 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More