html5 – ionic2 Google map streetview在任何iPhone设备上运行时都没有加载图像

前端之家收集整理的这篇文章主要介绍了html5 – ionic2 Google map streetview在任何iPhone设备上运行时都没有加载图像前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在< img>的src中加载​​图像时,我没有得到谷歌地图的街景图像在ionic2中标记.它在 Android设备上工作正常,但在iPhone中,它给出了错误

Failed to load resource: the server responded with a status of 403 (Forbidden)

以下是代码

<img src="http://maps.googleapis.com/maps/api/streetview?size=400x200&location=28.68627380000001,77.22178310000004&key=<API_KEY>”/>

在上面的代码行中

<API_KEY>

是Api键.

为什么它没有在iPhone设备上显示

@H_404_19@解决方法
你需要从谷歌给api_key.
使用这个网站:
https://developers.google.com/maps/documentation/ios-sdk/get-api-key

猜你在找的HTML5相关文章