DirectionRender将标记A,B,C .....绘制为Route之间的航点。如果我们点击该Marker,它会显示包含Address的Default InfoWindow。所以我想把我的自定义InfoWindow放在Markeres上如何做到这一点??
答案 0 :(得分:0)
您可以通过创建如下变量来为您的信息窗口提供自定义内容:
InternalTrace.Initialize(TestContext.CurrentContext.WorkDirectory + "nunittrace.log", InternalTraceLevel.Debug);
并将此变量在google.maps.Infowindow中传递为:
var content = '<h1>Custom heading</h1>' + '<p>Custom paragraph</p>';
并添加一个事件监听器:
var infowindow = new google.maps.InfoWindow({
content: content,
maxWidth: 350
});