[GoogleMapsEmbed] "directions" mode can't work
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template
To Reproduce
- clone the example repository: https://github.com/vercel/next.js/tree/canary/examples/with-google-maps-embed
- Follow the "How to use" section
- Insert a new map with the "directions" mode including required parameters "origin" and "destination" (documentation) like this:
<GoogleMapsEmbed
apiKey="CHANGE_ME"
height={200}
width="100%"
mode="directions"
origin="Brooklyn+Bridge,New+York,NY"
destination="Paris,France"
/>
Current vs. Expected behavior
The map cannot load: Google Maps Platform rejected your request. Invalid request. Missing the 'origin' parameter.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the examples/with-google-maps-embed example and the GoogleMapsEmbed usage shown in the issue. Reproduce the directions mode request with origin and destination, then trace the component's generated Google Maps Embed URL to identify why origin is missing. Done means the example loads a directions map with both required parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, react
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100