0

I am a newbie to React. Currently, I'm working on fetching a Google map to my page. I was going through the Samples from the Google Maps platform and stumbled upon this:

https://developers.google.com/maps/documentation/javascript/examples/directions-draggable

I was asking if there is any way to use this code in my React project using only JavaScript, HTML, and CSS to render the map on the browser.

Thank You

4
  • Can we see your code? Commented Jun 6, 2018 at 6:08
  • I just have the basic project configured using npx create-react-app Commented Jun 6, 2018 at 6:17
  • yes, but we still need to see it so that we can tell what's wrong and what's what Commented Jun 6, 2018 at 6:19
  • 1
    look out for npm libraries, which can support googlemaps with react. Hope there are 2-3 libraries. github.com/tomchentw/react-google-maps Hope the link will help you. Commented Jun 6, 2018 at 6:29

1 Answer 1

2

You can get the google map api's using npm. npm install --save react-google-maps. For reference, you can check out here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.