diff --git a/reference/styles/sections/layers.md b/reference/styles/sections/layers.md index 1ff2d5c..bd1cc5d 100644 --- a/reference/styles/sections/layers.md +++ b/reference/styles/sections/layers.md @@ -1,6 +1,6 @@ --- -title: Layers -description: A layer is a styled representation of data or the canvas of your map. +标题: 图层 +描述: 图层是数据或地图画布的设计表现。 prependJs: - "import AppropriateImage from '../../../../components/appropriate-image';" - "import Browser from '@mapbox/dr-ui/browser';" @@ -17,14 +17,14 @@ prependJs: - "import StyleBuildingsZoom from '../../../../video/style-buildings-zoom.mp4';" - "import StyleDetails from '../../../../video/reference-styles-layers-style-details.mp4';" - "import StyleProperties from '../../../../video/reference-styles-layers-style-properties.mp4';" -contentType: reference +内容类型: 参考 --- -## Layers +## 图层 -A **layer** is a styled representation of data of a single type (for example fill, line, or symbol). Layers _can_ be a part of a component, but don’t _have_ to be. +**图层**是一种类型(例如填充,线或符号)的数据的设计表现。 图层 _可以_ 是组件的一部分,但不_必须_是。 -Layers power your map's visualization. Without layers, you cannot see your data. You can create multiple layers from the same data and you can filter data by attributes for styling in a layer. You can also fill the canvas with a color or pattern which will apply across the whole world. +图层增强了地图的可视化效果。 没有图层,你将看不到数据。 你可以从同一数据创建多个图层,还可以按属性筛选数据来在图层中设置样式。你还可以在画布上填充将应用于整个世界的颜色或图案。 {{ @@ -36,25 +36,24 @@ Layers power your map's visualization. Without layers, you cannot see your data.
}} -You can always access the Layers list by clicking the **Layers** tab in the upper left of the style editor. There are several options for managing layers at the top of the list, including: +你始终可以通过点击样式编辑器左上角的**图层**标签来访问图层列表。 列表顶部有几个用于管理图层的选项,包括: -- {{}} **Add a custom layer** to add a new layer. -- {{}} **Duplicate a layer** to create a copy of an existing layer. -- {{}} {{}} **Group** and **Ungroup** layers to style them individually and sort them. -- {{}} {{}} **Hide** and **Show** layers. -- {{}} **Delete layer** to permanently remove a layer. You can undo this using `CTRL + Z` in the current session, but this cannot be undone after you close your style. -- {{}} **Reorder layers** by clicking and dragging the {{}} next to each layer list item. +- {{}} **添加一个自定义图层** 来添加新的图层。 +- {{}} **复制图层**来创建现有图层的副本. +- {{}} {{}}**分组**和**取消分组**图层可分别设置样式并对其进行排序。 +- {{}} {{}} **隐藏** 和 **显示** 图层. +- {{}} **删除图层**,可以永久删除图层。 你可以在当前会话中使用CTRL + Z撤消此操作,但是在关闭样式后你无法撤消此操作。 +- {{}} 通过点击并拖动每个图层列表项旁边的{{}},对图层进行**重新排序**。 -### Add layer +### 添加图层 -To create a new layer, click **+** at the top of the layers panel. There are two options when adding a new layer to your style: **Data sources** and **Background layer**. +要创建一个新层,请点击图层面板顶部的 **+** 。 在样式中添加新图层时,有两个选项:**数据源**和**背景图层**。 -#### Data sources +#### 数据源 -Add a layer that contains specific shapes (polygons, lines, or points) that cover part of the map. A layer from data comes from custom data that you have added to your Mapbox account. See the [Geospatial data](/studio-manual/overview/geospatial-data/) section for more information on adding custom data. - -Each layer needs data to work with, otherwise the style rules would not be applied to anything. (The exception is a background layer — see the next section for more details). To specify data for the layer, choose a **Data source** from the list of available [tilesets](https://docs.mapbox.com/help/glossary/tileset) used in your map style (_Active sources_), as well as a list of tilesets that are in your account but not used in the current style (_Unused sources_). You can use the search box to find a tileset, or upload a new tileset with the **+ Upload** button. +添加包含部分地图的特定形状(点,线或面)的图层。 图层的数据来自你添加到Mapbox帐户的自定义数据。 有关添加自定义数据的更多信息,请参见 [地理空间数据](/studio-manual/overview/geospatial-data/) 部分。 +每个图层都需要使用数据,否则样式规则将不会应用于任何内容。(例外的是一个背景图层;有关更多细节,请参见下一节)。 要为图层指定数据,请从地图样式中使用的可用[瓦片集](https://docs.mapbox.com/help/glossary/tileset)列表中选择一个“数据源”(_主要 源数据_),以及在你帐户中但未在当前样式中使用的瓦片集列表(_未使用的数据源_)。你可以使用搜索框查找瓦片集,或使用 **+上传** 按钮上传新的瓦片集。 {{ }} -{{}} -There is a limit of 15 unique sources permitted in styles saved in your Mapbox account. This count includes Mapbox tilesets like Streets or Terrain. If you reach the 15 source limit, you will see an error, `Failed to update style`. This limit is related to sources, not layers. To reduce the number of sources needed, consider combining data before uploading and using filters in the style editor to create different layers from the same source. For more information on source limits see our [Source limits in Mapbox Studio styles](https://docs.mapbox.com/help/troubleshooting/reduce-tileset-sources/) troubleshooting guide. +{{}} +Mapbox帐户中的保存的样式中最多允许有15个唯一数据源。 此数字包括Mapbox瓦片集,例如街道或地形。如果达到15个数据源限制,你将看到一个错误, `无法更新样式`。此限制与数据源有关,而与图层无关。为了减少所需的数据源数量,请考虑在上传之前合并数据,然后从样式编辑器中使用过滤器从同一来源数据创建不同的图层。有关数据源限制的更多信息,请参见[Mapbox Studio样式故障排除指南中的数据源限制](https://docs.mapbox.com/help/troubleshooting/reduce-tileset-sources/) {{}} -**Vector sources**: If you select a vector source, you'll have the following options: - -- **Type**: allows you to select the type of layer to create either [fill](#fill-layer), [fill extrusion](#fill-extrusion-layer), [line](#line-layer), [circle](#circle-layer), [symbol](#symbol-layer), [heatmap](#heatmap-layer), or [raster](#raster-layer) data types. -- **Filter**: allows you to limit features that are displayed in a layer based on data properties or geometry type. -- **Zoom extent**: sets the `min` (start) zoom and `max` (last) zoom to which you data is viewed on the map (learn more about [manually adjusting zoom extents](https://docs.mapbox.com/help/troubleshooting/adjust-tileset-zoom-extent)). +**矢量数据源**:如果选择矢量数据源,则将具有以下选项: -On the canvas, you will see a preview of your data. You can click to select and view the data on the map. Hover over the data to see what data subset is below and click the **Select** button to populate that data into the layer you are creating. +- **类型**:允许你选择图层类型来创建[填充](#填充-图层),[填充拉伸](#填充-拉伸-图层),[线](#线-图层),[点](#点-图层),[符号](#符号-图层),[热力图](#热力图-图层)或[栅格](#栅格-图层)数据类型。 +- **筛选**:允许你根据数据属性或几何类型限制在图层中要显示的要素。 +- **缩放程度**:设置在地图上查看数据的`最小`(开始)缩放等级和`最大`(最后)缩放等级(了解有关[手动调整缩放范围]的详细信息。(https://docs.mapbox.com/help/troubleshooting/adjust-tileset-zoom-extent)). +在画布上,你将看到数据的预览。 你可以点击选择并查看地图上的数据。 在画布上,你将看到数据的预览。 你可以点击来选择并查看地图上的数据。 将鼠标悬停在数据上以查看下面的数据子集,然后点击 **选择** 按钮以将该数据填充到你创建的图层中。 {{