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.
Related
I am working on a google maps android app. I have to show more then one route between two locations. I have searched a lot but no success. Please give me the direction how can i achieve this.
Please don't mark it as duplicate. I have checked all questions here. No one tells about alternative paths
Thanks.Please see the attachment this is how i want to show in my app too.
Ok the answer to my question is probably rather simple so let's get to it:
Is it possible to get the user's location directly from the Google Map like the myLocationLayer does it?
To be a bit more precise: I know that there are various possibilities to get the user location and that they are explained wonderfully in answers here on SO like this one. But the Maps API v2 seems so simple and it has so many nice gettters and setters that I can't but wonder if there isn't one to just set
GoogleMap.animateCamera(CameraUpdateFactory.goToUserLocation());
and let Google handle the satellite and network part. They already have the location (you can click on the myLocationsButton and go there immediately) so I would be rather suprised if this is not possible programmatically... But I did not find anything in the API v2 tutorial.
Thanks very much for your input
You may use GoogleMap.getMyLocation(). Note that it is depracted, but IMHO it should not be.
Over the past few days, I am trying to find a step - by - step tutorial to implement google places with the updated version of google maps (in eclipse for Android) with no success.
In the old tutorials I find , the map doesn't appear, because it is not updated in the v2.
Can anyone suggest a way to proceed? I feel lost with all the scattered information I get, and I don't have the experience to change the old examples by myself.
I want to make a simple app, that finds my current location and displays the cafes and restaurants, within 3Km distance. At this point I have tha map showing my location, and I need a tutorial to guide me into implementing Google Places from scratch.
Please help!
I'm actually making an app quite similar to yours! I haven't updated to v2 yet but from what I can tell, the only major difference in implementation is the use of a MapFragment as opposed to a MapActivity.
So you have the map up, yes? Then you should be able to make calls to Google Places the same way you did with the v1 Maps (since they're separate components and don't depend on each other). If Places is what's giving you trouble, I suggest following this tutorial: http://ddewaele.blogspot.com/2011/05/introducing-google-places-api.html. It's pretty good and only needs a couple of tweaks to get things up and running.
If you're still having trouble, post back and I might be able to help you out with some code.
i found this post helpful,i hope you will find it too,
http://mobile.tutsplus.com/tutorials/android/android-sdk-working-with-google-maps-map-setup/
I have been trying for days to simply open up Google Maps and have it animate to my location. I have searched Google and StackOverFlow and tried countless things but I am still not able to accomplish what seems like a simple task. Can someone point me in the right direction for a tutorial that works or offer any guidance?
There are 2 ways:
Get your current location using Local-Base service. Then draw to the map
Try this map option:
mMap.setMyLocationEnabled(true);
Is there a way to mark certain location on android google map like how you can put pins on iPhone apple maps and if so, can you show me or tell me how. I am new to android development and would really appreciate it.
Yes, you use a GeoPoint. Have a look at this tutorial for help on making a mapping app. TUTORIAL
Thankfully, putting a pointer on a map is fairly easy. Basically, you start with a very basic app. Instead of extending Activity, you extend MapActivity. You can then start the tutorial here to create a basic GUI.
Unfortunately, getting a map up and running takes a bit of work. Before you can even see a map, you need a Google Maps API key. It's explained in the documentation, but it can be a bit confusing. Here is a great tutorial explaining how to get an API key.
Once you have a key, you can fire up the example code from the tutorial. Make sure you have a data connection or else you won't see the map tiles. In addition, make sure you have internet permissions in your AndroidManifest.xml file. You also need to paste your new API key into your MapView XML code. The tutorial explains all of this quite nicely.
Once you have all that set up, it's easy enough to add a geographic coordinate to the map. I could explain it here, but Google does a good enough job on the subject. Follow their directions on how to create an ItemizedOverlay class. Then find the coordinates of your house or something and see it on the map.
Good luck!