Skip to content

Latest commit

 

History

History

react-wrapper-migration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Migrating from @googlemaps/react-wrapper

This is an example to show how code that was written using @googlemaps/react-wrapper can be ported to this library.

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 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

Development

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)