Skip to content

Commit e3bd938

Browse files
committed
fix(geojson-layer): enable wrapLongitude for antimeridian crossing polygons
Enable wrapLongitude on GeoJSON layers so that polygons crossing the -180/180 longitude boundary (antimeridian) are rendered correctly and can be displayed simultaneously. The base layer already sets wrapLongitude: true, but the GeoJSON layer was overriding it to false without a specific reason. This caused polygons on opposite sides of the antimeridian to not be visible at the same time. Fixes #2668 Signed-off-by: pierreeurope <pierre.europe@pm.me>
1 parent cec11f3 commit e3bd938

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/layers/src/geojson-layer/geojson-layer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ export default class GeoJsonLayer extends Layer {
710710
filled: visConfig.filled,
711711
extruded: visConfig.enable3d,
712712
wireframe: visConfig.wireframe,
713-
wrapLongitude: false,
713+
wrapLongitude: true,
714714
lineMiterLimit: 2,
715715
capRounded: true,
716716
jointRounded: true,
@@ -739,7 +739,7 @@ export default class GeoJsonLayer extends Layer {
739739
...this.getDefaultHoverLayerProps(),
740740
...layerProps,
741741
visible: defaultLayerProps.visible,
742-
wrapLongitude: false,
742+
wrapLongitude: true,
743743
data: [hoveredObject],
744744
getLineWidth: props.getLineWidth,
745745
getPointRadius: props.getPointRadius,

0 commit comments

Comments
 (0)