• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / deck.gl / 21049200541

15 Jan 2026 10:53PM UTC coverage: 90.937% (-0.2%) from 91.1%
21049200541

Pull #9939

github

web-flow
Merge 683e9f44b into 1975e2367
Pull Request #9939: fix(mapbox): MapboxOverlay: render deck layers in batches

6845 of 7515 branches covered (91.08%)

Branch coverage included in aggregate %.

79 of 206 new or added lines in 4 files covered. (38.35%)

4 existing lines in 1 file now uncovered.

56728 of 62394 relevant lines covered (90.92%)

14377.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.59
/modules/mapbox/src/mapbox-layer-group.ts
1
// deck.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import {getDeckInstance, drawLayerGroup} from './deck-utils';
1✔
6
import type {Map, CustomLayerInterface} from './types';
1✔
7
import {assert, type Deck} from '@deck.gl/core';
1✔
8

1✔
9
export type MapboxLayerGroupProps = {
1✔
10
  id: string;
1✔
11
  renderingMode?: '2d' | '3d';
1✔
12
  /* Mapbox v3 Standard style */
1✔
13
  slot?: 'bottom' | 'middle' | 'top';
1✔
14
  beforeId?: string;
1✔
15
};
1✔
16

1✔
17
export default class MapboxLayerGroup implements CustomLayerInterface {
1✔
18
  id: string;
1✔
19
  type: 'custom';
1✔
20
  renderingMode: '2d' | '3d';
1✔
21
  /* Mapbox v3 Standard style */
1✔
22
  slot?: 'bottom' | 'middle' | 'top';
1✔
23
  beforeId?: string;
1✔
24
  map: Map | null;
1✔
25
  deck: Deck | null;
1✔
26

1✔
27
  /* eslint-disable no-this-before-super */
1✔
28
  constructor(props: MapboxLayerGroupProps) {
1✔
NEW
29
    assert(props.id, 'id is required');
×
NEW
30

×
NEW
31
    this.id = props.id;
×
NEW
32
    this.type = 'custom';
×
NEW
33
    this.renderingMode = props.renderingMode || '3d';
×
NEW
34
    this.slot = props.slot;
×
NEW
35
    this.beforeId = props.beforeId;
×
NEW
36
    this.map = null;
×
NEW
37
    this.deck = null;
×
NEW
38
  }
×
39

1✔
40
  /* Mapbox custom layer methods */
1✔
41

1✔
42
  onAdd(map: Map, gl: WebGL2RenderingContext): void {
1✔
NEW
43
    this.map = map;
×
NEW
44
    this.deck = getDeckInstance({map, gl});
×
NEW
45
  }
×
46

1✔
47
  render(gl, renderParameters) {
1✔
NEW
48
    drawLayerGroup(this.deck!, this.map!, this, renderParameters);
×
NEW
49
  }
×
50
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc