Hi all,

I have a working map with a load of markers, each representing a
property. Some of the markers represent more than one property, so I
am using the GInfoWindowTab object to create a tabbed information
window if it is relevant with a bunch of information detailing the
properties of that marker. If a marker only represents one property, a
normal call to map.openInfoWindowHtml() is used with some HTML.

In order to reduce page load (there is usually a minimum of 100
markers on the map) I am attempting to not load the HTML for each of
the information windows at page load. If a marker only represents one
property then the HTML is loaded dynamically using AJAX when the
marker is clicked on. This works fine.

However, I am struggling to implement this same technique on the
GInfoWindowTab markers. Ideally, I would like to be able to create the
array of GInfoWindowTabs when the marker is clicked on, but this
doesn't work. The current working code is:

var marker = new GMarker(multiple.latlng, markerOptions);

for (var i in multiple.props) {
    infoTabs[i] = new GInfoWindowTab(parseInt(i)+1, multiple.props
[i].html);
}

GEvent.addListener(marker, "click", function() {
    setTimeout(function(){map.openInfoWindowTabsHtml(multiple.latlng,
infoTabs)}, 500);
    panToInfoWindow(multiple.latlng);
    tabsUp(true);
});

Anyone have any ideas on how to do this? It seems to me that infoTabs
must be created when the event is clicked on with some HTML retrieved
via AJAX. The page is available at http://dev.haslams.net. Username:
dev, password: password.

Thanks in advance,

Ed

--

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