我可以访问api,请参阅(http://www.myperkpoint.com/api/v1/perks?lat=53.541962&long=-2.126436&access_token=8f8d9a9d7cdc08cebc387b42af6e5492)我很想和http://angular-google-maps.org/api#markers一起使用,但到目前为止,我的代码没有任何运气
.controller('MapController', function($scope, perksFactory) {
$scope.perks = perksFactory.getPerks();
$scope.map = {
center: {
latitude: 53.544546,
longitude: -2.118732
},
zoom: 8
};
})
我的观点
<google-map center="map.center" zoom="map.zoom" draggable="true">
<markers models='{{ perks }}' coords="{{ perks.company.coords }}"></markers>
</google-map>
答案 0 :(得分:2)
根据提供的网址,我会说
<google-map center="map.center" zoom="map.zoom" draggable="true">
<markers models="perks" coords="'company.coords'"></markers>
</google-map>