layerOptions = getLayerOptions();

                map.on('load', function() {
                    timer = self.setInterval('clock()', flashSpeed);
                });

                var init = true;

                function clock() {
                    if (!init) return;
                    loadData(currentTime, currentTime + timeSpeed);
                    //init = false;
                    currentTime = currentTime + timeSpeed;
                }

                function loadData(startTimeStamp, end