onaci / leaflet-velocity

Visualise velocity data on a leaflet layer
https://onaci.github.io/leaflet-velocity/
Other
596 stars 213 forks source link

drag too lag. #48

Closed worlddai closed 4 years ago

worlddai commented 4 years ago

Thanks for This Great Plugins First.

I have created a demo by leaflet-velocity , the latest version 1.7 . the problem is when I drag or zoom the map.it seems that too lag. but the data is simple and short. the map projection is EPSG:4326 (wgs84)

[{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.5,-0.87,1.21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.61,0.5,-1.84,-2.3,2.56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1.05,0.55,1.03,0.09,0,0,0,0,0,0,0,0,0,0,-1.38,-1.54,-0.33,2.15,-3.48,-4.66,-6.3,0,0,0,0,0,0,0,0,0,0,0,0,-0.84,0.81,-0.18,-1.19,0.11,1.22,0,0,0,0,0,0,2.53,-1.38,3.9,-0.34,1.3,-1.47,-2.96,4.37,0,0,0,0,0,0,0,0,0,0,0,0,0.11,0.65,0.79,-0.43,-2.16,2.15,2.3,1.99,1.72,-1.45,-1.66,1.16,3.31,-4.7,2.24,0.62,0.98,-1.36,-0.25,-1.32,0,0,0,0,0,0,0,0,0,0,0,1.43,0.85,0.28,-0.75,0.3,-1.33,0.85,-0.75,1.19,-0.97,-2.62,-2.3,-1.87,1.22,-2.15,-0.73,-1.56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2.53,-2.19,0.97,-0.37,-3.22,2.79,-1.6,-0.62,-1.11,2.37,1.6,-0.51,1.49,-1.1,0.08,-1.97,-2.43,0.16,0,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,4.29,-5.17,3.11,5.29,6.52,6.47,-4.22,-2.81,2.24,0.23,-0.11,0.32,0.3,0.49,-1.14,1.25,-1.57,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,2.2,-7.11,-0.2,1.49,4.11,1.03,-1.07,1.52,-1.79,0.06,-0.88,0.93,-0.45,-1.6,0.55,-0.5,2.66,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,-1.02,0.76,1.86,1.95,null,0.82,0.5,-0.55,-0.03,0.11,0.83,-1.18,-1.29,1.02,-1.19,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,-2.09,1.96,-1.75,-2.62,0.88,-0.31,0.65,1.39,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,-0.35,0.7,0.89,0.19,-0.79,-1.49,0.03,-1.44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.26,0,0,0,0.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,-1.7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"header":{"parameterCategory":2,"la1":56.5,"parameterNumberName":"eastward_wind","nx":33,"refTime":"2020-01-01 11:00:00","ny":17,"parameterNumber":2,"lo2":145.35,"dx":2.5,"lo1":62.85,"parameterUnit":"m.s-1","la2":14,"dy":2.5}},{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.98,-3.18,-3.92,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.48,2.04,2.74,1.92,1.74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.58,0.95,0.38,0.18,0,0,0,0,0,0,0,0,0,0,0.8,-1.84,2.07,1.46,0.39,-5.75,-1.1,0,0,0,0,0,0,0,0,0,0,0,0,0.32,1.02,-0.78,1.35,-1.6,0.69,0,0,0,0,0,0,-2.7,4.07,0.12,1.05,-1.39,-2.5,-2.05,1.42,0,0,0,0,0,0,0,0,0,0,0,0,-0.59,-0.26,-0.1,-1.01,-0.42,-0.83,-1.21,-1.51,2.08,0.39,1.74,1.51,1.14,-0.19,-1.33,1.03,0.69,-1.33,1.28,-1.63,0,0,0,0,0,0,0,0,0,0,0,0.72,-0.29,-0.29,1.07,1.16,-0.44,1.47,1.18,-1.73,1.86,-0.65,-1.92,3.19,2.3,-0.45,-1.19,-0.36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.56,-0.17,2.63,-4.69,6.22,4.85,-0.82,3.45,0.86,0.39,0.02,2.35,-0.82,-0.08,0.8,1.99,-1.75,-3,0,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.29,1.19,4.04,1.07,-5.14,-0.66,-3.98,5.42,-0.53,2.59,-1.7,1.57,0.85,1.31,1.52,1.69,-2.79,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,-2.19,1.63,3.19,3.82,3.95,-5.5,0.25,1.98,0.17,-1.7,-0.96,0.38,1.11,0.09,-0.71,-2.55,-1.39,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1.36,1.96,0.38,-2.01,null,-2.36,-0.98,0.43,1,-1.29,0.34,-1.08,-0.12,1.1,-0.92,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,-0.7,1.38,0.4,0.98,0.21,-1.06,0.76,0.56,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,-1.04,0.05,-2.55,2.19,1.39,-0.17,1.6,-0.91,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.32,0,0,0,3.55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,0.04,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"header":{"parameterCategory":2,"la1":56.5,"parameterNumberName":"northward_wind","nx":33,"refTime":"2020-01-01 11:00:00","ny":17,"parameterNumber":3,"lo2":145.35,"dx":2.5,"lo1":62.85,"parameterUnit":"m.s-1","la2":14,"dy":2.5}}]

brentfraser commented 4 years ago

The plugin does a lot of work to display the layer, so you can expect about a one second lag when panning or zooming the map.

danwild commented 4 years ago

Closing - this is a known rendering limitation that can be observed in the provided demo.