Thanks, Ralph.

I'd tried Mike's tutorial, and although it pointed me towards thinking
that lack of closure was the problem, the penny didn't drop that I had
to wrap the marker and event listener creation into one function. Your
function seems to have done the trick. Thanks again. Tim

On May 16, 11:36 pm, Ralph Ames <[email protected]> wrote:
> Try using this function:
>
> function createMullMarker(posn,title,icon,desc) {
>         var marker = new GMarker (posn, {title: title, icon: icon, desc:
> desc, draggable: false});
>         GEvent.addListener(marker, "click", function() {
>           marker.openInfoWindowHtml(desc);
>         });
>         return marker;
>       }
>
> and call it here:
> .....
> var marker = createMullMarker(posn,title,icon,desc)
> markers.push(marker);
>
> Ralph
> -www.easypagez.com/maps/map_index.html
>
> -
> 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 
> athttp://groups.google.com/group/google-maps-api?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/google-maps-api?hl=en.

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