Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
amrcaramandunga
Advanced tools
[![version](https://img.shields.io/badge/%40lucifer1004%2Freact--google--map-3.0.0-blue.svg)](https://www.npmjs.com/package/@lucifer1004/react-google-map) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licens
Easier Google Map Integration for React projects.
There has been similar packages such as tomchentw/react-google-maps, google-map-react/google-map-react, fullstackreact/google-maps-react, so why bother writing a new library?
The aim is to make an easier-to-use Google Map library for React users,
empowered by React
's latest features (React >= 16.8.0
is required) and
TypeScript
.
yarn add @lucifer1004/react-google-map
# Or you can use
npm install --save @lucifer1004/react-google-map
import {
GoogleMapProvider,
HeatMap,
InfoWindow,
MapBox,
Marker,
Polygon,
} from '@lucifer1004/react-google-map'
// In your component
return (
<GoogleMapProvider>
<MapBox
apiKey="YOUR_GOOGLE_MAP_API_KEY"
opts={{
center: {lat: 39, lng: 116},
zoom: 14,
}}
useDrawing
useGeometry
usePlaces
useVisualization
onCenterChanged={() => {
console.log('The center of the map has changed.')
}}
/>
<Marker
id="marker"
opts={{
draggable: true,
label: 'hello',
position: {lat: 39, lng: 116},
}}
/>
<InfoWindow
opts={{
content: 'This is an info window',
position: {lat: 39.01, lng: 115.99},
}}
visible
/>
<Polygon
id="polygon"
opts={{
path: [
{lat: 38.98, lng: 116.01},
{lat: 38.98, lng: 116.03},
{lat: 38.99, lng: 116.03},
],
strokeColor: 'cyan',
}}
/>
<HeatMap
opts={{
data: [
{lat: 38.982, lng: 116.037},
{lat: 38.982, lng: 116.035},
{lat: 38.985, lng: 116.047},
{lat: 38.985, lng: 116.045},
],
}}
/>
<OverlayView position={{lat: 39, lng: 116}}>
<h2>⚑ This is a custom overlay 🙌</h2>
</OverlayView>
</GoogleMapProvider>
)
For more detailed explanation, see the doc.
Instead of using the pre-designed components, you can also use the exported
hooks useGoogleAPI
, useGoogleListeners
in your own components.
First, you need to clone the repository and install the dependencies:
git clone https://github.com/lucifer1004/react-gmap
cd react-gmap
yarn install
To read the styleguide locally, simply run:
yarn styleguide
And you can then go to http://localhost:6060 to see the styleguide.
You can also run the example app. Before running it locally, you should copy the sample dotenv file, and fill in your Google Map API key to replace the placeholder.
cp .env.sample .env
Then you can run the example project by
yarn start
This app combines Google Map API and Yelp API, helping users search nearby businesses.
FAQs
[![version](https://img.shields.io/badge/%40lucifer1004%2Freact--google--map-3.0.0-blue.svg)](https://www.npmjs.com/package/@lucifer1004/react-google-map) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licens
The npm package amrcaramandunga receives a total of 0 weekly downloads. As such, amrcaramandunga popularity was classified as not popular.
We found that amrcaramandunga demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.