how to get the similar city - google-maps

i have a city ALMA but it can be more then 5 in the whole world so user can be confused. how i can show the all place who have a word ALMA in their location.
i want to get all city name who have word ALMA. are any api can give me all city , county name match to my name ALMA.
if i can use GMAP API [google] then how i can retrieve all city name who have word "ALMA"

take a look at Yahoo PlaceFinder API ... That should help you out. If you suffix a near by location to the city name as in district etc it will help you drill down to the one you want.
http://developer.yahoo.com/geo/placefinder/

Related

How to find a place id in Google Maps API if city has an identical name as region, province or municipality

Using the Google places API I am trying to fetch place_id's. I have issues when trying to fetch a place_id when multiple parts of the place location have the same name. For example: The city Utrecht (in the Netherlands) lies in the municipality of Utrecht, Which lies in the province of Utrecht. They all have the same name.
When I fetch Utrecht from the places service it returns the place_id for city (which is the default for maps incase there are multiple options)
I found a hack/solution to fetch the administrative areas: adding localised name of the thing i'm trying to fetch. For example I can use Gemeente(municipality) or Provincie(province)
Is there a way to request specifically the type of region I want to fetch from the API?
I see that the places API has all this information, but sofar my attempts to fetch the place_id for the administrative_area_level_2 or administrative_area_level_1 without modifying the address are futile.
My "fix" works for the Netherlands but I have 12 more European countries with similar issues hence my question.
The most common solution is using the reverse geocoding with a result type filter.
For example, your sample request for Utrecht returns the following coordinate 52.09073739999999,5.1214201
Now use reverse geocoding with result type.
https://maps.googleapis.com/maps/api/geocode/json?latlng=52.09073739999999%2C5.1214201&result_type=administrative_area_level_1&key=YOUR_API_KEY
This returns place ID ChIJPzM8M01oxkcRsFwejVreAAM for admin area level 1
https://maps.googleapis.com/maps/api/geocode/json?latlng=52.09073739999999%2C5.1214201&result_type=administrative_area_level_2&key=YOUR_API_KEY
This returns place ID ChIJA9Xkz5BoxkcRzAM9YkCZGTs for admin area level 2
Hope it helps!

Address parts, proper order

if I look up this address:
Maanweg 174, 2500 BD The Hague, Nederlands
google maps finds it perfectly. if I look it up this way:
Maanweg 174, The Hague, Nederlands 2500 BD
It does not, because the postal code is out of place.
Now my question: I have 4 fields: Address, City/Region, Country and Postal Code. if the user starts to type the address, a lookup on google maps comes up with a list of addresses the user can pick from. I break the user selection appart and fill-in my 4 fields.
However... if the user changes some part of the address, I need to reconstitute it into a string to feed it to google... but I don't know the proper order. in the Netherlands, the postal code goes after the address. in the US it goes at the end, right before the country.
how can I find out what the proper order is?
There is no unique format, you should use the format as it will be used in the particular country (see: https://developers.google.com/maps/faq#geocoder_queryformat )
According to http://www.bitboost.com/ref/international-address-formats/netherlands/ the order of the first example is correct(for the Netherlands).

Finding a Fusion Table entry with a geocoded address

I have a Fusion Tables table containing location data for all of the Congressional Districts in Minnesota here.
I want to have a user enter her address, have the Google Maps API geocode it, and spit out the district in which she lives from the table.
I had hoped I could just pick the closest district by using orderBy: ST_DISTANCE in the query. However, this doesn't always return the district the address is actually located in. For example: http://jsfiddle.net/2vGSB/
Assuming it's even possible, how might I return the district that a set of coordinates is located inside of?
EDIT
After digging through the documentation a bit, I found where: ST_INTERSECTS. It appears to be doing what I need: http://jsfiddle.net/DY49c/

How should an address be formatted for global sales

I'm trying to write an HTML form for entering your address, but I'm a bit stuck. At the moment it's for UK only, but starting to get global sales. There is a dropdown for county and a dropdown for country...but other countries don't neccessarily have a county
What fields should be on an address form which needs to be valid globally?
Billing address
City
State or Province
Zip or Postal code
Country
I suggest looking at http://www.addressdoctor.com/en/countries_data/addressformats.asp and examining the default format for the main countries you work in. I worked in the direct-mail industry for several years - standardization can sometimes be difficult.

Get list of streets for selected town

Is there any way to get list of all streets in selected town ( I have DropDownList on my page with cities in my country, when user select some town to fill another DropDownList with streets in that town ) ? Also, can I get name of that part of town for selected street ?
This will do it, but you're probably looking for a downloadable list or API:
http://www.melissadata.com/lookups/zipstreet.asp