Hi hzs
I'm just starting to experiment with API v3 myself, but I think I see
how you would do this.
I presume you are using the DirectionsRenderer method of placing the
directions in your directions panel.
Well, you can also manually iterate through the directions results
(each step) that are returned in the result, adding them to a variable
then placing the contents of that variable into your panel.
Since you only want to change the first and last direction, you should
be able to either replace those during the iteration process, or, if
you put each instruction into an array, you can pop them off the array
and replace with your own.
Have a look in the API v3 reference doc at DirectionsService,
specifically the DirectionsStep object
Then also look in the API v3 Services doc, under DirectionsResults
object. This doc has code for iterating through the steps, that you
should be able to modify fairly easily to do what you want.
...stu


On Aug 17, 4:18 am, hzs <[email protected]> wrote:
> I am creating a map using a custom image overlay map type.  In my map,
> entrances to buildings are marked and I'm getting directions from a
> specific entrance of a building to another using latlng coordinates.
>
> The problem I'm having is that in the instructions panel, the start
> and end are being determined automatically as addresses based on my
> coordinates, but not correctly.  For instance, a side entrance to a
> building may be described with a totally different address than the
> front entrance.
>
> I would like to replace the automatic start and end text with text of
> my own, such as "Smith Building, West Entrance".  Is this possible?
>
> Thank you!

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