sg

Cumartesi, Aralık 17, 2005

Re: multiple marker snafu


"closures"...hmmm. Kind of like function pointers in C.
The secret is to isolate the addListener business inside a function
without any variables that will change; got it to work like this:

function createMarker(map, marker, html)
{
GEvent.addListener( marker, 'click', function(){
marker.openInfoWindowHtml( html);//NOW CLICKS DO NOTHING
});
map.addOverlay(marker);
}
testarr[i] = new GMarker( point);
createMarker( map, offc_testarr[i], somehtml);

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık