How to make a search on google maps for finding hospitals etc

二次信任 提交于 2019-12-12 05:29:40

问题


I want to make google map where we can search a hospitals , police station etc on the base of current location. But as per the google search i knew that past all Google places api's are deprecated. so i used https://developers.google.com/places/android-api/signup Using this link for crating google places api key,But its not working for me its not getting any data ...

I am referring this link i used to change only api key here http://wptrafficanalyzer.in/blog/showing-nearby-places-and-place-details-using-google-places-api-and-google-maps-android-api-v2/

Its not working not getting any data & when i put my google search api path its shown that is not valid api .

https://developers.google.com/places/android-api/placepicker i m referring this link also but i m not able to find proper solution. Please let me know if any one is having any idea??


回答1:


As per your scenario there is Two keys required and 3 permission when you are going for Near By Places Integration --

1-Android Key

2-Browser Key

Permission on Google Console--

1-Google Maps Android API

2-Google Places API for Android

3-Google Places API Web Service

Hope this will help you.

Thanks




回答2:


Refer this tutorials Google Places API

Make Sure you done following steps right.

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

We need to get an API key from Google to use Google Maps in Android application.

Please follow the given below link to get the API key for Google Maps Android API v2.

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

2. Get the API key for Google Places API

We can create API key for Google Place API by clicking “Create new Browser key” available at the “API Access” pane of the Google console URL : http://code.google.com/apis/console.

Also ensure that, “Places API” is enabled in the “Services” pane of the Google console.

3. Add Android Support library to this project

By default, Android support library (android-support-v4.jar ) is added to this project by Eclipse IDE to the directory libs. If it is not added, we can do it manually by doing the following steps :

Open Project Explorer by Clicking “Window -> Show View -> Project Explorer” Right click this project Then from popup menu, Click “Android Tools -> Add Support Library “

Downlod The Full Source Code From Github.



来源:https://stackoverflow.com/questions/33430559/how-to-make-a-search-on-google-maps-for-finding-hospitals-etc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!