简体   繁体   English

像浏览器一样来自片段的Android Google Map

[英]Android google map from a fragment like a browser

for my GoogleMaps API to run, the user needs to install Google Services. 为了运行我的GoogleMaps API,用户需要安装Google服务。

I don't want my user to feel obligated to do that. 我不希望我的用户有义务这样做。 I wonder if it is possible for me to create a fragment or something like a WebView and access Google Maps through browser (frame in my app) and the user doesnt need to install google services. 我想知道是否可以创建片段或类似WebView的内容并通过浏览器(我的应用程序中的框架)访问Google Maps,而用户不需要安装google服务。

Any advice, tutorial or example would be very appreciated. 任何建议,教程或示例将不胜感激。 Thank you very much for your time! 非常感谢您的宝贵时间!

You have to use WebView element and simply use this: 您必须使用WebView元素,并且只需使用以下命令:

WebView browser = (WebView)findViewById(R.id.browser);
browser.loadUrl("maps.google.com");

Or use this 或使用这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM