From aa221864e04786efa0f69fa0afb1d7811711d7b4 Mon Sep 17 00:00:00 2001 From: Xiaoji Chen Date: Tue, 8 Jun 2021 14:43:15 -0700 Subject: [PATCH] Fix inconsistent path layer id in GeoJSONLayer (#5855) --- docs/api-reference/layers/geojson-layer.md | 2 +- modules/layers/src/geojson-layer/geojson-layer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-reference/layers/geojson-layer.md b/docs/api-reference/layers/geojson-layer.md index e27aad622b0..794d06e2431 100644 --- a/docs/api-reference/layers/geojson-layer.md +++ b/docs/api-reference/layers/geojson-layer.md @@ -280,7 +280,7 @@ The GeoJsonLayer renders the following sublayers: * `polygons-fill` - a [SolidPolygonLayer](/docs/api-reference/layers/solid-polygon-layer.md) rendering all the `Polygon` and `MultiPolygon` features. * `polygons-stroke` - a [PathLayer](/docs/api-reference/layers/path-layer.md) rendering the outline of all the `Polygon` and `MultiPolygon` features. Only rendered if `stroked: true` and `extruded: false`. -* `linestrings` - a [PathLayer](/docs/api-reference/layers/path-layer.md) rendering all the `LineString` and `MultiLineString` features. +* `line-strings` - a [PathLayer](/docs/api-reference/layers/path-layer.md) rendering all the `LineString` and `MultiLineString` features. * `points` - a [ScatterplotLayer](/docs/api-reference/layers/scatterplot-layer.md) rendering all the `Point` and `MultiPoint` features. diff --git a/modules/layers/src/geojson-layer/geojson-layer.js b/modules/layers/src/geojson-layer/geojson-layer.js index 1652005cb0e..92a52c68d2a 100644 --- a/modules/layers/src/geojson-layer/geojson-layer.js +++ b/modules/layers/src/geojson-layer/geojson-layer.js @@ -261,7 +261,7 @@ export default class GeoJsonLayer extends CompositeLayer { ); const pathLayer = - this.shouldRenderSubLayer('linestrings', layerProps.lines.data) && + this.shouldRenderSubLayer('line-strings', layerProps.lines.data) && new LineStringsLayer( { widthUnits: lineWidthUnits,