That did it! Thank you, Larry.
I also added the myclick function to the tohere and fromhere functions
so they would be highlighted also when active.
// This function triggers a "to" event on the marker
function tohere(i) {
myclick(i);
GEvent.trigger(gmarkers[i],"to");
}
// This function triggers a "from" event on the marker
function fromhere(i) {
myclick(i);
GEvent.trigger(gmarkers[i],"from");
}
On Dec 2, 11:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Dec 2, 7:08 am, Geoff <[EMAIL PROTECTED]> wrote:
>
> > I've almost got it, the highlighted link works now but when I click on
> > "to here" or "from here" it defaults to the first marker and also
> > doesn't highlight. Any idea how to get them to sync?
>
> > Here is the link:http://www2.med.umich.edu/healthcenters/medcenter.cfm
>
> 1. you have lots of white space at the top of your page before the
> <DOCTYPE> tag, that is technically not valid.
>
> 2. You have 2 different "i" variables. The global "i" which is
> initialized to 0 and never changed and the "i" local to your for loop:
> for (var i = 0; i < markers.length; i++) {
>
> remove the "var" from that declaration and it will use the global one
> (which is what is used by the createMarker function that you borrowed
> from Mike Williams. The other option is to pass "i" into the
> createMarker function as another parameter and use that inside the
> function.
>
> -- Larry
>
>
>
> > On Dec 1, 5:38 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Dec 1, 1:53 pm, Geoff <[EMAIL PROTECTED]> wrote:
>
> > > > Is it possible to combine the highlighted links features used in:
>
> > > It should be.
>
> > > >http://econym.org.uk/gmap/example_map2c.htm
>
> > > > with the site I have set up with custom markers in the site below:
>
> > > >http://www2.med.umich.edu/healthcenters/medcenter.cfm
>
> > > > Any guidance would be greatly appreciated.
>
> > > Have you tried it? What problems did you run into? If you post a
> > > link to a map where you tried it, run into problems and have run out
> > > of ideas on what is the cause, someone may be able to help.
>
> > > -- Larry- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---