Comments (2)
Hi -- sorry for the slow response. I've been out of town for the last two weeks.
I couldn't say offhand exactly what's going on, but I should be able to get a fix for the demo page up within the next couple of weeks (and probably on the dev
branch sooner than that). In the meantime, I can try to point you in the right direction.
The AnimationSync
object wraps each layer in an AutoUpdateAnimation
object, which it uses to animate through each layer's tiles. The AutoUpdateAnimation
object requests new tile times at a fixed interval (eg. every 6 minutes for Radar), and updates the from/to bounds of the animation with the new times.
It is possible that the demo UI is not responding correctly to autoUpdate events. I see two places in the demo code which modify the range input after an autoUpdate:
- The
load:times
event handler- The
AutoUpdateAnimation
has requested and received new times
- The
- The 'change:from change:to` event handler
- The
AutoUpdateAnimation
has updated the animation bounds to match the received times.
- The
If you do not need the autoUpdate behavior for your application, you can easily fix this problem by telling the AnimationSync to wrap the layers in a standard TileAnimation
object, instead of the default AutoUpdateAnimation
object:
var animSync = new aeris.maps.animations.AnimationSync([radarLayer, satelliteLayer], {
from: SOME_TIME,
to: ANOTHER_TIME,
// Default AnimationType is aeris.maps.animations.AutoUpdateAnimation
AnimationType: aeris.maps.animations.TileAnimation
});
I hope this helps you out. The autoUpdate logic can admittedly get kind of confusing, as it necessarily makes some assumptions about how you want the animation to behave over time. I'll try to get to fixing this as soon as I can -- I'm still working through my post-vacation inbox right now, so I'm not sure what all is on my plate for the next week.
Edan
from aerisjs.
Hi Edan,
Thanks for your response. For the time being, I’ve taken your suggestion by using the TileAnimation object instead, and as you noted, this deals with the issue (without advancing the timeframe).
If I have time this week, I can try to look into it a bit more, but this will do for the time being.
Thanks for your work on this!
Luuk
From: Edan Schwartz [mailto:[email protected]]
Sent: Monday, August 25, 2014 10:25 AM
To: hamweather/aerisjs
Cc: Luuk Postuma
Subject: Re: [aerisjs] Sync breaks after time (#25)
Hi -- sorry for the slow response. I've been out of town for the last two weeks.
I couldn't say offhand exactly what's going on, but I should be able to get a fix for the demo page up within the next couple of weeks (and probably on the dev branch sooner than that). In the meantime, I can try to point you in the right direction.
The AnimationSync object wraps each layerhttps://github.com/hamweather/aerisjs/blob/master/src/maps/animations/animationsync.js#L137-L141 in an AutoUpdateAnimationhttps://github.com/hamweather/aerisjs/blob/master/src/maps/animations/autoupdateanimation.js#L40-40 object, which it uses to animate through each layer's tiles. The AutoUpdateAnimation object requests new tile times at a fixed intervalhttps://github.com/hamweather/aerisjs/blob/master/src/maps/animations/autoupdateanimation.js#L70-70 (eg. every 6 minutes for Radar), and updates the from/to bounds of the animation with the new timeshttps://github.com/hamweather/aerisjs/blob/master/src/maps/animations/autoupdateanimation.js#L61-63.
It is possible that the demo UI is not responding correctly to autoUpdate events. I see two places in the demo code which modify the range input after an autoUpdate:
- The load:times event handlerhttps://github.com/hamweather/aerisjs/blob/master/examples/animations/sync.html#L133-142
- The AutoUpdateAnimation has requested and received new times
- The 'change:from change:to` event handlerhttps://github.com/hamweather/aerisjs/blob/master/examples/animations/sync.html#L160-168
- The AutoUpdateAnimation has updated the animation bounds to match the received times.
If you do not need the autoUpdate behavior for your application, you can easily fix this problem by telling the AnimationSync to wrap the layers in a standard TileAnimation object, instead of the default AutoUpdateAnimation object:
var animSync = new aeris.maps.animations.AnimationSync([radarLayer, satelliteLayer], {
from: SOME_TIME,
to: ANOTHER_TIME,
// Default AnimationType is aeris.maps.animations.AutoUpdateAnimation
AnimationType: aeris.maps.animations.TileAnimation
});
I hope this helps you out. The autoUpdate logic can admittedly get kind of confusing, as it necessarily makes some assumptions about how you want the animation to behave over time. I'll try to get to fixing this as soon as I can -- I'm still working through my post-vacation inbox right now, so I'm not sure what all is on my plate for the next week.
Edan
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-53270144.
from aerisjs.
Related Issues (15)
- YUIDoc: "The partial public/header could not be found" HOT 1
- Default map? HOT 1
- maps.Map doesn't support style() (and other google options) HOT 2
- Aeris Map is not updated with Google Map attributes
- Slow down animation? HOT 2
- map.destroy() HOT 3
- Half grey google map HOT 3
- Radar Animations stopped working with google maps HOT 5
- Unable to set KML overlay, might not be a bug but limitation with KML HOT 1
- set minimum zoom HOT 3
- markerCollection.stopClustering() hide all markers on map HOT 8
- Google Maps Error: You have included the Google Maps API multiple times on this page. HOT 1
- Can i have UV index of current localtion / HOT 1
- Can't install via bower
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aerisjs.