问题
I am using Google Places API in my Android app to detect bike shops in the user's proximity. I have a problem with this shop (Joy Ride Bicycles): https://www.google.ro/maps/place/Joy+Ride/@47.03567,-122.818342,17z/data=!3m1!4b1!4m2!3m1!1s0x54910b4572c99c39:0x340b219b8ac15ba1
Although it's present on Google Maps, it isn't returned when I make a call to the Google Nearby Places API. I have tried with different ranges locations. I've had similar issues with other shops.
Has anyone else encountered this problem?
回答1:
There can be multiple reason according to Google Documentation
Why are some Places not returned when I filter by type?
It's possible that the place you are looking for has not yet been categorized. All places are categorized as the generic type "establishment" until Google has enough data about a place to categorize it as one of the supported place types.
As a workaround you can pass the place type to the keyword parameter. The keyword parameter is matched to: name, type, address, and customer reviews.
If you would like to add the category type to a place listing yourself, submit a place edit. Once the edit has been approved and published it will appear using the correct type filtering.
Why are some nearby places not returned?
By default, the Places API sorts results by prominence within the supplied radius. A Nearby Search request can return up to 60 results, split across three pages. If a Place ranks 22nd in prominence, it will appear on the second page of results which you can access through paging. If a Place ranks greater than 60th in prominence it will not be included in the search result, even if it is closer to the center of your search.
You can sort your results by distance instead of prominence by setting the rankby parameter in your query to distance and omitting the radius parameter. Relevance will be ignored and places will be returned in order of distance from location.
If you are filtering your request by type, some results may be filtered out of the response.
来源:https://stackoverflow.com/questions/29651633/place-present-on-google-maps-but-not-showing-in-places-api-call