I ve tried this:
function addMarker(id,latitude, longitude) {
var marker
marker = new GMarker(new GLatLng(latitude, longitude));
GEvent.addListener(marker, 'click',
function() {
var infoTabs
GDownloadUrl("/producteurs/info_window?id="+id, function
(json, status){
var data = eval('(' + json + ')');
alert(data.producteur.produits)
infoTabs = [
new GInfoWindowTab("Présentation", "toto"),
new GInfoWindowTab("Produits",
data.producteur.produits),
new GInfoWindowTab("Ouverture", "tata" )
]
}
);
//marker.openInfoWindowHtml(description);
var options={selectedTab : 1 , maxwidth : 400};
marker.openInfoWindowTabsHtml(infoTabs, options)
}
);
markers.push(marker);
}
the alert message (filled out with inh info) pops up after the
infowindow (empty).
It seems the marker.openInfoWindowTabsHtml method doesn't wait the
execution of GDownloadUrl
thanks for your help
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---