简体   繁体   中英

Google Android API exceeds circle radius

Basically what i'm trying to do is fetch all bars using the Google maps web service, and place markers for each of them on the map. I'm grabbing my current location and fetching all the bars around around me in a 5km radius (5000) meters.

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="+ gps.getLatitude() +","+ gps.getLongitude() +"&radius=5000&types=bar&key="+ GOOGLE_KEY +"

Here's the problem, I fetched in a 5000 meter radius from my house, when I draw a 5000 meter circle radius around my house the markers exceed the circle. The ones that are outside shouldn't appear correctly because they are outside the radius. Is there a reason for it?

您可以在这张照片中看到。

Have you tried with "Radar Search" instead? (Service URL is https://maps.googleapis.com/maps/api/place/radarsearch/output )

Documentation is on this page: https://developers.google.com/places/web-service/search

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM