Nick,
Upon further testing it works most of the time, but it seems some
selected Indices are actually less than 0. I've discerned no real
pattern as to when it leaves multiple windows open other than if you
open one window and then open another leaving both open, and then open
a third window the second one will shut correctly leaving the first
and third windows open. This continues on if you open further windows
the first window will always stay open while subsequent windows close.
Thanks,
Dean
On Feb 2, 2:48 pm, Nick Rabinowitz <
n...@nickrabinowitz.com> wrote:
> Great question. This is a feature of Google Maps v3, which wasn't possible
> in v2, and I decided to leave it in rather than trying for consistency
> between map providers. OpenLayers has the same behavior, opening multiple
> windows. Eventually it would probably be good to have this be a
> configuration setting in the TimeMap.init() options.
>
> In the meantime, you should be able to do it this way:
>
> tm = TimeMap.init({
> options: {
> openInfoWindow: function() {
> var selectedIndex = tm.getSelected();
> if (selectedIndex >= 0) {
> tm.getItems()[selectedIndex].closeInfoWindow();
> }
> TimeMapItem.openInfoWindowBasic.call(this);
> }
> },
> // etc
>
> });
>
> This sets a custom openInfoWindow function for your items that tries to
> close any open windows before opening the new one. Seems to work in my test.
>
> Let me know if that does it! I'll try to include this as a configuration
> option in the next release.
>
> -Nick
>
> On Wed, Feb 2, 2011 at 10:25 AM, deanf7 <
farrelldlfarr...@gmail.com> wrote:
> > I'm trying to set it so only one info window at a time opens. I
> > looked in the mxn.googlv3.core.js file and it looks as if it's set to
> > only allow one window at a time to open, but in my app and the online
> > example multiple windows can be opened at once. Any thoughts?
>
> > Thanks,
>
> > Dean
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Timemap.js Development" group.
> > To post to this group, send email to
timemap-d...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
timemap-develop...@googlegroups.com<
timemap-development%2Bunsu...@googlegroups.com>
> > .