I need to show google map to user and then resolve the address on that map.
I wonder what's the recommended approach for best user experience in Android?
The ways I was thinking of is:
Show current location (or default if not permitted). Put a pin at the place where user taps on the map. If tapped again, then just move the pin. Resolve the address where last pin was dropped
Another approach is same to what uber has: show the map with a pin in the center of the viewport pointing to current location. That pin is still in the center and consumes new position when map is moved against it. Address is resolved when map movement stop event received
Disadvantages of #1 is that it might be not obvious for user that pin needs to be placed on the map
Is there a best practice for this? Or a more intuitive way to do this?
Any suggestions?
These tasks need Google Cloud Api And That is paid.
Reference Links:- https://developers.google.com/maps/documentation/android-sdk/overview
https://console.cloud.google.com/apis/library/places-backend.googleapis.com?project=my-application-359006
Related
Hi, I am new here. So if I have posted my question in the wrong place or any mistake, please do enlighten me. I have more or less browse through many sites searching for an answer but I could not find anything.
Let me briefly explain about how my Android apps will work:
1. There's one part of my apps, it will track the location of the user via Wi-Fi and GPS.
2. It tracks the distance traveled, speed, time taken and etc.
3. Now I planned to add in another feature in, which is:
-> I want to share the route with the map which the user has ran through to Social networks where another user can press into it and the apps will automatically receive the route and map which previously ran by the first user so that he/she can challenge the first user by running the same route as the first one's route (guided by the polylines drawn on the map). Then the apps will be able to track the second user, and a New polyline will be drawn on the route to track his/her progress. (distance traveled, duration and polyline drawn on the Google map)
Ques: How am I suppose to share the map together with polylines which are accessible by others.
I guess you'll have a server side for this as well, so if a user runs, the result will be uploaded to it. You should generate a unique ID for every run like this, and store it connected to the data needed to be stored (distance, speed, etc), and only share a URL from your app, and let the server handle the rest.
In my application I integrated google map. When the map is opened its getting my current location and getting the peoples locations around me from remote server (with a radius of 5000m). Now what if the user moves the map like left, right, up whatever... I want to take the new locations from server which suits to the map at that moment. But I don't know the best practice for that. I can not possible send a query of each single touch (move) right?
if you need to show makers outside of your radius then you will have to use the maps OnCameraChangeListener and when that fires is when the map has stopped moving so then you know it is time to get new data
I want to add markers on map for my android app. I do know how to do it (overlay items). My question is: Since I am manually putting markers on points(on the map) whose lat/long's I already know, I want to know if there is any way to get the exact latitude and longitude of a place on google map? Right now I am asking my people to go to the particular places and use this ( http://bit.ly/K4fOcy ) app to determine the lat/long of that place and send it to me via e-mail. I use these lat/long values to put markers on my map in the app. But the latitudes and longitudes i get are not accurate. they have around 300-2500m error (on real scale).
Or shall I use the Google Places API? How does it work? What about the places which are not in the Google Places database? How do I exactly mark them on the map? I would be very grateful if someone points me in the right direction.
Thanks
If you are working with establishments that aren't represented in the Google Places API and want to be able to pull coordinates directly from http://maps.google.com/, you simply:
Find the location of interest on the map, using an address or just knowledge of the area
Right-click on the map and select What's here? from the context pop-up menu
The Lat-Lng coordinates will be automatically populated in the search input box and usually, the address will also be displayed in the dynamic side-panel (and very often a Street-View photo).
If you are looking for a way to query for the coordinates, you can use the Geocoderdev-guide service to turn addresses into coordinates.
Have you looked at the geocoding API for google maps? It allows you to pass in an address, and returns a Latitude/Longitude pair in response, there is an accuracy value returned with each response to let you know how close the geocoder was able to resolve the location. https://developers.google.com/maps/documentation/geocoding/
My application requires that a user select a location on a MapView. I will be using Google Places API to place location markers on the map. There will be times however when a user might select a location, for example a fountain in a park, that IS NOT listed in the Places API. One option is to offer users a choice of selecting a location with a touch on a map, OR selecting map markers of known locations using two different maps for each activity. I think the perfect solution however would be to use one MapView that contains the mapmarkers but also allow the user to select a location that does not have an associated marker.
My thoughts were to apply a reticle in it's own Overlay that stays centered in the middle of the MapView despite scrolling and a select button to make the selection.
If the reticle is over a marker, for example, Sams Cafe', then the button would read "Select Sam's Cafe'", if the reticle isn't over any Map Markers, then the button would read "Select this location".
I am having trouble figuring out a way to verify the reticle is over a marker. Since the marker is limited to a single GeoPoint, it's going to be very difficult, frustrating and time consuming for the user to try and match the reticle center to the exact GeoPoint.
What would be optimal is a check to see if the reticle is over the Map Marker graphic. I presume this will utilize projections and bounds??
Two questions, How to do this if possible?
or, is there a better UI that I am overlooking that is much easier to achieve?
Thank you for your consideration.
If you use the way you saying is better than anyone, but why dont you keep away any user from any kind of geocoding. Like user selects the location through marker, on the basis of that user will confirm the location, if it has got any place then it will show the address or it will show the nearby location. e.g. let the user select the location from marker get the longs. and lats. , If user confirms that location then put it onto geocoding and get the location address, it will surely return an address maybe exact or nearby and if user likes it, user will confirm it, simple. Please notify if its not feasible way.
I was wondering how I can channel or simulate Google Maps just in the sense of a user types in a location in text, such as a restaurant name and a city name. Then Google suggests 5 or so places they have indexed, and presumably they know the GPS coordinates because Google then puts them on a map. I want to be able to use that feature- not the map, just getting the location.
My goal is for a user to type in a query, 5 options or so to be shown, and if they user chooses one of them, then the GPS coordinates, or a location object, is saved representing that place.
Ideally I could just send the query to Google and steal the results back to my app. Obviously building my own database of locations and an algorithm to suggest them is out of the question.
Thanks for the help and advice in advanced!
Note 1: To clarify, this does NOT involve the current position of the user/device.
Note 2: I looked at the Google Maps add-on API, but it looks like that is for a visual map, not the querying a location part. You are already supposed to know your location, and it will map it.
Use geocoder.getFromLocationName, you get back a list of Address objects, in those objects you will find all the information you need about the location.
To test this on the simulator you need an image with the Google APIs included. In a device should be fine if you have the market installed.