@dotdev/reactive-google-map
v1.1.1
Published
This package provides a React Component for embedded Google Maps with good support for configuration, marker clustering, event handlers.
Downloads
59
Maintainers
Keywords
Readme
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