Back to Next Js

README

examples/with-google-maps-embed/README.md

16.2.51.4 KB
Original Source

Example app using Google Maps Embed

This example shows how to embed a Google Maps Embed using @next/third-parties.

Deploy your own

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

bash
npx create-next-app --example with-google-maps-embed with-google-maps-embed-app
bash
yarn create next-app --example with-google-maps-embed with-google-maps-embed-app
bash
pnpm create next-app --example with-google-maps-embed with-google-maps-embed-app

Next, copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):

bash
cp .env.local.example .env.local

Set the NEXT_PUBLIC_GOOGLE_API_KEY variable in .env.local to match your Google Maps API Key.

Deploy it to the cloud with Vercel (Documentation).