Gathering detailed insights and metrics for react-mapbox-gl-extended
Gathering detailed insights and metrics for react-mapbox-gl-extended
Gathering detailed insights and metrics for react-mapbox-gl-extended
Gathering detailed insights and metrics for react-mapbox-gl-extended
npm install react-mapbox-gl-extended
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,933 Stars
1,073 Commits
536 Forks
24 Watching
42 Branches
71 Contributors
Updated on 28 Nov 2024
TypeScript (93.66%)
CSS (3.06%)
HTML (2.54%)
JavaScript (0.6%)
Shell (0.14%)
Cumulative downloads
Total Downloads
Last day
-57.5%
17
Compared to previous day
Last week
-11.5%
456
Compared to previous week
Last month
-52%
2,310
Compared to previous month
Last year
6,059.6%
35,048
Compared to previous year
4
27
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