Gathering detailed insights and metrics for react-mapbox-gl
Gathering detailed insights and metrics for react-mapbox-gl
Gathering detailed insights and metrics for react-mapbox-gl
Gathering detailed insights and metrics for react-mapbox-gl
react-mapbox-gl-draw
Draw tools for Mapbox with React: react-mapbox-gl + mapbox-gl-draw
react-mapbox-gl-spiderifier
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/thuanmb/react-mapbox-gl-spiderifier/blob/master/LICENSE) [![npm downloads](https://img.shields.io/npm/dm/react-mapbox-gl-spiderifier.svg)](https://www.npmjs.com/pack
react-mapbox-gl-cluster
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/thuanmb/react-mapbox-gl-cluster/blob/master/LICENSE) [![npm downloads](https://img.shields.io/npm/dm/react-mapbox-gl-cluster.svg)](https://www.npmjs.com/package/reac
mapbox-gl
A WebGL interactive maps library
npm install react-mapbox-gl
83.9
Supply Chain
95
Quality
79.7
Maintenance
100
Vulnerability
98.4
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,931 Stars
1,073 Commits
536 Forks
24 Watching
42 Branches
71 Contributors
Updated on 20 Nov 2024
Minified
Minified + Gzipped
TypeScript (93.66%)
CSS (3.06%)
HTML (2.54%)
JavaScript (0.6%)
Shell (0.14%)
Cumulative downloads
Total Downloads
Last day
8.7%
10,004
Compared to previous day
Last week
2.6%
48,502
Compared to previous week
Last month
11.8%
206,035
Compared to previous month
Last year
9.3%
2,794,216
Compared to previous year
4
28
symbol
displays a mapbox symbol.line
displays a lineString.fill
displays a polygon.circle
displays a mapbox circle.raster
displays a mapbox raster tiles.fill-extrusion
displays a layer with extruded buildings.background
displays a mapbox background layer.heatmap
displays a mapbox heatmap layer.npm install react-mapbox-gl mapbox-gl --save
Example:
Adding the css in your index.html:
1<html> 2 <head> 3 ... 4 <link 5 href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css" 6 rel="stylesheet" 7 /> 8 </head> 9</html>
1// ES6 2import ReactMapboxGl, { Layer, Feature } from 'react-mapbox-gl'; 3import 'mapbox-gl/dist/mapbox-gl.css'; 4 5// ES5 6var ReactMapboxGl = require('react-mapbox-gl'); 7var Layer = ReactMapboxGl.Layer; 8var Feature = ReactMapboxGl.Feature; 9require('mapbox-gl/dist/mapbox-gl.css'); 10 11const Map = ReactMapboxGl({ 12 accessToken: 13 'pk.eyJ1IjoiZmFicmljOCIsImEiOiJjaWc5aTV1ZzUwMDJwdzJrb2w0dXRmc2d0In0.p6GGlfyV-WksaDV_KdN27A' 14}); 15 16// in render() 17<Map 18 style="mapbox://styles/mapbox/streets-v9" 19 containerStyle={{ 20 height: '100vh', 21 width: '100vw' 22 }} 23> 24 <Layer type="symbol" id="marker" layout={{ 'icon-image': 'marker-15' }}> 25 <Feature coordinates={[-0.481747846041145, 51.3233379650232]} /> 26 </Layer> 27</Map>;
zoom
, bearing
and pitch
Arrays ?If those properties changed at the mapbox-gl-js level and you don't update the value kept in your state, it will be unsynced with the current viewport. At some point you might want to update the viewport value (zoom, pitch or bearing) with the ones in your state but using value equality is not enough. Taking zoom as example, you will still have the unsynced zoom value therefore we can't tell if you want to update the prop or not. In order to explicitly update the current viewport values you can instead break the references of those props and reliably update the current viewport with the one you have in your state to be synced again.
Please try to reproduce your problem with the boilerplate before posting an issue.
Try ngx-mapbox-gl
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/17 approved changesets -- score normalized to 2
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
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
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
117 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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