I want to create an android app like nearby places (Shops,travelling places, Restaurants, etc). How to get the basics of Place API for android? Can someone give me any recommendations or ideas?
App Feathers -
When user opened my app, It's should be show to the user whats near to his place whatever he go.
Any Recommendations?
Google places Nearby Search lets you search for places within a specified area. You can refine your search request by supplying keywords or specifying the type of place you are searching for.
More details : https://developers.google.com/places/web-service/intro
You can use below API:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=1500&type=restaurant&keyword=cruise&key=YOUR_API_KEY
First read and implement Maps SDK for Android
and then basically you need coordinates of the places that you want to show user and the location of user. Good luck!
Related
I am trying to make a android app where I want to show the location of user and the places to visit around that location. Let's say for example I am around certain location and I want to discover popular places around me, so how should I start I have no idea where to begin with ? any help will be appreciated.
Thanks.
You can use Foursquare API to get popular places info based on User location. http://developer.android.com/training/location/index.html
To get User Location , you should read android official document. http://developer.android.com/training/location/index.html
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've been searching all up and down google trying to find this as well as SO. I just want a simple url that will display 1) The person's current location and 2) All search results in that area pertaining to the search string that I supply. So it would look something like this preferably.
http://maps.google.com/maps?location=currentlocation&radius=500&keyword=food
Where the keyword food is any search string that I would like placed in there. I need this to be a url that can be opened in both iPhone and Android (at the very least iPhone). I plan on opening it in a webview or the maps app.
Also yes I have tried plugging in long/lat in place of current location as well and still couldn't get it working. And I know that I will probably end up having to get their long/lat in code and using that, I just want the area search portion to work. If you have any ideas on how to get what I'm trying to accomplish I would appreciate it.
This is the link I get from Google Maps when I search food.
http://maps.google.com/maps?q=food&hl=en&sll=40.796934,-73.949232&sspn=0.018924,0.023174&hq=food&t=m&z=16
It seems to break down like this:
Base URL
http://maps.google.com/maps?
Search Term
q=food
Position
sll=40.796934,-73.949232
Span
sspn=0.018924,0.023174
Zoom Level
z=16
I want to mark historical 'points of interest' across the globe on a mapping solution such as Google Maps (or something else).
I'll be getting an Android app created in which I want to be able to provide the users the ability to search for and locate the nearest such 'point of interests' around their current location.
Should I be using Google Maps or something else like OSM?
How should I be marking them on Google or elsewhere?
(a) I want to be able to mark these places with pictures as well and
(b) I want to store them at my end in a generic format as well, just in case!
How should the Android app search for the closest such points?
As I understand, Google Maps can show its own map overlaid with my data when I provide a KML file (http://code.google.com/apis/kml/documentation/kmlSearch.html). Can that be shown "within an Android app"? (ie, I know it can be shown on a webpage, but can it be shown in a native app?)
I will suggest google maps. Reason is google maps is updated often and part
of the maps from osm is not as latest.
Probably store this marking in your own datastore called point_of_interest.
The info window is also a special kind of overlay for displaying content
(usually text or images) within a popup balloon on top of a map at a given
location. read here for more information.
your android app should detect current user location and send the information
such as latitude and longitude to your server. Hence the query to search
for point of interest is done by the server and process the data and send
back to user android app. For example, the query would be something like
select * from point_of_interest where distance < 10km limit 5;
yes, read this link
Ok, for an app I built for a customer, we had a similar requirement. Basically, I needed to display the locations of interest withing 200miles of my current location. The way this worked for me was that I took my current location and made a Web Services call to their servers where they did the Geographic calculation and returned a list of results to me.
I would have the Android app just use the MapView and then user Overlays to display icons on the map. The problem with displaying the items using kml is that they will not be clickable by the user so their will be no interactivity. If you do choose to do it with kml, there is some example code located in this project: https://github.com/sunlightlabs/congress
I prefer google maps. Google maps SDK looks good and the sdk performs well. I don't know a SDK that has something like a OSMMapView that offers the same performance and features like google maps does (please correct me). But OSM can be as visual appealing as google maps. Cloudmade has tons of different styles for OSM data.
If you want to display maps by google, you have to use the Maps Library that ships with the Android SDK.
You can display any Views on top of the google maps. I.e. use mapviewballoons on github.
If you have lots of POIs that you want to display you should definitely persist you data with a spatial index. So that nearest neighbour searches are fast. One solution would be to use sqlite R*Trees. I did not use them on android and they work not out of the box you have to build sqlite-android yourself (see this question). Or use Perst, or ...
If you have few data, that fits into the phone memory you can use a Quadtree. This would be even faster than the db when searching it. You will find lots of examples when you google it. You could store the data as xml, json or even serialize the whole quadtree with the java Serializable interface.
There are tons of possibillities this question is way too broad. Some random ideas:
Create a server that responds to bounding box searches over HTTP and store the POIs in a Quadtree.
Deliver all your POIs with the app. As database, xml, json or a serialized Quadtree.
I don't have experience with kml on Android.
I want to develop an application in which i want to display restaurants nearby the user.
Say for example i want to display name and address of restaurants located within 3km related to current location of the android device..
I have done alot of reading online and found different links here on stackoverflow.com
I am aware that I must use the GOOGLE PLACES API, I found this link to this blog on this site Introducing the Google Places API
My problem is how to use android/Java to:
1. Send a request to this url : "https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=MYAPIKEY"
2. Then parse the XML or JSON results from this request and display them in a list for the user to see.
Thank you in advance for anyone that can help.
You may want to look at some online tutorials like for instance
http://blog.brianbuikema.com/2010/08/android-development-part-1-using-googles-places-api-to-develop-compelling-location-based-mobile-applications/