我是 Google Maps v3 API 的新手,想知道在构建方向时是否有办法显示具有不同标记的航点,例如:
function calcRoute() {
var request = {
origin: "Sydney, NSW",
destination: "Sydney, NSW",
waypoints:[{location: "Bourke, NSW"}, {location: "Broken Hill, NSW"}],
travelMode: google.maps.TravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});
}
所以用另一种方式表达我的问题,有没有办法让航点显示为白点,而起点/目的地显示为谷歌的绿色标记?
提前感谢您的帮助!