根据用户位置在地图视图上创建叠加层
我正在尝试创建一个应用程序来显示用户位置内的所有餐厅。该位置将从 GPS 获得。我遇到的问题是,为美国所有可能的餐厅手动创建 OverlayItems 是难以理解的。我是否查看了 API 中的某些内容?我认为可能有类似的内置内容。
我认为地理编码器会很有用,我可以从餐馆的地址获取坐标并编写方法来根据该信息创建覆盖项目,但我仍然会丢失信息例如餐厅名称。我只是在寻找建议或想法。
谢谢大家!
I'm trying to create an application that will display all restaurants within the users location. The location will be obtained from the GPS. The problem I am having is it would be unfathomable to create OverlayItems manually for all the possible restaurants in the United States. Did I look over something in the API? I would think that there might be something like this built in.
I thought the Geocoder would be useful, I could get the coordinates from the addresses of restaurants and write methods to create overlay items out of that information, but I would still be missing information such as restaurant name. I'm just looking for suggestions or ideas.
Thanks everyone!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将使用 SimpleGeo 服务来获取餐厅数据,然后使用此类:https://github.com/jgilfelt/android-mapviewballoons 将项目添加到 Google 地图。
您还在寻找什么?
I would use the SimpleGeo service for getting the restaurant data and then using this class: https://github.com/jgilfelt/android-mapviewballoons to add items to the Google map.
What else are you looking for?