0
我試圖通過方向產生相應的信息窗口顯示路網信息顯示路線的細節呈現在谷歌地圖V3標記
渲染marker.Eg標記一個點擊信息窗口包含從A到B的所有細節時
此外,在源和目的地之間顯示了一組航點。
信息不會顯示在InfoWindow彈出窗口中。這是代碼的一部分。任何提示可能
幫助謝謝。
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);
});