【问题标题】:Dynamic Long Lat Google Maps embed in Ionic 3Ionic 3 中嵌入的动态长纬度谷歌地图
【发布时间】:2020-05-13 09:45:15
【问题描述】:

我是 ionic 3 的初学者 我正在尝试使用 Json 在我的 ionic 3 上使用动态长 lat 嵌入 Google 地图 但我遇到了问题并且出错了 错误:资源 URL 上下文中使用了不安全的值

这是我的代码:

<iframe width="100%" height="100%" frameborder="0" style="border:0" 
    src="https://www.google.com/maps/embed/v1/place?key=MY_API_KEY&q={{det.latlong}}" allowfullscreen>
    </iframe>

你是如何让它发挥作用的? 谢谢你

【问题讨论】:

    标签: google-maps ionic-framework ionic3 embed ionic-native


    【解决方案1】:

    出于明显的安全原因,存在不安全警告。只需使用消毒剂即可消除不安全的警告。这是一个简单的教程:

    https://forum.ionicframework.com/t/add-video-unsafe-url/88475/9

    【讨论】:

      【解决方案2】:

      我建议您将 ionic 中的 gmaps 与下一个 cordova 插件一起使用:

      https://github.com/mapsplugin/cordova-plugin-googlemaps

      它将允许在设备上使用本机 gmaps 并在桌面上使用网络版本。然后您可以使用 gmap 实例操作相机、位置...。

      【讨论】:

        猜你喜欢
        • 2012-12-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多