Multiple Maps
joeaddison opened this issue · comments
Love nite-overlay! Looks and works great for the most part!
My problem is that I have moved Hawaii and Alaska so that they show just to the left of mainland US and now have 3 separate maps. The refresh functions seems to only be working for Hawaii (the last in the list). I have tried several combinations to get this working, but it eludes me. Is there any way to make this work? Below is my current setInterval function. addHours just ads 1 hour to the now object for testing.
nite.setMap(map.main);
nite.setDate(now.addHours(1));
nite.refresh();
nite.setMap(map.AK);
nite.setDate(now);
nite.refresh();
nite.setMap(map.HI);
nite.setDate(now);
nite.refresh();
Thanks!
Joe
The short answer is you cant. The current code only works for one map, it will need to be refactored to allow multiple instances of nite
. One per map.