Google maps api 3 在Google map v3中显示来自方向渲染标记的路线详细信息
我试图在由方向生成的相应信息窗口中显示道路网络信息 渲染标记。例如,单击信息窗口时的标记A包含从A到B的所有详细信息 此外,在源和目的地之间显示了一组航路点。 信息窗口弹出窗口中不显示信息。这是代码的一部分。任何暗示都有可能 帮帮忙,谢谢Google maps api 3 在Google map v3中显示来自方向渲染标记的路线详细信息,google-maps-api-3,driving-directions,Google Maps Api 3,Driving Directions,我试图在由方向生成的相应信息窗口中显示道路网络信息 渲染标记。例如,单击信息窗口时的标记A包含从A到B的所有详细信息 此外,在源和目的地之间显示了一组航路点。 信息窗口弹出窗口中不显示信息。这是代码的一部分。任何暗示都有可能 帮帮忙,谢谢 directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) {
directionsService.route(request, function (response, status) {
if (status == google.maps.DirectionsStatus.OK) {
var roadInfo = document.getElementById("directionsPanel");
roadInfo.innerHTML="<b>"+response.routes[0].roadInfo+"</b>";
directionDisplay.setDirections(response);
var myRoute = response.routes[0].legs[0];
google.maps.event.addListener(request, 'click', function() {
// Open an info window when the marker is clicked on,
// containing the text of the step.
displayStep.setContent(request,myRoute.steps[i].instructions);
});
对于请求,没有单击事件,当您单击标记时看到的infowWindow是由directionRenderer强制执行的,并且您对标记和InfoWindow没有任何控制权,您唯一能做的就是抑制它们
路线没有道路信息
您可以做什么:抑制标记和信息窗口并创建自己的