Create 01-L.TorqueLayer.md
This commit is contained in:
parent
4a049eedce
commit
d80249f83d
28
docs/reference/01-L.TorqueLayer.md
Normal file
28
docs/reference/01-L.TorqueLayer.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
### L.TorqueLayer
|
||||||
|
|
||||||
|
A layer to be added to a Leaflet map. It works as a regular tiled layer within the Leaflet tile pane, but instead of containing `<img>` elements, it's composed of a single [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) where all markers are drawn.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
```javascript
|
||||||
|
var torqueLayer = new L.TorqueLayer({
|
||||||
|
user: 'viz2',
|
||||||
|
table: 'ow',
|
||||||
|
cartocss: '<cartocss here>'
|
||||||
|
});
|
||||||
|
|
||||||
|
map.addLayer(torqueLayer);
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Options
|
||||||
|
|
||||||
|
Name | Description
|
||||||
|
--- | ---
|
||||||
|
cartocss | A string object, the CartoCSS style for the map. Default value is ```null```
|
||||||
|
loop | A boolean object that defines the animation loop. Default value is ```true```. If ```false```, the animation is paused when it reaches the last frame
|
||||||
|
resolution | Spatial resolution in pixels. A resolution of 1 means no spatial aggregation of the data. Its value must be a power of 2
|
||||||
|
steps | Number of steps that the animation is divided into
|
||||||
|
animationDuration | Duration, in seconds, of the animation
|
||||||
|
zIndex | Z-Index CSS property of the layer
|
||||||
|
attribution | Attribution to be added in the bottom right of the map
|
||||||
|
maxZoom | Maximum zoom for the layer.
|
||||||
|
tileSize | Size, in pixels of the tiles
|
Loading…
Reference in New Issue
Block a user