Skip to content

Instantly share code, notes, and snippets.

@dminuoso
Created April 17, 2017 08:41
Show Gist options
  • Save dminuoso/282833d2f59142131c5735cccf183e94 to your computer and use it in GitHub Desktop.
Save dminuoso/282833d2f59142131c5735cccf183e94 to your computer and use it in GitHub Desktop.
// The call with a callback to self
try {
winfo = windarea.getWindInfo2(LonLat.lat, LonLat.lon, this.time, wante, wpost);
//this.drawWind(ctx, p.x, p.y, winfo);
var MI = GribMgr.WindAtPointInTime(new Date(this.time*1000),LonLat.lat, LonLat.lon,
function(){this.drawWindArea(p, poslimit, windarea, ctx)})
if (MI)
{
winfo = new Wind(MI.Speed, MI.Heading);
this.drawWind(ctx, p.x, p.y, winfo);
}
else
{
return
}
// The callback caller
for (index in this.LoadQueue[LoadKey].CallBacks)
{
if (this.LoadQueue[LoadKey].CallBacks[index])
{
this.LoadQueue[LoadKey].CallBacks[index]();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment