I have a google map using API v3 which gets directions from one location to another. The app works great but the window which gets the directions is an overlay on the map.
None of the above worked for me, this is what I needed:
// Clear past routes if (directionsDisplay != null) { directionsDisplay.setMap(null); directionsDisplay = null; }