
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@gmaps-kit/react
Advanced tools
React components and hooks for Google Maps with gmaps-kit - useGeocoding, useDirections, usePlaces, useMarkers, useStreetView and more
React components and hooks for Google Maps with gmaps-kit.
npm install @gmaps-kit/react @gmaps-kit/core
import React from 'react';
import { Map, Marker, useGoogleMaps, useMap } from '@gmaps-kit/react';
function MyMap() {
const { isLoaded, load } = useGoogleMaps({
apiKey: 'YOUR_API_KEY',
libraries: ['places', 'geometry'],
});
const { mapInstance } = useMap('map-container', {
center: { lat: 40.7128, lng: -74.006 },
zoom: 10,
});
React.useEffect(() => {
if (!isLoaded) {
load();
}
}, [isLoaded, load]);
return (
<div>
<Map
id="map-container"
center={{ lat: 40.7128, lng: -74.006 }}
zoom={10}
style={{ height: '400px', width: '100%' }}
>
<Marker
mapInstance={mapInstance}
position={{ lat: 40.7128, lng: -74.006 }}
title="New York City"
onClick={() => console.log('Marker clicked!')}
/>
</Map>
</div>
);
}
Load and manage Google Maps API.
const { isLoaded, isLoading, error, load } = useGoogleMaps({
apiKey: 'YOUR_API_KEY',
libraries: ['places', 'geometry'],
onLoad: () => console.log('Maps loaded!'),
onError: (error) => console.error('Maps failed to load:', error),
});
Create and manage map instances.
const {
mapInstance,
isReady,
center,
zoom,
setCenter,
setZoom,
panTo,
fitToMarkers,
} = useMap('map-container', {
center: { lat: 40.7128, lng: -74.006 },
zoom: 10,
onMapReady: (map) => console.log('Map ready!'),
});
Manage markers on the map.
const { markers, addMarker, removeMarker, updateMarker, clearAllMarkers } =
useMarkers(mapInstance);
// Add a marker
const marker = addMarker({
position: { lat: 40.7128, lng: -74.006 },
title: 'New York City',
draggable: true,
onClick: () => console.log('Marker clicked!'),
});
Geocode addresses and reverse geocode coordinates.
const { isLoading, error, geocode, reverseGeocode, geocodeFirst } =
useGeocoding();
// Geocode an address
const results = await geocode('New York, NY');
// Reverse geocode coordinates
const address = await reverseGeocodeFirst({ lat: 40.7128, lng: -74.006 });
The main map component.
<Map
id="my-map"
center={{ lat: 40.7128, lng: -74.006 }}
zoom={10}
mapTypeId={google.maps.MapTypeId.ROADMAP}
style={{ height: '400px', width: '100%' }}
className="my-map-class"
>
{/* Child components */}
</Map>
Add markers to the map.
<Marker
mapInstance={mapInstance}
position={{ lat: 40.7128, lng: -74.006 }}
title="New York City"
label="NYC"
draggable={true}
onClick={() => console.log('Marker clicked!')}
onDrag={() => console.log('Marker dragged!')}
onDragEnd={() => console.log('Marker drag ended!')}
/>
Display info windows on the map.
<InfoWindow
mapInstance={mapInstance}
marker={marker}
content="<h3>Hello World!</h3>"
isOpen={true}
onClose={() => console.log('InfoWindow closed')}
/>
Full TypeScript support with comprehensive type definitions for all hooks and components.
MIT
FAQs
React components and hooks for Google Maps with gmaps-kit - useGeocoding, useDirections, usePlaces, useMarkers, useStreetView and more
The npm package @gmaps-kit/react receives a total of 4 weekly downloads. As such, @gmaps-kit/react popularity was classified as not popular.
We found that @gmaps-kit/react demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.