Is it possible to add the location name before the address of each waypoint on DirectionsRenderer?

29 views
Skip to first unread message

Dan

unread,
Sep 14, 2011, 7:48:58 PM9/14/11
to google-map...@googlegroups.com
By applying the concept of this example:
http://code.google.com/apis/maps/documentation/javascript/examples/directions-panel.html

Is it possible to add the location name before the address of each waypoint on DirectionsRenderer?
e.g.


Martin™

unread,
Sep 14, 2011, 11:02:08 PM9/14/11
to Google Maps JavaScript API v3
Hi.

Not with V3 of the API:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=2775

Martin.


On Sep 15, 12:48 am, Dan <d.chen0...@gmail.com> wrote:
> By applying the concept of this example:http://code.google.com/apis/maps/documentation/javascript/examples/di...
>
> Is it possible to add the location name before the address of each waypoint
> on DirectionsRenderer?
> e.g.
>
> <https://lh3.googleusercontent.com/-DXUPQCgRLxI/TnE9Rq-TqvI/AAAAAAAACI...>

Dan

unread,
Sep 14, 2011, 11:45:27 PM9/14/11
to Google Maps JavaScript API v3
no....... :(

geoco...@gmail.com

unread,
Sep 14, 2011, 11:58:28 PM9/14/11
to Google Maps JavaScript API v3
On Sep 14, 11:45 pm, Dan <d.chen0...@gmail.com> wrote:
> no....... :(

Did you read comment #2?

-- Larry

Dan

unread,
Sep 15, 2011, 12:09:53 AM9/15/11
to google-map...@googlegroups.com
i'm 95% done with my project and everything's in v3.
it's gonna be too much of a hassle and i'm running out of time.
so i will skip this part and use marker and infoWindow to make some alternatives.

geoco...@gmail.com

unread,
Sep 15, 2011, 12:14:23 AM9/15/11
to Google Maps JavaScript API v3
On Sep 15, 12:09 am, Dan <d.chen0...@gmail.com> wrote:
> i'm 95% done with my project and everything's in v3.

The point is that you _can_ do it in v3, but it requires more work
than v2.

-- Larry

Dan

unread,
Sep 15, 2011, 12:20:02 AM9/15/11
to google-map...@googlegroups.com
Is there an example other than the description of DirectionsLegs in the v3 API reference?

MymsMan

unread,
Sep 15, 2011, 7:21:14 AM9/15/11
to google-map...@googlegroups.com
Thats brilliant!   I hadn't realised that you could change the results returned by the directions service and that the Renderer would use the changed text.
Its obvious really but I'm getting old! :-)

So it is trivial to update what will be displayed;

var directs = dirObj.Rend.getDirections();
var leg = directs.routes[0].legs[0];
 leg.start_address='My Start address';
 leg.end_address='My end address';



Reply all
Reply to author
Forward
0 new messages