P
P
prirsotbiz2014-04-02 21:27:46
Google Maps
prirsotbiz, 2014-04-02 21:27:46

How to get directions on Google Maps without leaving the site?

In general, there is the following situation:
On the company's website, in the footer, there is a standard block "How to find us" and it also contains a Google map in an iframe. The point (marker) of the company's location is marked on the map with coordinates.
The task is as follows : the point indicated on the map is actually point B (the end of the route), i.e. when the user clicks on this marker, an input line and a "Paste" button should appear. When the user has entered the address from which he will have to get (point A) and clicked the "Paste" button, it is necessary for google to plot a route to point B (with fixed coordinates) without leaving the site page with its standard means. by default, google opens its large map when getting directions.
Is it possible to do this and what would you advise to "read" about it?
How it looks schematically: joxi.ru/mS48U_3JTJDAXXyejcE

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgen P, 2014-09-30
@Patriot2k

Google provides tools for this, there are several examples here:
https://developers.google.com/maps/documentation/j...
read about Google Maps JavaScript API v3 in the same place.
Specifically, for the task you are looking for, there is such an example: webmap-blog. en/google-maps/route-proezda-na-goo...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question