Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update names and links in README #10

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# React Components for the Google Maps API
# React Components for the Google Maps JavaScript API

[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/visgl/react-google-maps/tree/main/LICENSE)

A library to integrate the Google Maps JavaScript API into React Applications
using simple components or hooks.

The hooks provide the possibility to access different Google Maps services and libraries, as well as the map instance
The hooks provide the possibility to access different Google Maps Platform services and libraries, as well as the map instance
itself inside all components that are wrapped inside the `APIProvider`.
The map instance can only be accessed, if a `Map` component is used inside the `APIProvider`.

## Description

This is a Typescript / JavaScript library to integrate the Google Maps JavaScript API into your React application.
This is a Typescript / JavaScript library to integrate the Maps JavaScript API into your React application.
It comes with a collection of React components to create maps, markers and infowindows, and a set of
hooks to use some of the Google Maps
hooks to use some of the Maps JavaScript
API [Services](https://developers.google.com/maps/documentation/javascript#services)
and [Libraries](https://developers.google.com/maps/documentation/javascript#libraries).
and [Libraries](https://developers.google.com/maps/documentation/javascript/libraries).

## Installation

This library is available via npm as the package [@vis.gl/react-google-maps](https://www.npmjs.com/package/@vis.gl/react-google-maps).

```sh
npm install --save @vis.gl/react-google-maps -D
```
Expand Down Expand Up @@ -53,7 +55,7 @@ export default App;

## Usage of the `useMap` hook

The `APIProvider` is used to load the Google Maps JavaScript API at the top level of the app component and provides a
The `APIProvider` is used to load the Maps JavaScript API at the top level of the app component and provides a
context that holds all map instances that can be accessed via the `useMap` hook.

It is possible to use one or multiple `Map` components inside the `APIProvider`.
Expand Down Expand Up @@ -134,12 +136,12 @@ const MyComponent = () => {
};
```

## Using other libraries of the Google Maps API
## Using other libraries of the Google Maps JavaScript API

Besides rendering maps, the Google Maps API has a lot of additional libraries
for things like geocoding, routing, the places API and a lot more. These libraries
Besides rendering maps, the Maps JavaScript API has a lot of [additional libraries](https://developers.google.com/maps/documentation/javascript/libraries)
for things like geocoding, routing, the Places API, Street View, and a lot more. These libraries
are not loaded by default, which is why this module provides a hook
`useMapsLibrary()` to handle loading of those libraries.
`useMapsLibrary()` to handle dynamic loading of those libraries.

For example, if you want to write a component that needs to use the
`google.maps.places.PlacesService` class, you can implement it like this:
Expand Down