Check variable declaration and chenge to:
var directionsDisplay; //instead of directionDisplay;
//Invoke the setPanel method after object instatiation.
directionsDisplay = new google.maps.DirectionsRenderer(
{
suppressMarkers: true,
suppressInfoWindows: true
});
directionsDisplay.setPanel(document.getElementById("directions"));
On Mar 9, 3:42 am, Ian <[email protected]> wrote:
> Hi,
>
> I am having trouble trying to get the directions to display on my
> google map.
>
> The map is supposed to get the address from the hidden field
> inhttp://apexwebstudio.com/maps/googlemaps.phpwhen you press the show
> button, then calculate the distance, time and directions then display
> them in the map_canvas and directions divs.
>
> However when I add the directions code it stops the route from being
> calculated and displayed on the map, and the directions won't display.
>
> Map directory:http://apexwebstudio.com/maps/
>
> I would really appreciate your help on this.
--
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.