0
for (let i of this.latlong) {
this.customWindow = '<div ng-click="mapSearchController.getRestaurantBranchPage(' + i.restaurantId + ')"><img width="150" height="150" src="client/' + i.restaurantImg + '"/>' + '<b>' + i.restaurantTagline + '</b></div>';
let customWindow = this.customWindow;
let marker = [];
marker = new google.maps.Marker({
map: this.map,
position: new google.maps.LatLng(i.latitude, i.longitude)
});
marker.setAnimation(google.maps.Animation.BOUNCE);
//let marker = this.marker;
setTimeout(function() {
marker.setAnimation(null);
}, 1500);
//marker.content = '<div class="infoWindowContent">' + i.restaurantName + '</div>';
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
restoInfoWindow.setContent(customWindow);
restoInfoWindow.open(this.map, marker);
}
})(marker, i));
this.markers.push(marker);
}
所有的标记点击但点击进一步NG单击不工作的信息窗口负载 NG单击犯规打在指令所要求的angularjs功能。
我已经同时使用span和div尝试,但问题依旧,仍然没有呼叫。 由于事先NG单击不工作的信息窗口地图标记
其实我使用angularjs +流动指令,并不能使用$编译以及在它$范围...... –
可以在创建https://jsfiddle.net例子吗?这将有助于了解你确实有? –