I have already killed countless hours trying to make this work, without any success.
I'm writing a custom module in Drupal 7
Basically what I'm trying to achieve is the Airbnb-like effect, where I have a map on one side of the site, a list of items on the other, and when I hover an item in the list, the corresponding marker on the map is getting highlighted by changing its icon (I'm using custom icons, so the marker's icon needs to change from blue.png to pink.png)
I generate the map and the markers in a custom module using the functionality of the Gmap module.
a marker looks like:
$markers[] = array(
'key'=> 'key' . $n,
'text' => l($node->title, 'node/' . $node->nid), $node->entity_id,
'longitude' => $node->longitude,
'latitude' => $node->latitude,
'markername' => 'custom blue',
);
What I want to do is to have a Javascript (preferrably jQuery) where a mouseover on a #block-$n div would trigger the marker with a key$n to change its icon from blue to pink.
Can someone help me out, please? many thanks, Zsolt
setIcon('pink.png')function. Did you try it? - 2pha