visgl / visgl/react-google-maps
Issue with using route API
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
Description
I got this error when I tried making a route from an origin to a destination.
MapsRequestError: DIRECTIONS_ROUTE: REQUEST_DENIED: There was an issue performing a Directions request.
I just started to use my Google Maps API and did notice the issue located at this (https://issuetracker.google.com/issues/255359343), and I currently have my API key set to unrestricted, but I'm curious if this behavior is expected while the issue is pending?
I also got these errors too:
Uncaught (in promise) MapsRequestError: DIRECTIONS_ROUTE: REQUEST_DENIED: The webpage is not allowed to use the directions service.
and
Directions Service: This API project is not authorized to use this API. For more information on authentication and Google Maps JavaScript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key
I can provide more info if necessary.
Steps to Reproduce
Use the useMap hook and the useMapsLibrary hook using
const map = useMap();
const routesLibrary = useMapsLibrary("routes");
I followed all the general steps used in this video put out by Google Maps:
https://www.youtube.com/watch?v=tFjOIZGCvuQ&list=PL2rFahu9sLJ2QuJaKKYDaJp0YqjFCDCtN&index=3
Environment
- Library version:
- Google maps version: weekly
- Browser and Version:
- OS:
Logs
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 reported useMap and useMapsLibrary("routes") reproduction and verify the Google Maps API key, project authorization, and webpage restrictions against the linked Google issue and API-key documentation. Done means determining whether the errors come from react-google-maps or external Google Maps configuration, with the missing environment details and a reproducible result documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100