diff --git a/docs/reference/01-L.TorqueLayer.md b/docs/reference/01-L.TorqueLayer.md new file mode 100644 index 0000000..2fe9b2a --- /dev/null +++ b/docs/reference/01-L.TorqueLayer.md @@ -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 `` elements, it's composed of a single [``](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: '' +}); + +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