You can add a direction form at a marker in a kml file. You have to add the following html:

    <form action='' method='get' target='_blank' class='mapdirform'>
        <br />
        Directions to here<br />
        <input type='text' class='inputbox' size='20' name='saddr' id='saddr' value='' />
        <br />
        <input value='Get Directions' class='button' type='submit' style='margin-top: 2px;' />
        <input type='hidden' name='daddr' value='address' />

Replace address with the coordinates or address where the marker is placed. 


{mosmap kml=''}

This can cause a problem with the infowindow in Firefox when combining with dir=1 and KML renderer Geoxml.