作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想把街景放在 webView 中。看起来像 this但只有街景。任何想法?我希望有人能帮助我。
最佳答案
使用此代码,您可以在 WebView 中插入街景。您的网址必须是本示例中的 iframe。您可以更改 iframe 大小。
WebView web = (WebView) findViewById(R.id.web);
web.getSettings().setJavaScriptEnabled(true);
String streetWeb = "<iframe src=\"https://www.google.com/maps/embed?pb=!1m0!3m2!1ses!2ses!4v1475148094565!6m8!1m7!1sF%3A-k265GybRcAQ%2FVH3MDcB3A9I%2FAAAAAAAAQTY%2FXZMeIk5IpDsLeewR7wwFhtS5wd6YqB9Gg!2m2!1d48.872337!2d2.777252!3f307.8785102665392!4f18.611126537609977!5f0.5032736111351279\" width=\"600\" height=\"450\" frameborder=\"0\" style=\"border:0\" allowfullscreen></iframe>";
web.loadData(streetWeb, "text/html", null);
关于android - 如何将 streetView 放入 android 的 webView 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24937749/
我是一名优秀的程序员,十分优秀!