npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fleetclear-connect/react-google-maps-native

v0.1.7

Published

React components for Google Maps using native JS API with Marker, Path, and Cluster functionality

Readme

Google Maps React Native

A lightweight React library for integrating Google Maps into your application using the native Google Maps JavaScript API. This package provides ready-to-use components for creating maps, adding markers, drawing paths, and clustering markers without any external map package dependencies.

Installation

npm install react-google-maps-native

or

yarn add react-google-maps-native

Usage

Basic Map

import { GoogleMap } from 'react-google-maps-native';

const MapComponent = () => {
  return (
    <GoogleMap 
      apiKey="YOUR_GOOGLE_MAPS_API_KEY"
      center={{ lat: 37.7749, lng: -122.4194 }}
      zoom={12}
    />
  );
};

Map with Markers

import { GoogleMap, Marker } from 'react-google-maps-native';

const MapWithMarkers = () => {
  return (
    <GoogleMap 
      apiKey="YOUR_GOOGLE_MAPS_API_KEY"
      center={{ lat: 37.7749, lng: -122.4194 }}
      zoom={12}
    >
      <Marker 
        position={{ lat: 37.7749, lng: -122.4194 }}
        title="San Francisco"
        infoWindowContent={<div>Welcome to San Francisco!</div>}
      />
      <Marker 
        position={{ lat: 37.7647, lng: -122.4321 }}
        title="Golden Gate Park"
      />
    </GoogleMap>
  );
};

Map with Path

import { GoogleMap, Path } from 'react-google-maps-native';

const MapWithPath = () => {
  const pathCoordinates = [
    { lat: 37.7749, lng: -122.4194 },
    { lat: 37.7647, lng: -122.4321 },
    { lat: 37.7837, lng: -122.4324 }
  ];

  return (
    <GoogleMap 
      apiKey="YOUR_GOOGLE_MAPS_API_KEY"
      center={{ lat: 37.7749, lng: -122.4194 }}
      zoom={12}
    >
      <Path 
        path={pathCoordinates}
        options={{
          strokeColor: '#0000FF',
          strokeOpacity: 0.8,
          strokeWeight: 3
        }}
      />
    </GoogleMap>
  );
};

Map with Marker Clustering

import { GoogleMap, Marker, Cluster } from 'react-google-maps-native';

const MapWithClusters = () => {
  const markers = [
    { id: 1, position: { lat: 37.7749, lng: -122.4194 }, title: "San Francisco" },
    { id: 2, position: { lat: 37.7647, lng: -122.4321 }, title: "Golden Gate Park" },
    { id: 3, position: { lat: 37.7837, lng: -122.4324 }, title: "Fisherman's Wharf" }
    // More markers...
  ];

  return (
    <GoogleMap 
      apiKey="YOUR_GOOGLE_MAPS_API_KEY"
      center={{ lat: 37.7749, lng: -122.4194 }}
      zoom={12}
    >
      <Cluster>
        {markers.map(marker => (
          <Marker 
            key={marker.id}
            position={marker.position}
            title={marker.title}
          />
        ))}
      </Cluster>
    </GoogleMap>
  );
};

API Reference

GoogleMap

| Prop | Type | Default | Description | |------|------|---------|-------------| | apiKey | string | required | Your Google Maps API key | | center | object | { lat: 0, lng: 0 } | The initial center position of the map | | zoom | number | 10 | The initial zoom level of the map | | options | object | {} | Additional map options (see Google Maps API) | | containerStyle | object | { width: '100%', height: '400px' } | Style for the map container | | onLoad | function | - | Callback when map is loaded | | onClick | function | - | Callback when map is clicked | | onDragEnd | function | - | Callback when map drag ends |

Marker

| Prop | Type | Default | Description | |------|------|---------|-------------| | position | object | required | The position of the marker (lat, lng) | | icon | string/object | - | Custom icon URL or object | | label | string | - | Marker label | | title | string | - | Marker title (shown on hover) | | draggable | boolean | false | Whether the marker can be dragged | | onClick | function | - | Callback when marker is clicked | | onDragEnd | function | - | Callback when marker drag ends | | showInfoWindow | boolean | false | Whether to initially show the info window | | infoWindowContent | node | - | Content for the info window | | zIndex | number | - | The zIndex of the marker |

Path

| Prop | Type | Default | Description | |------|------|---------|-------------| | path | array | required | Array of positions (lat, lng) | | options | object | { strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 } | Path style options | | onClick | function | - | Callback when path is clicked | | onMouseOver | function | - | Callback when mouse enters path | | onMouseOut | function | - | Callback when mouse leaves path | | editable | boolean | false | Whether the path is editable | | draggable | boolean | false | Whether the path is draggable |

Cluster

| Prop | Type | Default | Description | |------|------|---------|-------------| | options | object | {} | Clustering options | | onClusteringBegin | function | - | Callback when clustering begins | | onClusteringEnd | function | - | Callback when clustering ends | | onLoad | function | - | Callback when clusterer is loaded |

License

MIT