From 0270d342938c13ebc31af69d07e76eea7369ccc4 Mon Sep 17 00:00:00 2001 From: javi Date: Thu, 22 Aug 2013 18:16:22 +0200 Subject: [PATCH] added gmaps torque layer doc --- doc/API.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/API.md b/doc/API.md index 5b0f0c4..cd9a8ac 100644 --- a/doc/API.md +++ b/doc/API.md @@ -130,7 +130,7 @@ One of two core classes for the Torque library - it is used to create a static t |-----------|:-----------|:----------|:---------------------------------------| | ```setCartoCSS(cartocss)``` | ```cartocss string``` | ```this``` | style the map rendering using client-side cartocss | -``value`` and ``zoom`` variables can be used. only ``polygon-fill`` property is supported currently. To see the full list of supported parameters, read the [Torque CartoCSS documentation here](CartoCSS.md). +``value`` and ``zoom`` variables can be used. only ``polygon-fill`` and ``polygon-opacity`` properties are supported currently. To see the full list of supported parameters, read the [Torque CartoCSS documentation here](CartoCSS.md). TorqueLayer currently expects ```polygon``` styling @@ -149,5 +149,21 @@ This should be ```string``` encoded in Javascript } ``` +# Google Maps Layers -# gmaps layers (TODO) +## GMapsTiledTorqueLayer(options) +creates a static layer to use it with google maps. + +```js + var torqueLayer = new torque.GMapsTiledTorqueLayer({ + provider: 'url_template', + url: GBIF_URL, + resolution: 4, + }); + + map.overlayMapTypes.setAt(0, torqueLayer); + + torqueLayer.setKey([10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]); +``` + +see ``L.TiledTorqueLayer`` for options reference