【发布时间】:2015-05-14 08:21:53
【问题描述】:
在我的一个客户项目中,我正在使用 ngMap (http://ngmap.github.io/),但我对这个“指令”有疑问:如何使用标记集群和这样的地图:
<div ng-controller="MyCtrl">
<map center="41,-87" zoom="3">
<info-window id="foo2">
<div ng-non-bindable="">
Lat/Lng: {{this.getPosition()}}<br/>
<ul>
<li ng-repeat='item in store.items'>{{item}}</li>
</ul>
</div>
</info-window>
<marker ng-repeat="(id, store) in stores" id="{{id}}"
position="{{store.position}}"
on-click="showStore(event, id)"
></marker>
</map>
</div>
我在示例页面和代码中进行了搜索,但没有关于如何在我的情况下使用标记集群的文档。
有人使用这个 ngmap 吗?还是我需要更改 google map angularjs 指令?
谢谢。
【问题讨论】:
-
嗨,我知道示例页面,但在该页面中没有信息窗口,并且信息窗口(在 ngMap 指令中)是在控制器外部的
-
@ZioBudda 有你解决你的问题。我和你有一个非常相似的问题
标签: angularjs google-maps ng-map