启动外部活动以显示地图
这是怎么回事。我想启动一个外部活动来显示地理坐标,而不是在我的应用程序中实现 Google 地图。目前我手头上的东西太多了,我不想经历实现地图的麻烦。因此,是否可以将参数传递给外部地图活动,类似于我们对短信、电话、相机等所做的操作?
非常感谢!
This is whats up. I want to start an external activity to display geo-coordinates, rather than implement Google Maps inside my application. Currently I have too much on hand, and I don't want to go through the hassle of implementing a map. Therefore, would it be possible to pass the parameters to the external maps activity, similar to what we do with text message, phone call, camera, etc.?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用以下命令执行此操作:
另一种方法是使用地图网站 url。这将询问用户是否要打开地图应用程序(如果已安装)或浏览器:
这里还有一些其他示例:https ://github.com/pboos/GoogleMapExamples(查看其中的Presentation.pdf文件)
编辑:
要根据安装了谷歌地图应用程序的事实来使用上述两个功能(以上两个功能都需要也存在):
You can do that with this command:
Another way is to use the maps website url. This will ask the user if he wants to open the maps application (if installed) or the browser:
Some other examples here: https://github.com/pboos/GoogleMapExamples (look at the Presentation.pdf file in there)
EDIT:
To use both above depending on the fact if the google maps application is installed do this (both above functions need to exist as well):
实际上,您可以通过访问浏览器并访问谷歌地图的网站,然后运行您想要的任何类型的查询来使用地图 Web 应用程序。查看地图的 api。
You can actually use the maps web application by going to the browser and going to the google map's website and then running whatever kind of query you want. Look at the api for maps.