我有一张ng-map,我试图在标记点击时弹出一个infoWindow。当我尝试在html中添加infoWindow时,地图消失,控制台中没有错误。这是我的HTML:
<div map-lazy-load="https://maps.google.com/maps/api/js"
map-lazy-load-params="{{googleMapsUrl}}">
<ng-map center="41,-87" zoom="3" on-click="mapClicked()">
<info-window id="marker-iw">
<div ng-non-bindable="">
hello
</div>
</info-window>
</ng-map>
</div>
如果我删除&#34;你好&#34;,地图显示就好了,但是infoWindow是空的。如何显示地图和infoWindow?
答案 0 :(得分:1)
感谢此页面,我找到了解决方案:https://github.com/allenhwkim/angularjs-google-maps/issues/648
我只需要在ng-map标签中添加default-style =“true”:
<ng-map center="41,-87" zoom="3" on-click="mapClicked()" default-style="true">