Maybe you know if and how I can use Criteria ID taken from Adwords APi
Here to get targeted location and put it on map?
Thanks
I have not seen anyone attempt this before, however performing a geocode on the Canonical Name column would provide you with the desired result it seems?
Geocoding docs available here: https://developers.google.com/maps/documentation/geocoding/
Related
I am using Google Places API to get grocery stores list.
Query:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.715738,%20-117.161084&radius=12218&type=grocery_or_supermarket&key="GoogleAPIKey"
It is giving me some different data.
But I want list data like google provides in google map search as showing in attached screenshot: -
Is there any other way to get this list in json/xml format?
Please help. Thanks in advance.
You use type for searching with the API, but when you are on the maps webpage you use plain text.
If you use this link you get almost the same results as on the webpage except for Food 4 Less
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.715738, -117.161084&radius=2000&keyword=Grocery store&key=
Using the API you posted i was able to get a result that looks like what google explained in the documentation https://developers.google.com/places/web-service/search, if you can update your question by adding the response you are getting, maybe it will be easy to help you
Thanks for the suggestion guys.
I have resolved my query by using textsearch google api as mentioned below: -
https://maps.googleapis.com/maps/api/place/textsearch/json?location=""&radius=12218&type=grocery&key="GoogleAPIKey"
Thanks.
i have a lat/long location data and i need to get current Google Place where i'm at now.
For example, if i'm in a shop(cafe, gym, etc..), i need to get info about THAT particular shop(cafe, gym, etc..).Or at least the closest one.
So, i'm doing it this way:
First i fetch place basic info(placeid,name, etc.) via Google Places API Nearby Search request:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.7597351,-73.9836576&radius=16.66&key=...
Then i find the closest one(which is apparently where i am) and perform Place Details request with it's placeid
So, everything works fine, except for some places like the one located at 40.7597351,-73.983657 (New York Guitar lab shop) which i can see on google map, but can't get in my response. Even places that are further from my location than this, are being found fine.
I've already tried to use rankBy=distance and then checking if the result is in required radius manually, still no use. Actually, maybe this approach is right, but as told in the docs, it's required to use types parameter with rankBy=distance. So, i set types=establishment since i actually need everything except addresses and locality tokens returned. I think that the problem is some places i need, are neither counted as establishments nor as localities, but i don't know the optimal way to exclude
all types specified at (https://developers.google.com/places/documentation/supported_types) Table 2 from my response. Is there a way to get only places which types are in Table 1 (except for specifying them ALL in my types param, haha)
So, could you please help me with how can i do this?
Thanks:)
P.S. here is very similar but unaswered question
Google Places API Displaying Inaccurate Result
It seems that there's explanation here (https://developers.google.com/places/faq#why_are_some_places_never_returned_even_though_they_have_google_pages). Looks like some places are just not yet verified by Google.
And yes, the establishment is the generic category for all non-localities. So you can be sure that if you set type=establishment then you'll have as much places as you will, if you'll specify all types from Table 2. Good Luck!
I can get place details from Google places API when I know the reference by using:
https://maps.googleapis.com/maps/api/place/details/json?reference=CmRYAAAAciqGsTRX1mXRvuXSH2ErwW-jCINE1aLiwP64MCWDN5vkXvXoQGPKldMfmdGyqWSpm7BEYCgDm-iv7Kc2PF7QA7brMAwBbAcqMr5i1f4PwTpaovIZjysCEZTry8Ez30wpEhCNCXpynextCld2EBsDkRKsGhSLayuRyFsex6JA6NPh9dyupoTH3g&sensor=true&key=API_KEY_HERE
However, I want to get the same information by using the ID instead. So the same place in the query above would be something like:
https://maps.googleapis.com/maps/api/place/details/json?id=4f89212bf76dde31f092cfc14d7506555d85b5c7&sensor=true&key=API_KEY_HERE
Is such a thing possible?
This will be part of a search filter I'm building, part of which is location. My search parameters are passed to the url, so I plan to do the same with the selected location from the places autocomplete. Using id is much shorter than reference, so more suitable for the querystring. Unless there is a better way to do it?
You can search Place data by PlaceID
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJF7QkuDsDLz4R0rJ4SsxFl9w&key=YOUR_KEY
It is now possible to fetch place data by placeId:
https://developers.google.com/maps/documentation/javascript/examples/place-details
It is not possible to get a place details with id, you do need to use the reference.
as specifically mentioned in the bottom of this link - http://goo.gl/KFDbl
Apparently both the id and reference are deprecated anyway.
From the Google Places Autocomplete Docs (Aug 2014):
"Note: The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a unique identifier that can be used to compare places and to retrieve information about a place. The Places API currently returns a place_id in all responses, and accepts a placeid in the Place Details and Place Delete requests. Soon after June 24, 2015, the API will stop returning the id and reference fields in responses. Some time later, the API will no longer accept the reference in requests. We recommend that you update your code to use the new place ID instead of id and reference as soon as possible. "
https://developers.google.com/places/documentation/autocomplete
I am using this api call with &keyword= and I want to have multiple words in the keyword but OR them. I have tried OR and | but it seems to ignore it. example here
Is it possible to OR keyword in a google places search
The Google Places API does not current support multiple keywords or names in requests. A Places API - Feature Request for this has been filed here.
If you believe this would be a useful feature please make sure your star the request to let us know you are interested in seeing it added.
I am working on a project where I am going to create a map over a specific area, and have some points-of-interest included. Thinking of the ones already included in Google Maps.
My first thought was that this could be done in the Google Maps API, but I've never worked with if before so therefor I have some questions about it's limitations and capability.
Can I limit the map to one specific area?
Can I filter the points-of-interest? Ex. only gas stations and hotels etc.
Thats about it to get me started at least.
Thanks!
If you are using a spatial enabled db(postgis,mysql spatial..) you can make spatial queries to filter your POI's.As of filtering according to type you should add a type column in your table to filter the results according to this column.
Hope it helps
You could limit the extents fo the displayed map by intercepting the pan controls (eg. intercepting the view-change messages; or implement your own and disable the standard ones). Note that if you zoomed out a lot, the out-of-area-map would still appear.
Yes, you can restrict your geocoder search by specifying the bounds as described here
AFAIK, no, unless you filter the results once you've obtained them