-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples): new example using google.maps.visualization.HeatmapLa…
…yer (#445)
- Loading branch information
1 parent
6410bef
commit 183f5a4
Showing
12 changed files
with
71,557 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Heatmap | ||
|
||
This uses the `useMapsLibrary` hook showing earthquake magnitude data in a | ||
heatmap. | ||
|
||
## Google Maps Platform API key | ||
|
||
This example does not come with an API key. Running the examples locally requires a valid API key for the Google Maps Platform. | ||
See [the official documentation][get-api-key] on how to create and configure your own key. | ||
|
||
The API key has to be provided via an environment variable `GOOGLE_MAPS_API_KEY`. This can be done by creating a | ||
file named `.env` in the example directory with the following content: | ||
|
||
```shell title=".env" | ||
GOOGLE_MAPS_API_KEY="<YOUR API KEY HERE>" | ||
``` | ||
|
||
If you are on the CodeSandbox playground you can also choose to [provide the API key like this](https://codesandbox.io/docs/learn/environment/secrets) | ||
|
||
## Development | ||
|
||
Go into the example-directory and run | ||
|
||
```shell | ||
npm install | ||
``` | ||
|
||
To start the example with the local library run | ||
|
||
```shell | ||
npm run start-local | ||
``` | ||
|
||
The regular `npm start` task is only used for the standalone versions of the example (CodeSandbox for example) | ||
|
||
[get-api-key]: https://developers.google.com/maps/documentation/javascript/get-api-key |
Oops, something went wrong.