Hello,

I was fighting the same problem about custom markers at direction
route map. The solution I have been using is to hide the DOM elements
containing the marker objects:

function clearDirMarkers()
{
        var divs=document.getElementsByTagName('div');
        for(i=0; i<divs.length; i++) {
                if(divs[i].style && divs[i].style.backgroundImage && divs
[i].style.backgroundImage.indexOf("marker_green")!=-1) {
                        divs[i].style.display="none";
                }
        }
}

I'm calling the function from the direction result function using a
1sec timeout. It is probably not the best solution, but it works at
least while Google presents API extension to handle this /a hope ;)/.

Cheers

On Dec 31 2009, 4:17 pm, Toaster <[email protected]> wrote:
> Hello
>
> The piece of code you posted would be for adding amarkerwould it
> not? I currently have custom markers down but I'm having problems
> altering markers for thedirections(the A & B markers). I'd like to,
> if possible, remove alldirectionsmarkers and add my custom ones or
> telldirectionsto use mine. Thank you for your reply
>
> Cheers
-- 
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