PDA

View Full Version : Mouseover


ned378807
07-20-2009, 12:05 PM
Hi,

Can anyone tell me how to get the info bubble appearing on mouseover ?

Cheers

Ned

ned378807
07-22-2009, 01:28 PM
worked it out I just changed the word click to mouseover in the following listeners

GEvent.addListener(marker_0, 'click', function() {
marker_0.openInfoWindowHtml(address_0.infowindowte xt);
});

changed to

GEvent.addListener(marker_0, 'mouseover', function() {
marker_0.openInfoWindowHtml(address_0.infowindowte xt);
});

sysop349733
12-05-2009, 10:49 PM
Thanks for this tip. I was looking for how to do this, but now that I've implemented it, it would work better on my map if the balloon disappeared on mouseout. Does anybody now how to make that happen?

sysop349733
12-05-2009, 11:27 PM
OK, I think I figured it out, although I'd welcome any corrections or improvements.

After the mouseover listener, I added a mouseout listener that calls the fucntion map.closeInfoWindow();

This works for me. I found three instances of the openInfoWindowHtml listener and added the map.closeInfoWindow listener after each. So my code, using dynamic addresses from a record set, ends up looking like this (in three places):

GEvent.addListener(marker_0_<?php echo $Recordset1_id; ?>, 'mouseover', function() {
marker_0_<?php echo $Recordset1_id; ?>.openInfoWindowHtml(address_0_<?php echo $Recordset1_id; ?>.infowindowtext);
});
GEvent.addListener(marker_0_<?php echo $Recordset1_id; ?>, 'mouseout', function() {
map.closeInfoWindow();
});

Bryan M
12-07-2009, 05:43 PM
This is a great thread! I was just about to ask the same question. It would be a great feature for the plug-in. Perhaps a tick-box to select either click or mouseover?

Cheers

flhomesites394744
02-05-2010, 08:31 PM
Hi,

What file is this located in?

sysop349733
02-06-2010, 07:23 AM
That will be in the wag_map file.

flhomesites394744
02-06-2010, 08:34 AM
Thanks for your help!

Would you know the coding for the mouse out with the addresses not in a recordset?

sysop349733
02-06-2010, 08:51 AM
Not exactly as I have only used ProMaps with a recordset and never with static addresses, but this is where the address is represented as a variable:

<?php echo $Recordset1_id; ?>

So I would imagine that replacing that with the static address ID would be the way to do what you want.