On 27 jan, 18:41, Rossko <[email protected]> wrote:
> > > Click marker - opens infowindow
> > but I haven't sidebar entry highlight :-/
>
> Are you really sure you want to do this??  You are going to have to
> think about when you want the sidebar entry to be un-highlighted.  The
> user might click on another marker, or click on the map, or just close
> the infowindow, or mouseover another marker, or mouseover the sidebar,
> or click another sidebar entry.  If they mouseover something, and it
> does change the highlight, what would you like it do when mouseout but
> the infowindow is still open - restore the previous highlight or not?
> You're going to have to decide what you would like to happen in each
> case, and write code to do it.

You are right about the fact I have to think about what I want. Maybe
a simple mouseover/mouseout whith marker.setImage et sidebar highlight
would be enough. But in this case I need to make sure the sidebar
entry appears when the marker is mousovered (because of the lenght of
the table, many entries are hidden).
Do you have an idea how to do that ? Is there a simple way in css or
do I have to use javascript to do that (get the id of the row, and
apply a specific style like position) ?

> Removing a highlight when the infowindow closes would do some of the
> actions, but you will also need to do something like removing any
> existing highlight automatically when setting a new one.
>
> > > Mousever sidebar - highlights marker
> > but no sidebar entry highlight
>
> If you look into your own code to see what your working marker
> mouseover/mouseout listeners do, you can see they do two things;
> one with marker.setImage()
> one with document.getElementById(linkid).style.background()
>
> If you look into your own code to see what your non-working sidebar
> mouseover/mouseout actions do , they do one thing;
> gmarkers[..].setImage()
>
> Pretty clearly you need to change the sidebar mouseover/mouseout
> actions to do two things as well.

Ok, I've made some tests that are not available on this page but it
didn't work... Your explanations make it clearer.

>
> > > Click sidebar - opens infowindow
> > If I use only click in the sidebar entries, I need to double-click on
> > an entry (not the first time) because of an error on the lastlinkid
> > variable ; here is the error Firebug finds : document.getElementById
> > (lastlinkid) is null (line 84).
>
> Looking into your own code, your marker click listener also sets up
> 'lastlinkid' when it opens an infowindow.
> But when you click on a sidebar entry, it calls your function myclick
> () which opens an infowindow but does not set up 'lastlinkid' - so of
> course you need to add code to do that.

Of course, the lastlinkid is determine in the definition of the click
event on the marker in the createMarker function...
Thanks for your help, I'll try to work on that code later (no time
today).

Thanks a lot

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