Skip to content
userx edited this page Jan 7, 2016 · 22 revisions

#Editor

The editor is used by site administrators to edit the contents of the Layer Toolbox. The contents of the editor and any changes made are stored in a JSON file that is used to build the Toolbox as well as define how the Map behaves when that layer is active.

Categories

Categories are the top level of the toolbox (eg: “Waterbirds”) and contain layers.

img

Layers

Layers are the fundamental component of the Toolbox and define a dataset that is to be accessed from CartoDB. Layers exist within a category and have several required fields (see below).

Layer Fields

|title (required) |name that will be displayed in toolbox | |group (required) |group used for displaying multiple layers at the same time (this is NOT the section name that layers are displayed under in the toolbox. See “Categories” above) | |type (required) |options: layer, sublayer, animation | | |layer is used for basic layers which do not belong to a group | | | sublayer is used for any layer which belongs to a group | | | animation is used for any animated layer (animated layers display independently regardless of group)| |centerlat, centerlon, zoom |defined zoom to extent button and extent when page is opened using hashtag url. Ex. http://www.ccbbirds.org/maps/#eagles | | | zoom levels are integers from 3 to 18 where: | | | 3 = Multiple continents | | | 5 = United States | | | 8 = State of Virginia | | | 11 = City of Richmond, VA | | | 14 = City of Williamsburg, VA | | | 18 = Individual buildings | |maxzoom |limits map zoom when layer is active (useful for sensitive data layers, like certain states’ eagle roosts) | |hashtag |simple hashtag used for links (this is primarily used to keep old links workings. It is not used when adding new layers.) | |key (required) |the cartodb key used to identify a layer | |description |details about the layer. May contain simple html | |link |URL used for the “More info” link that is displayed below the description | |filters |filters allow you to defined specific subsets of the layer which the user can sort by. This field contains a subcategory for each filter which have their own title and SQL | | |fields (both fields are required for each filter you create). | | |The title is what is displayed in the toolbox and the SQL field is the actual SQL query string that will be | | |interpreted by CartoDB to determine what portion of the original layer is returned. |

img

Clone this wiki locally