GDirections with no Markers

February 14th, 2008

I’ve been working with the Google Maps API quite a lot over the past couple of weeks, but one thing that has continuously thwarted me, has been how to remove the little Info Window maps from a route that has been loaded using GDirections and finally I have found the answer. When you load a GDirections object with the optional map panel in the constructor it automatically places the route and markers on the map. The work around is to not provide any arguments to the constructor, and instead load retrieve the GPolyline with the getPolyline method and the getPolyline: true option. Then in the “load” event, add it to the map and presto.


2 Comments to “GDirections with no Markers”


  1. brucini said:

    great solution. i’ve been having the same problem. however, i had always managed to fix it with the following actions: control + f5 . presto.


  2. Michael said:

    Hey Good answer. An annotated code fragment or a link would be useful as your long paragraph is hard to decipher

Leave a Reply