Tutorial for getting nearest bars using Android Places API? - android

I would like to use the Places API to find the geocoordinates of the nearest bars using Google Places. I'd like to store around 15 of the nearest geocoordinates in an ArrayList. Does there exist a simple demo of how to accomplish this? More generally, I would like to see a quick and dirty concrete working example of how to use the Places API to query for locations.

This link will help you. https://developers.google.com/places/#PlaceSearches you can get all nearest locations using the goole api.

Related

Google Places Android

I am trying to get a list of places of a certain type like restaurants, nearby a certain latlng. I looked into the Google Places SDK for android but I couldn't find anything for this use case. It has the autocomplete and current place search but nothing for searching a certain type of places for a reference location. The Places web API has this feature but I was wondering if it would be possible to achieve the same with the Android SDK for Places. Something like below. It's an example from the Places API
https://maps.googleapis.com/maps/api/place/findplacefromtext/output?parameters
Try to use google places Api
https://developers.google.com/places/web-service/search
Try to implement the below api with proper modification with your Your_API_KEY
Change Params: radius , type, location
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=restaurant&keyword=cruise&key=Your_API_KEY

Google Places API Android find places via LatLng

I am trying to use the Google Places API on Android to find Universities on a map based on where you click.
So ideally I could feed the Places API a coordinate and it could tell me the Universities around this coordinate. The PlaceDetectionAPI only has .getCurrentPlace and I don't just want where the user is currently.
Any help will be greatly appreciated!
Thank you
You can use the Autocomplete API with "University" as a starting string to obtain nearby places that match that query.
Although that's not really the best solution, so you may want to get your own database of university coordinates and match them to your user's location.

Google Maps Android API v2 - DirectionsRenderer

I already searched on StackOverflow and Google. But i didn't find a real answer. I think there is just no DirectionsRenderer in the Android API. But can you acknowledge this?
If there is not DirectionsRenderer, how could i use the Android API to show a GoogleMaps and draw a Route on the Map?
I want to draw a nice route. Not just lines between the coordinates of each route-section which are also delivered from the Directions-Request.
I think there is just no DirectionsRenderer in the Android API. But can you acknowledge this?
There is no DirectionsRenderer in Maps V2. You can tell this by reading the documentation.
how could i use the Android API to show a GoogleMaps and draw a Route on the Map?
There is nothing in Maps V2 to support this.
I want to draw a nice route. Not just lines between the coordinates of each route-section which are also delivered from the Directions-Request.
You will need to find some Web service that will serve up coordinate information for the route with sufficient granularity (e.g., every 10m) to give you your "nice route", then use a Polyline or something like that for actually rendering the route.
SO i found out that it is possible to just take the legs, then the steps and within the steps you will find the "points".. when you decode the points string its a very detailed list of all coordinates.
with this coordinates, you can easily draw a nice route on the map.
so it's possible without the need of a additional Web-API.

Getting nearest bus stations from Google Map inside Android Application

I am working on an Android application in which I need to achieve the following goals.
Get the current position(co-ordinates) of the device - Done
Search within a given radius centering the device position for the nearest bus stations and List them.
I need help on the second thing. Is there any way to get the Nearest bus stations from the Google Map inside an android application? Can I use Google Places API to achieve this?(the official page says that it's still experimental). If yes, how?
Thanks.
I could successfully achieve these by referring Davy's Tech Blog Article and the code sample provided in Github
Thanks for your help.
Do a reverse geocoding on your coordinates:
https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
then do a search like this:
https://maps.google.com/maps?q=transit stop near the_address_obtain_with_reverse_geocoding&output=json

Display route in android

I am using following example source code but I can't get long distance route in map. It only works for small distance on map.
Is there are any limitation to access map?
If some one has better idea please help.
Here is a complete source code at https://github.com/frogermcs/RoutePathExample for how to draw path between two geolocation. I use this code without any trouble at all. You should check it
Make use of this secret Google API and Android Map API to show the distance between two points.
I am using this code and it is working fine, even if I put two points in two different countries. I believe you are not implementing it in the right way, because this code is retrieving the KML provided by Google for the two points you choose, which always returns a route unless the two points are in different continents and there is no route for going by car.
I suggest you show us how did you use the code in your app.

Categories

Resources