|
21 | 21 |
|
22 | 22 | from branca.colormap import linear, ColorMap |
23 | 23 |
|
24 | | -from traittypes import Dataset |
25 | | - |
26 | | -from .xarray_ds import ds_x_to_json |
27 | | - |
28 | 24 | from ._version import EXTENSION_VERSION |
29 | 25 |
|
30 | 26 | def_loc = [0.0, 0.0] |
@@ -329,59 +325,6 @@ class VideoOverlay(RasterLayer): |
329 | 325 | attribution = Unicode().tag(sync=True, o=True) |
330 | 326 |
|
331 | 327 |
|
332 | | -class Velocity(Layer): |
333 | | - try: |
334 | | - import xarray |
335 | | - except ModuleNotFoundError: |
336 | | - raise ImportError( |
337 | | - 'The `xarray` module (required for use of the Velocity layer) is ' |
338 | | - 'not installed.' |
339 | | - ) |
340 | | - |
341 | | - _view_name = Unicode('LeafletVelocityView').tag(sync=True) |
342 | | - _model_name = Unicode('LeafletVelocityModel').tag(sync=True) |
343 | | - |
344 | | - zonal_speed = Unicode('', help='Name of the zonal speed in the dataset') |
345 | | - meridional_speed = Unicode('', help='Name of the meridional speed in the dataset') |
346 | | - latitude_dimension = Unicode('latitude', help='Name of the latitude dimension in the dataset') |
347 | | - longitude_dimension = Unicode('longitude', help='Name of the longitude dimension in the dataset') |
348 | | - units = Unicode(None, allow_none=True) |
349 | | - |
350 | | - data = Dataset().tag(dtype=None, sync=True, to_json=ds_x_to_json) |
351 | | - |
352 | | - # Options |
353 | | - display_values = Bool(True).tag(sync=True, o=True) |
354 | | - display_options = Dict({ |
355 | | - 'velocityType': 'Global Wind', |
356 | | - 'position': 'bottomleft', |
357 | | - 'emptyString': 'No velocity data', |
358 | | - 'angleConvention': 'bearingCW', |
359 | | - 'displayPosition': 'bottomleft', |
360 | | - 'displayEmptyString': 'No velocity data', |
361 | | - 'speedUnit': 'kt' |
362 | | - }).tag(sync=True) |
363 | | - min_velocity = Float(0).tag(sync=True, o=True) |
364 | | - max_velocity = Float(10).tag(sync=True, o=True) |
365 | | - velocity_scale = Float(0.005).tag(sync=True, o=True) |
366 | | - color_scale = List([ |
367 | | - "rgb(36,104, 180)", |
368 | | - "rgb(60,157, 194)", |
369 | | - "rgb(128,205,193)", |
370 | | - "rgb(151,218,168)", |
371 | | - "rgb(198,231,181)", |
372 | | - "rgb(238,247,217)", |
373 | | - "rgb(255,238,159)", |
374 | | - "rgb(252,217,125)", |
375 | | - "rgb(255,182,100)", |
376 | | - "rgb(252,150,75)", |
377 | | - "rgb(250,112,52)", |
378 | | - "rgb(245,64,32)", |
379 | | - "rgb(237,45,28)", |
380 | | - "rgb(220,24,32)", |
381 | | - "rgb(180,0,35)" |
382 | | - ]).tag(sync=True, o=True) |
383 | | - |
384 | | - |
385 | 328 | class Heatmap(RasterLayer): |
386 | 329 | _view_name = Unicode('LeafletHeatmapView').tag(sync=True) |
387 | 330 | _model_name = Unicode('LeafletHeatmapModel').tag(sync=True) |
|
0 commit comments