Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google maps api get countries and cities

Can i have autocomplete with ajax to get countries from google maps api. When someone type "United" to search on google maps api for that country and to show results for similar ?

Can you give me example, or link to that solution for google maps api ?

like image 940
Mirza Delic Avatar asked Nov 29 '12 22:11

Mirza Delic


People also ask

How do I get a city from Places API?

2) Make another web-service call to https://maps.googleapis.com/maps/api/place/details/json?key=API_KEY&placeid=place_id_retrieved_in_step_1. This will return a JSON which contains address_components . Looping through the types to find locality and postal_code can give you the city name and postal code.

Is Google Maps geocoding API free?

The Geocoding API uses a pay-as-you-go pricing model. Geocoding API requests generate calls to one of two SKUs depending on the type of request: basic or advanced.

Is there any free geocoding API?

While most geocoding services come with a hefty price tag or credit fee, QGIS offers several geocoding plugins for free. And the best part about QGIS is that it's completely open-source licensed under the GNU General Public License. In QGIS 3, geocoding is all in open source using the OSM Place Search plugin.


1 Answers

Have a look at the Google Places Autocomplete API. Here is a blog post to get you going.

like image 166
Gady Avatar answered Nov 09 '22 19:11

Gady