Create a HeatMapWithTime layer Parameters ---------- data: list of list of points of the form [lat, lng] or [lat, lng, weight] The points you want to plot. The outer list corresponds to the various time steps in sequential order. (weight is in (0, 1] range and defau
| 5 | |
| 6 | |
| 7 | class HeatMapWithTime(JSCSSMixin, Layer): |
| 8 | """ |
| 9 | Create a HeatMapWithTime layer |
| 10 | |
| 11 | Parameters |
| 12 | ---------- |
| 13 | data: list of list of points of the form [lat, lng] or [lat, lng, weight] |
| 14 | The points you want to plot. The outer list corresponds to the various time |
| 15 | steps in sequential order. (weight is in (0, 1] range and defaults to 1 if |
| 16 | not specified for a point) |
| 17 | index: Index giving the label (or timestamp) of the elements of data. Should have |
| 18 | the same length as data, or is replaced by a simple count if not specified. |
| 19 | name : string, default None |
| 20 | The name of the Layer, as it will appear in LayerControls. |
| 21 | radius: default 15. |
| 22 | The radius used around points for the heatmap. |
| 23 | blur: default 0.8. |
| 24 | Blur strength used for the heatmap. Must be between 0 and 1. |
| 25 | min_opacity: default 0 |
| 26 | The minimum opacity for the heatmap. |
| 27 | max_opacity: default 0.6 |
| 28 | The maximum opacity for the heatmap. |
| 29 | scale_radius: default False |
| 30 | Scale the radius of the points based on the zoom level. |
| 31 | gradient: dict, default None |
| 32 | Match point density values to colors. Color can be a name ('red'), |
| 33 | RGB values ('rgb(255,0,0)') or a hex number ('#FF0000'). |
| 34 | use_local_extrema: default False |
| 35 | Defines whether the heatmap uses a global extrema set found from the input data |
| 36 | OR a local extrema (the maximum and minimum of the currently displayed view). |
| 37 | auto_play: default False |
| 38 | Automatically play the animation across time. |
| 39 | display_index: default True |
| 40 | Display the index (usually time) in the time control. |
| 41 | index_steps: default 1 |
| 42 | Steps to take in the index dimension between animation steps. |
| 43 | min_speed: default 0.1 |
| 44 | Minimum fps speed for animation. |
| 45 | max_speed: default 10 |
| 46 | Maximum fps speed for animation. |
| 47 | speed_step: default 0.1 |
| 48 | Step between different fps speeds on the speed slider. |
| 49 | position: default 'bottomleft' |
| 50 | Position string for the time slider. Format: 'bottom/top'+'left/right'. |
| 51 | overlay : bool, default True |
| 52 | Adds the layer as an optional overlay (True) or the base layer (False). |
| 53 | control : bool, default True |
| 54 | Whether the Layer will be included in LayerControls. |
| 55 | show: bool, default True |
| 56 | Whether the layer will be shown on opening. |
| 57 | |
| 58 | """ |
| 59 | |
| 60 | _template = Template( |
| 61 | """ |
| 62 | {% macro header(this, kwargs) %} |
| 63 | <script> |
| 64 | var TDHeatmap = L.TimeDimension.Layer.extend({ |
nothing calls this directly
no test coverage detected
searching dependent graphs…