To use google places API in our Android application, a key is needed. I have got a key now. But I don't know about how do i use it in my application and how to do search for a specific place. Also, please can anyone explain about what are the prerequisites for using Places API in my application. I have searched manything. But I didn't understood that.
1) Can anyone explain please with complete code.
2) Also, explain how do I search for a place by using latitude and longitude values in Place API
Please refer my answer on Google Places Api
Pass Your location to search and your api key in url and my code also shows how to find nearest place.
Thanks
Related
I tried hard to find the way to search places by setting query parameter along with type inGeoDataClient.getAutocompletePredictions()api.
But i could not find any way to find exact places with type or name as supplied query.
if i pass 'airport' it gives so many result like places having 'airport' in description or name.
I just need airports nearby from this api, Guys please help, only option till now is to use web services. But as an android developer i want to use android api.
Thanks in advance.
https://codingsquared-prod.apigee.net/masaajid?lat=40.518715&long=-74.41209500000002
this is a online API which i want to add in my app
i want to add the latitude and longitude to my map, but for now i cant figure out how to read the API and what to do with it
i would also like to put each different id in a listview as well
any help in how to read this API would be great, thanks
You should learn how to work with JSON. Here is a good tutorial I found about it.
i know there is lot of stuff on Google map and completed almost all things like showing current location, finding nearest places using Google Place API, searching a place but i want when somebody types in Edit Text for searching places it should show drop down list of all places names matching his entered sub string.
i tried a lot but not found good solution. thanks
Sorry Friends i just got the answer of this question from this link https://developers.google.com/places/documentation/autocomplete
You can use google web services API to search to get list of suggested words.
This will provide more information than expected. But you can have a try.
For more on google web service API visit https://developers.google.com/places/documentation/autocomplete
I want to get the default search functionality available in google maps on my android project.For example if i search "doctors in india" Gmaps will show many points, how can i get this work without using Itemized Overlay or by using some json request.Can somebody please suggest me an idea.
You could use Google Places API to get a JSON for your query.
If you are looking to avoid using any library or API (because you have to register to get the API key) you could just use a webview and put a maps.google url.
for example:
https://maps.google.com/?q=New+York&z=13&t=m&output=embed
or
https://maps.google.com/?q=near:doctors+in+india&z=13&t=m&output=embed
You will find that the parameters here are not documented ,Here is a link i found useful for the parameters.
I want to find the path between two locations on Google Maps which I have clicked.
So when I click anywhere on the map I want to get the latitude & longitude.
How can I do that?
I don't know how much research you have done but there are tons of simple to follow tutorials to do what you are asking about. I'm sure you have a specific goal you are trying to accomplish but you should take a look at this open source project I came across when I googled android gps services
http://code.google.com/p/gpslogger/
take a look through the source code in that project and I guarantee you will see how to do exactly what your asking.
I'm pretty sure you would use the android.location services so you could also google how to use those. But in order to see them in use you definitely should check out that link I posted above.