Javascript 角度谷歌地图-显示来自两个数据模型的坐标
我试图在一个地图视图上加载两个带有角度谷歌地图的数据模型。我可以加载一个要显示的数据模型,但无法显示来自不同服务的第二组坐标。非常感谢您的帮助。下面是我的代码Javascript 角度谷歌地图-显示来自两个数据模型的坐标,javascript,angularjs,google-maps,angular-google-maps,Javascript,Angularjs,Google Maps,Angular Google Maps,我试图在一个地图视图上加载两个带有角度谷歌地图的数据模型。我可以加载一个要显示的数据模型,但无法显示来自不同服务的第二组坐标。非常感谢您的帮助。下面是我的代码 <ui-gmap-google-map center="map.center" zoom="map.zoom"> <style> .angular-google-map-container { height: 500px; weight:100%; } </style> <ui-gmap
<ui-gmap-google-map
center="map.center"
zoom="map.zoom">
<style>
.angular-google-map-container { height: 500px; weight:100%; }
</style>
<ui-gmap-markers
models="markers"
coords="'coords'"
options="'options'"
events="'events'"
idkey="'_id'">
<ui-gmap-windows show="show">
<div ng-non-bindable>
<div id="window">
<h4>{{name}}</h4>
<h5>{{latitude}}</h5>
<h5>{{longitude}}</h5>
</div>
</ui-gmap-windows>
</ui-gmap-marker>
<!--second set of markers-->
<ui-gmap-markers
models="trips"
coords="'coords'"
options="'options'"
events="'events'"
idkey="'_id'">
</ui-gmap-marker>
在您的示例中,
ui-gmap-windows
指令的模板缺少关闭div
标记,我在为提供的模板显示标记时遇到了相同的问题
因此,不是:
<ui-gmap-windows show="show">
<div ng-non-bindable>
<div id="window">
<h4>{{name}}</h4>
<h5>{{latitude}}</h5>
<h5>{{longitude}}</h5>
</div>
</ui-gmap-windows>
.angular谷歌地图容器{高度:500px;重量:100%;}
{{name}}
{{纬度}}
{{经度}}
<ui-gmap-windows show="show">
<div ng-non-bindable>
<div id="window">
<h4>{{name}}</h4>
<h5>{{latitude}}</h5>
<h5>{{longitude}}</h5>
</div>
</ui-gmap-windows>
<ui-gmap-windows show="show">
<div ng-non-bindable>
<div id="window">
<h4>{{name}}</h4>
<h5>{{latitude}}</h5>
<h5>{{longitude}}</h5>
</div>
</div>
</ui-gmap-windows>