@mapbox/mapbox-gl-style-spec 13.25.0-beta.2 → 13.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapbox/mapbox-gl-style-spec",
3
3
  "description": "a specification for mapbox gl styles",
4
- "version": "13.25.0-beta.2",
4
+ "version": "13.25.0",
5
5
  "author": "Mapbox",
6
6
  "keywords": [
7
7
  "mapbox",
package/reference/v8.json CHANGED
@@ -96,7 +96,7 @@
96
96
  },
97
97
  "projection": {
98
98
  "type": "projection",
99
- "doc": "The projection the map should be rendered in. Supported projections are Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Mercator, Natural Earth, Globe, and Winkel Tripel. Terrain, fog, sky and CustomLayerInterface are not supported for projections other than mercator.",
99
+ "doc": "The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.",
100
100
  "example": {
101
101
  "name": "albers",
102
102
  "center": [-154, 50],
@@ -4998,12 +4998,13 @@
4998
4998
  "line-trim-offset": {
4999
4999
  "type": "array",
5000
5000
  "value": "number",
5001
- "doc": "The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line gradient range [0.0, 1.0]. If either 'trim-start' or 'trim-end' offset is out of valid range, the default range will be set.",
5001
+ "doc": "The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].",
5002
5002
  "length": 2,
5003
5003
  "default": [0.0, 0.0],
5004
+ "minimum": [0.0, 0.0],
5005
+ "maximum": [1.0, 1.0],
5004
5006
  "transition": false,
5005
5007
  "requires": [
5006
- "line-gradient",
5007
5008
  {
5008
5009
  "source": "geojson",
5009
5010
  "has": {
@@ -5013,7 +5014,7 @@
5013
5014
  ],
5014
5015
  "sdk-support": {
5015
5016
  "basic functionality": {
5016
- "js": "2.3.0",
5017
+ "js": "2.9.0",
5017
5018
  "android": "10.5.0",
5018
5019
  "ios": "10.5.0",
5019
5020
  "macos": "10.5.0"
@@ -79,11 +79,9 @@ export default function validateLayer(options: Options): Array<ValidationError>
79
79
  errors.push(new ValidationError(key, layer, `layer "${layer.id}" must specify a "source-layer"`));
80
80
  } else if (sourceType === 'raster-dem' && type !== 'hillshade') {
81
81
  errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \'hillshade\'.'));
82
- } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] &&
82
+ } else if (type === 'line' && layer.paint && (layer.paint['line-gradient'] || layer.paint['line-trim-offset']) &&
83
83
  (sourceType !== 'geojson' || !source.lineMetrics)) {
84
84
  errors.push(new ValidationError(key, layer, `layer "${layer.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`));
85
- } else if (type === 'line' && layer.paint && layer.paint['line-trim-offset'] && !layer.paint['line-gradient']) {
86
- errors.push(new ValidationError(key, layer, `layer "${layer.id}" specifies a line-trim-offset, which requires line-gradient enabled.`));
87
85
  }
88
86
  }
89
87
  }