Gathering detailed insights and metrics for react-leaflet-google-v2
Gathering detailed insights and metrics for react-leaflet-google-v2
Gathering detailed insights and metrics for react-leaflet-google-v2
Gathering detailed insights and metrics for react-leaflet-google-v2
GoogleMaps layer as React component for Leaflet
npm install react-leaflet-google-v2
Typescript
Module System
Node Version
NPM Version
70.5
Supply Chain
86.3
Quality
75.6
Maintenance
100
Vulnerability
99.3
License
JavaScript (96.77%)
HTML (3.23%)
Total Downloads
237,963
Last Day
136
Last Week
726
Last Month
3,257
Last Year
37,232
MIT License
4 Stars
135 Commits
10 Forks
1 Watchers
23 Branches
2 Contributors
Updated on Sep 10, 2024
Minified
Minified + Gzipped
Latest Version
6.0.0
Package Id
react-leaflet-google-v2@6.0.0
Unpacked Size
6.99 MB
Size
6.90 MB
File Count
25
NPM Version
7.17.0
Node Version
12.22.10
Cumulative downloads
Total Downloads
Last Day
-31%
136
Compared to previous day
Last Week
-23.4%
726
Compared to previous week
Last Month
10%
3,257
Compared to previous month
Last Year
-17.9%
37,232
Compared to previous year
3
4
32
Most recently tested with Leaflet React-Leaflet 3.0.5.
GoogleMaps layer as React component for Leaflet build on top of React-Leaflet.
The google maps layer is using the plugin from Leaflet.GridLayer.GoogleMutant
Also it uses google-maps, a wrapper for asynchronously download Google Maps API in the browser.
To get started, to be able to run the example you have execute:
1npm install
1import React from 'react'; 2import { MapContainer, TileLayer, LayersControl } from 'react-leaflet' 3import { GoogleLayer } from '../src' 4const { BaseLayer } = LayersControl; 5const key = 'your key goes here'; 6const terrain = 'TERRAIN'; 7const road = 'ROADMAP'; 8const satellite = 'SATELLITE'; 9const hydrid = 'HYBRID'; 10//// Google's map type. Valid values are 'roadmap', 'satellite' or 'terrain'. 'hybrid' is not really supported. 11 12export default class GoogleExample extends React.Component { 13 14 constructor() { 15 super(); 16 } 17 18 render() { 19 return ( 20 <MapContainer center={[42.09618442380296, -71.5045166015625]} zoom={2} zoomControl={true}> 21 <LayersControl position='topright'> 22 <BaseLayer name='OpenStreetMap.Mapnik'> 23 <TileLayer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png"/> 24 </BaseLayer> 25 <BaseLayer checked name='Google Maps Roads'> 26 <GoogleLayer googlekey={key} maptype={road} /> 27 </BaseLayer> 28 <BaseLayer name='Google Maps Terrain'> 29 <GoogleLayer googlekey={key} maptype={terrain} /> 30 </BaseLayer> 31 <BaseLayer name='Google Maps Satellite'> 32 <GoogleLayer googlekey={key} maptype={satellite} /> 33 </BaseLayer> 34 <BaseLayer name='Google Maps Hydrid'> 35 <GoogleLayer googlekey={key} maptype={hydrid} libraries={['geometry', 'places']} /> 36 </BaseLayer> 37 <BaseLayer name='Google Maps with Libraries'> 38 <GoogleLayer googlekey={key} maptype={hydrid} libraries={['geometry', 'places']} /> 39 </BaseLayer> 40 </LayersControl> 41 </MapContainer> 42 ) 43 } 44} 45 46
You can find the following example in the folder example
. Run the above code by executing the following scripts in package.json, with the order they are stated underneath:
build
example
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
Found 6/30 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
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
108 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-12
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