How to get the event on changing the selected route displaying in a google render container?

前端 未结 2 1358
我在风中等你
我在风中等你 2020-12-21 20:53

Here is the code :

var map = new google.maps.Map(document.getElementById(\"map_canvas\"), $scope.map_options);
var dirService= new google.maps.DirectionsServ         


        
2条回答
  •  粉色の甜心
    2020-12-21 21:23

    Here is the event :

    google.maps.event.addListener(dirRenderer, 'routeindex_changed', 
                        function() { 
                    alert(dirRenderer.getRouteIndex());
                });
    

提交回复
热议问题