You've got a lot of complex questions in there. I'll try to answer one
of them. To get the effect of highlighting a table row when the user
mouses over a marker, I would do the following:
1. Create a style in CSS that highlights a table row. Something like:
tr.highlight {
  background-color: yellow;
}

2. When you create the markers, add a property that uniquely
identifies the location:
  marker.myId = x;

3. Use that same value as the ID for the table row DOM node:
row.id = x;

2. After creating the marker, add listeners for the mouseover and
mouseout events, 
http://code.google.com/apis/maps/documentation/v3/reference.html#Marker.
The mouseover listener will get the marker as the first argument. Use
that to find the table row using the property you added to the marker,
and apply the highlight class:
function mouseOver(marker) {
  getElementById(marker.myId).className = 'highlight';
}

And remove the class in the mouseout handler.
function mouseOut(marker) {
  getElementById(marker.myId).className = '';
}

Hopefully that helps. I might have messed up a detail or two above,
but that basic idea works pretty well unless you have hundreds of
markers.

Dave



On May 3, 11:42 am, abemonkey <[email protected]> wrote:
> I am working on a map application that will loop through a table and
> push markers into a map based on the latitudes and longitudes in the
> table (I have this part working). Also I'm generating info windows for
> the pins as well (this is sort of working, just not behaving how I
> want it to). I want the script to run whenever the table's contents
> changes based on ajax calls to the database (I'm using a proximity
> search function in the Drupal CMS). I am have a couple of problem and
> questions. I think that the easiest way to figure to figure out if I'm
> heading in the right direction for what I want to do is to communicate
> all the desired functionality of the script. I want it to loop through
> and get the lat and longs from the table and push pins into the map
> and zoom and pan to fit the markers in the view. I want the user to be
> able to click on a table row and have the assiciated pin's info window
> open. I would like the user to be able to hover over the pins and have
> the associated table row highlight. I'm thinking maybe I should push
> the pins one at a time (as opposed to how I'm doing it now) and assign
> each pin a css class and give the corresponding rows the same classes
> to achieve the hover effect? Here is where the code resides, you can
> see what I have so far in action and please let me know if I'm
> starting out in the wrong direction:www.axtsweapons.com/maptest.html.
> Thanks!
>
> --
> 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 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

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