[android-developers] Google Map Intents, and a pin?
Hi,
I'm launching google maps via an intent. If I supply a lat,lon, no pin
will be displayed on the map. If I supply an address, a pin will
appear. Is there a way to explicitly tell google maps to add a pin,
and what text to put on it?
// lat, lon, no pin.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("geo:" + lat +"," + lon + "?z=" + 16));
startActivity(intent);
// Address, pin appears.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("geo:0,0?q=" + address + "&z=16"));
startActivity(intent);
The intents reference doc doesn't mention anything like that:
http://developer.android.com/guide/appendix/g-app-intents.html
Thanks
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home