I am using the Google Places Api in order to show a list of nearby places to the user. I am trying to include in the list the plaetze (squares) like Paradeplatz in Zurich:
https://maps.google.com/maps?q=Paradeplatz,+Z%C3%BCrich,+Schweiz&hl=el&ie=UTF8&ll=47.36996,8.539225&spn=0.001817,0.004823&sll=37.0625,-95.677068&sspn=34.808514,79.013672&oq=paradeplatz&hq=Paradeplatz,+Z%C3%BCrich,+Schweiz&t=m&z=18
No matter if i include all the supported Places types from here:
https://developers.google.com/places/documentation/supported_types
the Paradeplatz does not appear. Do you have any clue why this is happening?
Paradeplatz does appear in the Places data. Looks like it is in approximately the right place, not sure how to search for only "plaetze".
If you are interested specifically in displaying squares, perhaps try searching via name parameter with a value like Platz (square) instead of using the types parameter. Searching by category (types parameter) might return fewer (or none) results than expected if Google hasn't yet added the actual categories to the items in its Places API database.
Related
I am using the Google Map Javascript API v3 and also the google.maps.places.Searchbox class so the user can get to the place he is looking for.
As I saw the example code of Google
searchBox.getPlaces() is an array and can return more than one place. But as I tried more than once the Places Searchbox I never got more than one place.
So in which case does the searchBox find more than one place?
I am considering to ignore Searches which deliver more than one place because in my use case (find shops nearby in one place) it has to be just one place. But for this reason I wanted to know when it is the fact that the searchbox delivers more than one place as I didn't provoke this and could not find any documentation about that.
Results that return multiple matches like "coffee" or "mcdonalds".
I want to link to my google places listing using the address.
This is being done automatically as I have hundreds of addresses.
The format shown in the share on google maps is https://www.google.com/maps/place/name+of+place/#lat,long,zoom however the lat/long is not always selecting the correct places listing.
In some cases the location selected is several states away which makes no sense, though the map is always zoomed to the correct coordinates and the correct listing is right there on the map.
Finally found a combination that seems to work:
https://www.google.com/maps/search/name+of+place,+address+of+place/#lat,long,zoom
Apparently search works if you're very, very specific.
Is it possible to get the Elements from a Google Map by a current viewport?
Example, given following view:
Now Google Maps API should return: "Nicaragua, Costa Rica, Colombia, Venezuela, Ecuador, etc.". Basically all countries and, in this example, states of Brazil like "Amazonas, Acre, Mato Grosso, etc.". Capitals like "Caracas, Bogota, Quito, etc." are shown in the current view as well so they should be returned, too.
Is this possible somehow?
You may want to use VisibleRegion, which makes it possible to get the coordinates of your screen.The problem lies with the coverage of your search. It is too large and there is no direct solution that is available in the documentations. The search that would yield the largest result is the Radar Search in Google Places API, which would yield 200 search results in a maximum 50000 meters(radius).
I want to know if there's any way to get my map to show many search results like this one on their http://maps.google.com.
For example, if I search for "restaurants japan", I would like my map to show it like this screenshot.
=> http://i3.minus.com/iGzzuu1bBHgNJ.png
The closest approach I found is Google Places Search, but they say it can return only 60 results at most. This would not be enough for me.
Since I need to add a load of custom markers after the searching, I don't think <iframe> embedding couldn't help me here. Am I right?
Also, if I need it to show only red dots (remove those (A-xx) pins), how would I do it?
A Radar Search will return up to 200 results (but with less detail and for more "cost")
reference
I need to get the specific address (or lat/long coordinates) of a place based on that place's name.
Specifically, I need to determine the location of supermarkets in a given area so that I can use those locations as 'markers' in my implementation of google maps static maps api.
Using the following, I can if you input a specific location in the area that currently says "INSERT_LOCATION_HERE", then you will get a google map of the specified area with markers at the locations.:
http://maps.google.com/maps/api/staticmap?center=Ithaca,%20NY&size=512x512&maptype=roadmap&markers=color:blue|label:S|INSERT_LOCATION_HERE&sensor=false
For example (the marker indicates the local Wegmans store based on its address:
http://maps.google.com/maps/api/staticmap?center=Ithaca,%20NY&size=512x512&maptype=roadmap&markers=color:blue|label:S|500%20So.%20Meadow%20Street&sensor=false
If anyone knows how to do this without using google maps places api, that would be extremely helpful!
If you want to get the name as a string intead of an image, you can do it with a little help for Google. That'll match nicely with the static map that you're using.
Let's say you want to search for "Den Haag"...
Construct a URL like this, and parse the result:
http://maps.google.com/maps/geo?q=den%20haag
You can also specify the output format:
http://maps.google.com/maps/geo?q=den%20haag&output=xml
http://maps.google.com/maps/geo?q=den%20haag&output=csv
http://maps.google.com/maps/geo?q=den%20haag&output=json
You can also provide coordinates instead of a name, and get a full name+coordinates in return:
http://maps.google.com/maps/geo?q=52.0467315,4.3796239&output=json
For some reason the links don't work when you click them from this page. I guess google doesn't accept a referrer in the request, so just copy and paste the links... That works.