This is an example to show how to add custom map-controls.
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 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:
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
Go into the example-directory and run
npm install
To start the example with the local library run
npm run start-local
The regular npm start
task is only used for the standalone versions of the example (CodeSandbox for example)