M
M
melikbekyan2016-05-15 20:44:25
JavaScript
melikbekyan, 2016-05-15 20:44:25

How to solve google maps api problem?

How to select streets from the list for a specific city? there were streets of a specific city in the list, and after selection, the street was written without the city and country. 75937deed6df4828aa116c1cba3f777a.png
Here is the code:
8e4c4ae42a244bb1b80a4992c8e2a17a.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PerfectoWeb, 2016-05-15
@melikbekyan

Add "Country, City, +query" to the script before sending a request to Google Maps. Thus, you get "Russia, Voronezh, + query";
Example: https://developers.google.com/maps/documentation/j...
In the example, the country data is taken from the select. In the same way, you can take them from a hidden input, for example, and not only the country but also the city for your case. Next, make a request to get the list.
Detailed information: https://developers.google.com/maps/documentation/j...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question