Hi,

This question has been asked a lot of times already on the google map v3
group. The point is that you can't change the icons of the waypoints of a
route (as far as I have seen). Since the word "can't" does not exist in
software, I'll try to give you a solution.

The starting point is my
http://www.grasoft.be/mtb/gmap/directions01.htmpage where a route is
calculated based on 4 points, one start, one stop and
two intermediate points.

My first thinking was that I could create extra new waypoint markers on top
of those of the route. This seem to work fine except that you see those new
points only shortly and even then maybe after a refresh of the page. The
icons on http://www.grasoft.be/mtb/gmap/directions02a.htm are the default
icons see your letters are not included yet.

I slightly modified http://www.grasoft.be/mtb/gmap/directions02a.htm into
http://www.grasoft.be/mtb/gmap/directions02b.htm where the difference is
that in 02b I disabled the "map" attribute of the DirectionsRenderer (with a
setMap ()). This means that the route is not drawn anymore BUT the
directions text is still visible (on the right side of the screen). The
extra waypoint markers are shown.

The point/trick with the DirectionsService is that it returns the "response"
on calling the route method DirectionsService. This response contains very
detailed information about the "route" call. I'll work with this "response"
to get what you what.

In http://www.grasoft.be/mtb/gmap/directions03.htm you can read that I walk
thru the "steps" of the calculated route to draw a polyline myself (a red
one). I also include the colored markers you want. With this method, it is
not possible anymore the to click in the directions panel (you can click in
it but nothing happens anymore).
I also do the trick with the setMap described earlier.
You see that the maps zoom factor and center is not ok. I think this has to
do with the drawing of the polyline.

I created http://www.grasoft.be/mtb/gmap/directions04.htm to solve the zoom
and center problem. The trick is to create a "bounds" object with everything
in it and than executing a fitBounds and setCenter.

kind regards from Belgium,
Ronny Aerts


2010/4/6 ICP-Fan <[email protected]>

> Ok, maybe I need to explain what I'm trying to do:
>
> I need to replace lettered waypoint images (A-Z) with my own lettered
> waypoint images. I can replace them all with a static image (no
> letters), but cannot figure out how to replace them with my lettered
> images.
>
> Anyone?
>
>
> On Apr 1, 5:12 pm, ICP-Fan <[email protected]> wrote:
> > I have multiple waypoints and want to change the icons on both the map
> > and directions output. How would I do this without overlaying them?
>
> --
> 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]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

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