On May 13, 2:02 pm, Brice <[email protected]> wrote:
>
> Do I have to modify that line of the easyscroll script :
> addEvent(window,"load",easyscroll);
>
> with something like that :
> GEvent.addListener(GInfoWindow,"maximizeend",easyscroll);
>
> or do I have to use that listener in my createMarker function ?
There is only one infoWindow, so you can put
GEvent.addListener(map.getInfoWindow(),"maximizeend",easyscroll)
anywhere in global scope. That is, not in your createMarker function;
nor in the easyscroll script.
Except I've just tried that and it causes no end of problems because
the function "start()" is not fully defined when the code reaches
obj.interval = setInterval("start()",50);
so it causes an error every 50ms.
So: you need to delay running easyscroll until the maximised
infoWindow has sorted itself out. Do this with a timeout:
GEvent.addListener(map.getInfoWindow(),
"maximizeend",
function(){setTimeout(easyscroll,1)})
which again needs to go into global scope. (Lines are separated here:
you can put all of that on one line).
--
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.