Hi Matt-

I wrote a description page.
http://googlemaps.googlermania.com/google_maps_api_v3/map_example_direction_customicon.html

My english is poor, but maybe you can understand.

On 10月6日, 午後10:30, "Masashi.K" <[email protected]> wrote:
> Hi Matt-
>
> You can change theiconswith DirectionsRenderer.
>
> First set the value "DirectionsRendererOptions.suppressMarkers =
> true", then pass to the DirectionsRenderer.
> After that, get legs from DirectionsResult.
> (DirectionsResult > routes > legs > start_location and end_location)
>
> In use this example 
> case:http://code.google.com/apis/maps/documentation/javascript/examples/di...
>
> add the suppressMarkers property like this:
> ----------------------------------------
>     var rendererOptions = {
>       map: map,
>       suppressMarkers : true
>     }
>     directionsDisplay = new
> google.maps.DirectionsRenderer(rendererOptions);
> ----------------------------------------
>
> and add the code at the showSteps function:
> -----------------------------------------
>  function showSteps(directionResult) {
>   var myRoute = directionResult.routes[0].legs[0];
>   for (var i = 0; i < myRoute.steps.length; i++) {
>     :
>   }
>
>   //add the last pointmarker
>   varmarker= new google.maps.Marker({
>     position: myRoute.steps[i - 1].end_point,
>     map: map,
>     icon: "http://xxxxx/icon.png";
>   });}
>
> -----------------------------------------
>
> I hope it can help you.
>
> On 10月6日, 午後9:23, Matt <[email protected]> wrote:
>
>
>
>
>
>
>
> > I'musingDirectionsRenderer.setDirections() to plot directions onto my map,
> > and the default markers are A, B.
>
> > Is there anyway to override these so I can have my ownmarkerfor A and
> > another one for B.
>
> > I notice the DirectionsRenderer has a setOptions but from what I can see,
> > the options defined in there are used by all markers for that direction
> > object?
>
> > Any help would be awesome.
>
> > Matt

-- 
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