Hey,

I'm using the Directionsservice class to get the routes and then
trying to display them using the directionsrenderer. However, I get a
weird error like so:

d[tc] is not a function
[Break On This Error] (81 out of range 43)
main.js (line 81)

I really haven't been able to figure it out. I'm checking to see and
everything else works. I can see the result of the call to
directionsservice. When I call getMap() on directionsrenderer, I can
see the map and a property of the map object called "directions".

But the route just won't display!

Any help is appreciated.

---

CODE:

        function draw_route() {
                                directions_service = new 
google.maps.DirectionsService();
                                directions_display = new 
google.maps.DirectionsRenderer({
                                        draggable : true
                                });

                                directions_display.setMap(map); //defined 
earlier

                                directions_service.route({
                                        origin : from_marker.position,
                                        destination : to_marker.position,
                                        travelMode : 
google.maps.TravelMode.DRIVING
                                }, function(result, status) {

                                        if(status == 
google.maps.DirectionsStatus.OK) {
                                                console.log(result); //shows 
the correct array
                                                
directions_display.setDirections(result); //does not work :(
                                        } else {
                                                console.log("error " + status);
                                        }
                                });
                        }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to