If we go to maps.google.com. and search "Nepal", it will search "Nepal"
If we seach "McDonalds", it shows restaurants in the current map boundaries.
If we search on map with Geocoder, but Geocoder will not show results in case of "McDonalds" or "KFC" etc.
If we use place library, the this cant search Cities, states, countries.
How can I implement that search? In my application.
Take the user keywords and pass them to geocoder.If no results are returned from geocoder then pass them to places api.
I think that's what google also does.
Cheers
You can use the Google Places Library. Places can take both geographic locations, including address, and establishments (landmarks, business, government offices, etc.). It also provides you with an autocomplete API as well. There is also a Places API web service that you can use directly from your server.
And this is the example of Autocomplete
http://docs.jquery.com/Plugins/Autocomplete
Related
I am developing an Estate Agents website. Each property has it's geolocation code saved in a database. Visitors will want to search for properties in a given location (say a town like "Southampton"). Could Google's Maps API (web services) help me with this?
I've seen this facility provided on other Estate Agent's website but I don't know how they do it.
You definetly can. Through Google Maps WebService API you can decode your geolocation into readable address, and the perform a search on it.
If I were you, I'd save locally not only the geolocation, but also the address, better if decomposed in pieces (like Country, Region, City, and so on).
Here you can find the official documentation
http://code.google.com/intl/it-IT/apis/maps/documentation/webservices/
This is basically a standard "store locator" problem -- except your "stores" are properties. The user enters their search term, say "Southampton"; you geocode that and then find the targets which are within your chosen distance of that location. There are plenty of examples, including in the documentation: http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html
When I am searching "Rudy barber Shop, New York" string in http://maps.google.com, google map showing 10 results...
But When I am using google map api in my App, It only returning two results
http://maps.googleapis.com/maps/api/geocode/xml?address=Rudy%20barber%20Shop,%20New%20York&sensor=false
Now my question is that how can get the same result.
Thanks
Mandeepd
I don't think you can get exactly the same results as in Google Maps.
Google Maps is a whole application. It uses multiple kinds of search engines behind the scenes and some may not be available as APIs, e.g. transit (public transport) directions.
Your sample request shows that you are using The Google Geocoding API which is meant for converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates. This only works for addresses, not businesses. When you put a business name in front of the address, the Geocoding API still tries to figure out where that may be, based on the part of your query that looks like an address. However, the Geocoding API is not meant for that use.
If you are after searching businesses around a given location, maybe you could use the The Google Places API (Experimental) but make sure to comply with its Requirements.
Is there any way to filter the Google Places Autocomplete for a specific location and also filter based on categories (like restaurants, malls etc)
Yes, Google Places Autocomplete has type and location parameters.
As of right now, it looks like the AutoComplete API only accepts "establishment" for all non-address places and "geocode" for geographic entities. You might be able to write some JS that makes an additional Google Places API call for each possibility and returns a new array of full Google Places API details.
all, which google map API could be use for search nearby business spot information like ATM/Branch (address and coordinates information etc)
thanks for help
This service is provided by Google as part of their Places API. As of today, it is only a developer preview, and you must have an Adsense account to register.
A search request will return up to 20 establishments, which indicate their type, so they can be filtered. There seems to be no way to perform a more direct search by type for now.
i had implemented google map API with phoogle.php. Its working fine. But i cant able to view multiple places.
Example: all country,all beaches
Not completely clear from your question what it is that you are trying to do here.
I had a look at the Phoogle documentation and it seems like the framework it provides is pretty limiting.
It exposes some methods for setting a key, displaying a map, configuring a few basic UI characteristics and setting the zoom level. It seems like you can also add addresses to be geocoded to lat,lng and then added to the map as markers.
It won't geocode anything as generic as "all countries" or "all beaches".
I can only suggest (and I am guess wildly here) that you might want to populate a list of countries and then geocode (addAddress) just the country names to place markers on the map for each of those countries.
I can't imagine you wanted to place a marker on "all beaches", but you might want a list of beaches ("palm beach, sydney, australia" for example) and similary geocode those names and mark then on the map.
If you would like to read more about what the Google Maps API is capable of, I suggest you have a look at the API Reference.
If there is something more specific that you wanted to do, please update the question and we would be happy to help.