我用AngularJS。我想展示一个InfoBubble的动态内容和一些AngularJS的功能,如ng点击,ng鼠标.使用InfoWindows,我必须首先编译html,然后将编译后的html设置为InfoWindows的内容。不幸的是,这并不适用于InfoBubbles。当我添加静态html时,它没有问题,但是当我添加编译后的html时,它似乎没有任何内容。
var htmlElement = '<div ng-include="\'/home/include/infoBubble.html\'"></div>'
var compiled = $compile(htmlElement)($scope)
infoWindow = new InfoBubble({
content: compiled[0],
shadowStyle: 1,
padding: 0,
backgroundColor: 'rgb(57,57,57)',
borderRadius: 4,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
arrowPosition: 30,
backgroundClassName: 'phoney',
arrowStyle: 2
});
infoWindow.open(vm.map, marker);发布于 2017-04-11 11:16:36
问题是我没有最大和最小的高度和宽度。设置这些解决了问题。
https://stackoverflow.com/questions/43342119
复制相似问题