首页 文章

如何搜索谷歌 Map 以寻找医院等

提问于
浏览
0

我想制作谷歌 Map ,我们可以在当前位置的基础上搜索医院,警察局等 . 但根据谷歌搜索,我知道过去所有Google地方的api都被弃用了 . 所以我使用https://developers.google.com/places/android-api/signup使用此链接来装箱谷歌放置api键,但它不适合我,它没有得到任何数据...

我指的是这个链接,我曾经只在这里更改api键http://wptrafficanalyzer.in/blog/showing-nearby-places-and-place-details-using-google-places-api-and-google-maps-android-api-v2/

它没有工作没有得到任何数据,当我把我的谷歌搜索api路径显示为无效的api .

https://developers.google.com/places/android-api/placepicker我也引用此链接,但我无法找到合适的解决方案 . 如果有人有任何想法,请告诉我?

2 回答

  • 1

    根据您的情况,当您前往Near By Places集成时,需要两个密钥和3个权限 -

    1-Android Key

    2浏览器密钥

    Permission on Google Console--

    1-Google Maps Android API

    适用于Android的2-Google Places API

    3-Google Places API Web服务

    希望这会帮助你 .

    谢谢

  • 1

    参考本教程Google Places API

    确保您已完成以下步骤 .

    1. Get the API key for Google Maps Android API V2

    我们需要从Google获取API密钥才能在Android应用中使用Google Map .

    请按照以下给出的链接获取Google Maps Android API v2的API密钥 .

    https://developers.google.com/maps/documentation/android/start

    2. Get the API key for Google Places API

    我们可以通过点击Google控制台网址的“API访问权限”窗格中提供的“创建新浏览器密钥”来为Google Place API创建API密钥:http://code.google.com/apis/console .

    另外,请确保在Google控制台的“服务”窗格中启用“Places API” .

    3. Add Android Support library to this project

    默认情况下,Eclipse支持库(android-support-v4.jar)由Eclipse IDE添加到目录libs . 如果没有添加,我们可以通过执行以下步骤手动完成:

    单击“窗口 - >显示视图 - >项目浏览器”打开项目浏览器右键单击此项目然后从弹出菜单中单击“Android工具 - >添加支持库”

    来自Github的完整源代码 .

相关问题