Hey,

I'm working off a localserver so can't point to a link. The rest of my
code works just fine. It's only this portion that is acting off. In
fact, the only error is that the route is not being drawn. Even though
the route is being successfully retrieved and the setMap() is working
fine.

The JS error is this: (in my console, using Firebug)

d[tc] is not a function
[Break On This Error] (81 out of range 44)

My code is kinda large and unweidly. I'm a little embarrassed to show
it off in its entirety.

On Sep 11, 10:14 pm, "[email protected]" <[email protected]>
wrote:
> On Sep 11, 9:39 am, Hasan <[email protected]> wrote:
>
>
>
>
>
>
>
>
>
> > 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!
>
> What javascript errors do you get?
>
> Where is the link to your map that exhibits the problem?
>
> http://groups.google.com/group/google-maps-js-api-v3/browse_frm/threa...
>
>   -- Larry
>
>
>
>
>
>
>
>
>
> > 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