Hi Pamela,
I'm encountering some funky behavior implementing your example.
I have 10 markers, some of which share the same point. When this
occurs the infowindow should contain a tab for each marker.
This works fine, however, if I am to trigger an infowindow click (by
using the attached grid), the style sheet appears not to load for any
of the duplicated marker infowindows except for the last infowindow
created.
Once I trigger the last infowindow created for a specific lat/lng, all
of the infowindows with that lat/lng render correctly. I'm baffled!
The example can be found at
http://www.bostonrealtylive.com
Here is my code:
var header = $doc.createElement("ul");
header.innerHTML = "<li><a href=\"#fragment-"+markers.length
+"\"><span>Header</span></a></li>";
headers.push(header);
var info = $doc.createElement("div");
info.id = "fragment-"+markers.length;
info.innerHTML = "<p>"+markers.length+"</p>"
infos.push(info);
for (i=0;i<markers.length;i++){
if (marker.getPosition().equals(markers[i].getPosition())){
header.appendChild(headers[i]);
info.appendChild(infos[i]);
}
}
markers.push(marker);
var div = $doc.createElement("div");
div.id = "tabs";
div.setAttribute("style","font-size:8pt;width:400px");
div.style.fontSize=11;
div.style.width="400px";
div.appendChild(header);
div.appendChild(info);
var infowindow = new $wnd.google.maps.InfoWindow({
content: div
});
for (i=0;i<markers.length;i++){
if (marker.getPosition().equals(markers[i].getPosition())){
$wnd.google.maps.event.addListener(markers[i], "click", function
() {
if (currentwindow) {
currentwindow.close();
}
infowindow.open(map, marker);
$wnd.$("#tabs").tabs();
currentwindow = infowindow;
});
}
}
Your help is appreciated!
Mike
On Sep 1, 12:13 am, "pamela (Google Employee)" <
pamela...@gmail.com>
wrote: