I have a latitude and longitude and I want to open google maps centred at that point. So i use the following code for it:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("geo:"+lat +","+lng));
startActivity(intent);
However, this does not place a marker on the center. I want to place some kind of marker at the the point I start with (and optionally some kind of name for it). Any idea how this can be achieved?
You can simply put latitude and longitude as extras to the intent like this:
And then fetch them from the MapActivity you've started:
Then you can use those values for anything you want. Hope this helps.
You can use it like,
Showing Particular Place,
Showing Route between to Places,