开发者

Drop Pin on Default Google Maps from My App in Android?

开发者 https://www.devze.com 2022-12-28 03:57 出处:网络
i have an address for a location. when i click some button in开发者_Python百科 my app. it should redirect to default google map in android and drop the pin to that particular location. how to do that?

i have an address for a location. when i click some button in开发者_Python百科 my app. it should redirect to default google map in android and drop the pin to that particular location. how to do that? Any Idea?


The Android documentation describes the various Intents that the Google Maps application will respond to, if it exists on a given device. You will presumably want a geo:0,0?q=my+street+address Uri on an ACTION_VIEW Intent.


Here is an example of how I did it using a "View on map" button. Posting here to help others in need because It took me the whole day to figure it out:

http://randroidblog.blogspot.com/2012/01/view-on-map-activity.html

0

精彩评论

暂无评论...
验证码 换一张
取 消