在 DWC 中嵌入 Google 地图窗口

问题描述 投票:0回答:1

如何在 DWC 应用程序中嵌入 Google 地图窗口。

当我尝试使用 BBjHtmlView.setURL() 时,Google 告诉我不允许在此处嵌入地图。

html框架! = window!.addHtmlView(window!.getAvailableControlID(),0,0,0,0,"") htmlFrame!.setUrl("https://www.google.com/maps/place/Basis+Europe+Distribution+GmbH/@49.2404304,6.953361,17z/data=!3m2!4b1!5s0x4795b161069d159f:0x738a8eb4d9c991db!4m6!3m5! 1s0x4795b16101a09af7:0x37c310d943dbdaa6!8m2!3d49.2404269!4d6.9559359!16s%2Fg%2F1tfkdj8s?entry=ttu")

google-maps embed bbj
1个回答
0
投票

使用 setText() 方法并从 Iframe 中的 Google 地图获取嵌入文本

text! = "<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2604.897796289821!2d6.9559359!3d49.240426899999996!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4795b16101a09af7%3A0x37c310d943dbdaa6!2sBasis%20Europe%20Distribution%20GmbH!5e0!3m2!1sen!2sde!4v1697793016935!5m2!1sen!2sde" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>"
htmlFrame!.setText(text!)
© www.soinside.com 2019 - 2024. All rights reserved.