gpt4 book ai didi

android - 沿着谷歌地图路线寻找兴趣点? (安卓)

转载 作者:搜寻专家 更新时间:2023-10-30 20:44:06 25 4
gpt4 key购买 nike

doing "points of interest along a route" in google maps这完全符合我的问题......但它不适合 android Activity :/

所以我现在开始复制问题...等一下 :D...aargh!完成!

I need to allow travelers to use google maps to plot a route, and then query my database of points of interest (let's say, McDonald's locations) and then show all of these locations that are within a mile or two of the route they will be taking. The question is, how do I efficiently take the "driving directions" information that comes back from google (essentially an array of lat/long pairs), and turn that into an sql query to get locations that fall within a certain distance from the route? ...and then put the whole thing into my android app?

我不明白:(

最佳答案

要事第一:

1) 您的数据库中是否有 latlng(地理位置)变量类型?

如果答案 (1) == 是: 计算并查询您的数据库:D²=(Xb-Xa)²+(Yb-Ya)² 沿您的每个 Xa,Ya 路线点发现 Distance = D 内的兴趣点 (Ya,Yb)。

关于android - 沿着谷歌地图路线寻找兴趣点? (安卓),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7596738/

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