Skip to content

Latest commit

 

History

History

static-map

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Static Map Example

This is an example to show how to use the Static Map component.

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)