Closed saltynexus closed 4 years ago
Use your browser's Developer Tools to debug your JavaScript.
I don't get any errors in my console. Should I be debugging leaflet-velocity.js
? If so, do you know where in the code I should be looking?
OK...I was staring at the screen dumbfounded and sure enough, there was a twinkle in my eye. The code above apparently works, but the scale is sooooo small I totally missed it. Since this data is copied from the demo, I'm not sure where the scaling issue arises. It certainly doesn't look as good as the demo. Any insights?
My bad...I copied the "water" data as opposed to the "wind" data. Everything is working and appears to match the demo. That being said, is there a way to scale the vectors in leaflet-velocity?
I would consider this closed, but thought someone might help to answer my question.
Hi @saltynexus, the issue tracker is really just for reporting problems with the leaflet-velocity
plugin itself, and not suitable for help requests. For questions/discussions of that nature you'd be much better off over at stack overflow.
All the best, Dan
I'm having some trouble getting the demo to display properly. Below is the HTML file I'm using, which is copied from
demo.html
(only exception being I pointed to my javascript file).HTML file:
Below is the javascript code I wrote to display the map and velocity. It is more or less copied from following Leaflet tutorials and the
demo.js
script. One thing that is different is that instead of loading an external file, I just "beautified" the source file and pasted into javascript. I'm brand new to javascript, so this could very well be where I'm making a mistakes.JS file:
One thing I noticed is that when I drag my mouse over the data area, it does in fact display something relating to the data in the lower left part of the window. This makes me believe it's getting some data...however there is no velocity vector display. I'm not sure what I'm doing wrong. I download the files from here and only made the modifications above. Everything else is more or less the same.