gpt4 book ai didi

android - 在android上不使用 map 对象的附近地点列表

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:13:16 25 4
gpt4 key购买 nike

我正在制作一个 android 应用程序,它需要检查用户是否靠近感兴趣的地方,例如电影院。 (1公里以内)

但是我不需要用户看到我认为使用 google places api 所必需的 map 。我做了一些研究,但不确定如何在 android 上完成此操作。任何提示(包括评论或相关链接将不胜感激)

最佳答案

查看附近的站点,

1.- 使用来自谷歌地图的附近搜索请求link here

2.- 使用手机坐标,获取坐标附近的电影院列表...

https://maps.googleapis.com/maps/api/place/radarsearch/json?location=51.503186,-0.126446&radius=5000&types=movie+theater&key=YOUR_API_KEY

3.- 比较两个坐标,发挥你的魔力,也许通过这两个点获得距离并向用户显示距离..

Note: if you want a lot of special places, you will need to see another way to do it. That's what I thought... is, in your server need to do a request by coords with a lot of nearest places, (museum,movie theater, etc.), and save that because google charges you when the server check in many times, when the user send the coordenates you will have a list of nearest places, if not, consult a list of best pleaces and save in your server and send to user,

you will need to use a some calculate coordenates, like range, if user is near of this coordenates that i have in database send that information if not, do request to server to consult nearest places (with your predefinite list)

对不起我的英语。

更多信息的链接
Find Places Nearby in Google Maps using Google Places API–Android App
Places APIs and Related Products
how to display nearby places like atm,hospitals in android google map?

关于android - 在android上不使用 map 对象的附近地点列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41794662/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com