How to use Google Maps API with Google Directions API?

Asked

Viewed 707 times

-1

Hi,

I am using the Google Maps API and want to be able to click, for example, a previously created point on the map and get directions from my location to the selected point. For that I am trying to use the Google Directions API. I’m trying to do this with Ode.js.

First question: You need to get another key api, and I already have the key api from the Google Maps API?

Second question: How to implement them both by selecting a point on the map and then getting directions to that point from my location.

1 answer

1


  • Thank you very much!

  • I’ve been doing some research, and I can’t find what I want. I have an app with a map that has several points each in a certain location, its coordinates are stored in a Database (mongoDB). And I want to apply the Directions api to these points so that when I click on a point it gives me directions from my current position to the selected point.

  • See if this example helps you. https://developers-dot-devsite-v2-prod.appspot.com/maps/documentation/javascript/examples/directions-simple

Browser other questions tagged

You are not signed in. Login or sign up in order to post.