@dotdev/reactive-google-map
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

DotDev Google Map

This package provides a React Component for embedded Google Maps with good support for configuration, marker clustering, event handlers.

Internally it uses the @google/markerclustererplus for clustering of markers and the Google Maps API hosted script for embedding which can be injected automatically, additionally the @google/maps package is used for Geolocation purposes.

Install

This package is private and requires access to the @dotdev organization to install.

yarn add @dotdev/reactive-google-map

Usage

GoogleMap Component

import { GoogleMap } from "@dotdev/reactive-google-map";

const jsx = (
  <GoogleMap
    ...props
  />
)

GoogleMapAutocomplete Component

import { GoogleMapAutocomplete } from "@dotdev/reactive-google-map";

const jsx = (
  <GoogleMapAutocomplete
    ...props
  />
)

Geocoder Utility

import { Geocoder } from "@dotdev/reactive-google-map";

Geocoder.latLngToDirections(...);

const geocoder = new Geocoder(...);

await geocoder.addressToLatLng(...);
await geocoder.browserToLatLng();
await geocoder.latLngToAddress(...);

Bounds Utility

import { Bounds } from "@dotdev/reactive-google-map";

Bounds.simplifyBounds(...);
Bounds.latLonDistance(...);

Development

Git management follows the standard Git Flow ideology.

Package for usage:

yarn run package

Package during development, with rebuild on file change:

yarn run package --watch

Lint before commiting:

yarn run lint

Generate reference documentation:

yarn run docs

Readme

Keywords

none

Package Sidebar

Install

npm i @dotdev/reactive-google-map

Weekly Downloads

30

Version

1.1.1

License

SEE LICENSE IN LICENCE.md

Unpacked Size

79.2 kB

Total Files

33

Last publish

Collaborators

  • dotdev-richard
  • dotdev-joel
  • dotdev-alex
  • p_tul
  • brendon-dotdev
  • psj
  • 8eecf0d2
  • oscarstranger
  • dotdev-bo
  • dotdev-support
  • dotdev-eric