Now that they've exposed the lat_lng arrays of the route steps
polylines, creating a complete custom polyline for the route is easy.

A simple way is to just concat the arrays for each step (trips
[i].routes[j].steps[k].lat_lngs), then set a path using this array.

I'm looping through the steps to get distance, duration, etc. anyway.

On Nov 16, 7:51 am, Phliplip <[email protected]> wrote:
> > A solution to use already existing marker classes would be nice (e.g.
> > if the company logo was used already for map markers, it could just be
> > reused for the "end" point etc - thus trying to keep file size and
> > speed down)
>
> I would also like an aproach like this!
>
> /Philip
>
> On 16 Nov., 06:51, pete <[email protected]> wrote:
>
>
>
> > Thanks for the reply, I might look at doing this, but I agree in that
> > it's a long way to go for custom markers.
>
> > Hopefully something gets added to API 3 like in API 2 for this.
>
> > A solution to use already existing marker classes would be nice (e.g.
> > if the company logo was used already for map markers, it could just be
> > reused for the "end" point etc - thus trying to keep file size and
> > speed down)
>
> > Thanks again
>
> > On Nov 14, 4:49 am,diymapper<[email protected]> wrote:
>
> > > Encoded polyline points are included in thedirectionsresults object
> > > (with DirectionsStep: ..steps[x].polyline.points), but this is not
> > > documented.
>
> > > So, get the encoded polyline points, decode the latlngs from them,
> > > create an array, and use that to place a polyline on the map.
>
> > > Then, you just add your own markers to the beginning and end points.
>
> > > I've done this in a test map and it works fairly well, but I'm hoping
> > > they just make the route polyline available like in V2 (or maybe just
> > > an option to hide end markers?) so I can skip all this.
>
> > > For thedirectionspanel, you could use thedirectionsresults data to
> > > create your own table. A long way to go just to get custom icons,
> > > though.
>
> > > On Nov 13, 9:41 am, pete <[email protected]> wrote:
>
> > > > Hi there,
>
> > > > I am wondering if there is a way to achieve custom image markers for
> > > > use in
> > > > a) The map itself (point a and b)
> > > > b) ThedirectionsPanel (again point A and B)
>
> > > > I know there was a way to do this with API 2, and my question is if
> > > > there is such a way in this API.
>
> > > > I have had a look at the documentation but nothing really stands out
>
> > > > Thanks in advance
> > > > P\- Skjul tekst i anførselstegn -
>
> > - Vis tekst i anførselstegn -

--

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