【发布时间】:2017-06-13 07:43:01
【问题描述】:
我正在尝试创建一个显示登录用户位置的 ServiceNow Google 地图小部件。我有一个简单地提取用户位置的服务器脚本:
data.location =gs.getUser().getLocation()
我的html如下:
<div class="map-container">
<iframe frameborder="0" src="https://www.google.com/maps/embed/v1/search?key=xxxxxxxxxx={{data.location}}" allowfullscreen/>
</div>
这会呈现来自 Google 的通用世界地图,但不会专门显示用户的位置。我试过用 ng-src 代替 src,但实际上什么也没渲染。
有什么建议吗?
【问题讨论】:
-
您能否查看元素上的源代码,看看它对于
src是否正确? -
嗨,柯克,当我检查元素时,src 在 中正确呈现
-
@Dave:你在服务门户中这样做吗?你能找到生成的 URL 吗?
标签: angularjs google-maps widget servicenow