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

可紊 提交于 2019-12-11 14:54:11

问题


i have an address for a location. when i click some button in 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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/2683287/drop-pin-on-default-google-maps-from-my-app-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!