-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weather for a region is not positioned correcly #46
Comments
The problem is the "scanMode" in the json (and grib) file. Currently only scanMode: 0 is supported. A better fix is to modify the leaflet-velocity JavaScript to interpret the scanMode and adjust the parameters appropriately (and maybe just support a subset of scanModes). For example, around line 530: But really we should decode the scanMode bits and give a message for those we don't support. |
A slightly better (but not tested) fix, at line 530:
|
Thank you very much for this solution! I was struggling with this scanMode as well. So, this worked fine for me! Still not exactly sure why scanMode 64 ( |
I think it is a LSB/MSB thing. I guess I could reorder the scanModeMaskArray in the above code to match the bits in the table https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-4.shtml |
Thanks @brentfraser! Your quick-fix solution worked :-) |
Thanks @brentfraser, please consider putting in a PR. |
Thanks for a great plugin!
I've created wind data for a region and added to a Leaflet map using this plugin:
http://mastermaps.com/racetracker/hardangervidda.html
I'm reading the bounds from the JSON-file and they are correct when I draw a rectangle and zoom the map to these bounds. The wind layer is displayed below the correct position:
Is this a know issue?
The text was updated successfully, but these errors were encountered: