2
DirectionsService를 사용하여 Google지도 javascript API를 통해 길 찾기를하고 있습니다. 문제는 당신이 그들에 클릭 할 때 그래서 그들은Google지도 길 찾기 mvcobject는 개별 단계를 얻습니다.
directionsDisplay.setDirections(response);
가하는 기본값으로지도 렌더링 개별 단계를 얻고 아직이 MVC 객체의 일부가 갖고 싶어한다는 것입니다. 일부 코드 :
var directionsService = new google.maps.DirectionsService();
directionsDisplay.setMap(map);
var request = {
origin : a,
destination : b,
travelMode : google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
//Instead of setting directions to a panel i want to
//set just one to a panel and yet have it link to the
//map like the above does.
}});