socib / Leaflet.TimeDimension

Add time dimension capabilities on a Leaflet map.
MIT License
435 stars 138 forks source link

Fire map.timeDimension on pageload? #170

Open prasanjitdash opened 5 years ago

prasanjitdash commented 5 years ago

On change of date/time in the TimeDimension, I'm trying to trigger a few processes, as follows:

map.timeDimension.on('timeload', function (data) { / do what you want / }, this);

Is there a way to fire this condition on page load, e.g., map.timeDimension.fire('timeload');

In other words, how to initialize this on page load so that the block '/ do what you want /' already executes on page load. - something which is available in jquery e.g., $("selector").prop("disabled", true);

Thanks