var infowindow_forRoutedMarker = new google.maps.InfoWindow({
content: companyName_and_address[i]
});
directionsService.route(request, function (result, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(result); directionsDisplay.setOptions({ draggable: false, infoWindow: infowindow_forRoutedMarker, suppressInfoWindows: false, suppressMarkers: false, markerOptions: ({ clickable: true, zIndex: 3 }) }); } });
Is it possible to change the default infoWindow to my
infowindow_forRoutedMarker?
directionsDisplay.setOptions({
draggable: false,
suppressInfoWindows: false,
suppressMarkers: true})
InfoWindow in which to render text information when a marker
is clicked. Existing info window content will be overwritten and its position
moved. If no info window is specified, the DirectionsRenderer
will create and use its own info window. This property will be ignored if
suppressInfoWindows is set to true"