Installations
npm install react-leaflet-google-layer
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
16.20.2
NPM Version
8.19.4
Score
80.1
Supply Chain
79.9
Quality
84.1
Maintenance
100
Vulnerability
98.9
License
Releases
Contributors
Languages
TypeScript (100%)
Developer
aviklai
Download Statistics
Total Downloads
1,870,713
Last Day
2,106
Last Week
8,531
Last Month
35,090
Last Year
559,625
GitHub Statistics
52 Stars
80 Commits
10 Forks
3 Watching
11 Branches
5 Contributors
Bundle Size
16.80 kB
Minified
5.82 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.1.0
Package Id
react-leaflet-google-layer@3.1.0
Unpacked Size
12.28 kB
Size
4.51 kB
File Count
6
NPM Version
8.19.4
Node Version
16.20.2
Publised On
22 Jan 2025
Total Downloads
Cumulative downloads
Total Downloads
1,870,713
Last day
9.5%
2,106
Compared to previous day
Last week
-9.1%
8,531
Compared to previous week
Last month
-8.3%
35,090
Compared to previous month
Last year
2.1%
559,625
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
4
Peer Dependencies
4
Google layer for React Leaflet v3 and v4 using leaflet.gridlayer.googlemutant, implemented with typescript.
Requirements
The current version of this library supports React Leaflet v3 and v4.
If you are using React Leaflet v2, please use the previous version of this library. Please see the documentation here:
https://github.com/aviklai/react-leaflet-google-layer/tree/v1
Installation instructions:
- run
npm install --save react-leaflet-google-layer
- By default this library uses the google-maps loader library to load the google maps api. If you want to use the script tag instead, you can Add google maps js api in your index.html:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY" async defer></script>
and set the prop useGoogMapsLoader tofalse
.
Usage example:
import * as React from 'react';
import { MapContainer } from 'react-leaflet';
import ReactLeafletGoogleLayer from 'react-leaflet-google-layer';
export const App = () => {
return (
<MapContainer zoom={15} center={[45, 20]}>
<ReactLeafletGoogleLayer apiKey='YOUR_API_KEY' type={'satellite'} />
</MapContainer>
);
};
Basic usage example
https://codesandbox.io/s/basic-usage-with-react-leaflet-v3-vx8fd
Options
apiKey?: string
useGoogMapsLoader?: boolean, default: true
googleMapsAddLayers?: { name: 'BicyclingLayer' | 'TrafficLayer' | 'TransitLayer', options?: any }[]
zIndex?: number
From js-api-loader (https://github.com/googlemaps/js-api-loader) - googleMapsLoaderConf prop:
- version?: string
- client?: string
- channel?: string
- language?: string
- region?: string
- libraries?: string[]
From googlemutant (https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant):
- minZoom?: number
- maxZoom?: number
- maxNativeZoom?: number
- tileSize?: number | Point
- subdomains?: string | string[]
- errorTileUrl?: string
- attribution?: string
- opacity?: number
- continuousWorld?: boolean
- noWrap?: boolean
- type?: 'roadmap' | 'satellite' | 'terrain' | 'hybrid'
- styles?: GoogleMutantStyle[]
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
5 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/aviklai/react-leaflet-google-layer/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/aviklai/react-leaflet-google-layer/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/aviklai/react-leaflet-google-layer/ci.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:18
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 13 are checked with a SAST tool
Reason
10 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3.4
/10
Last Scanned on 2025-01-27
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 MoreOther packages similar to react-leaflet-google-layer
canex-react-leaflet-google-layer
React leaflet wrapper of leaflet.gridlayer.googlemutant
@eisberg-labs/google-maps-leaflet-tile-layer
Google Maps tile layer for react leaflet.
react-google-layer-leaflet
A React component for rendering Google Map tile layers on a Leaflet map
react-leaflet-google-tile-layer
google layer as React compoment for Leaflet