我已在我的应用中集成了谷歌地图,这在浏览器中运行良好。
我还安装了 cordova白名单插件并添加了元标记:
<meta http-equiv="Content-Security-Policy" content="default-src *;
script-src 'self' 'unsafe-inline' 'unsafe-eval' *;
style-src 'self' 'unsafe-inline' *">
但似乎没有任何效果。
请告诉我还有什么办法可以让地图在Android设备上运行。
答案 0 :(得分:1)
我通过将https://添加到Google API网址即
来解决了这个问题这
<script src="//maps.googleapis.com/maps/api/js?key=[my key]"></script>
到
<script src="https://maps.googleapis.com/maps/api/js?key=[my key]"></script>