On Apr 30, 8:39 am, Matt <[email protected]> wrote:
> Hi all,
>
> More of a theoretical question than a specific one here.
>
> I have a map where the user clicks to set their 'home' location, and
> are then presented with a list of nearby events. They can click on
> these events to see them placed on the map. The info windows for the
> markers contain a 'directions to here' link which I want to generate
> directions from their home point to this marker for.
>
> At the moment I have some code that does this, but it creates new
> markers for each end, which seems pointless since I already have
> markers for both already. Ideally, I just want to do something like
> (psuedocode):
>
> gDir.load("from: marker1 to: marker2);
>
> rather than specifying the lat/lng again.
>
> Is this possible?

Yes.
(psuedocode):

gDir.load("from: "+marker1.getLatLng()+" to: "+marker2.getLatLng());

>
> Thanks
> Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to