Skip to content

Commit 0053841

Browse files
authored
Fixes the crash by limiting the overscale number to 128 on safari (#6526)
* Fixes the crash by limiting the overscale number to 128 on safari * Add changelog * Fix condition by reversing it...
1 parent f4ccb8c commit 0053841

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
### 🐞 Bug fixes
99
- Added `button` role to marker div to fix accessibility issues with the `aria-label` ([#6435](https://github.com/maplibre/maplibre-gl-js/issues/6435))
10+
- Fix a crash on iOS when there are too many symbols to render ([#6526](https://github.com/maplibre/maplibre-gl-js/issues/6526))
1011

1112
## 5.8.0
1213

src/data/bucket/symbol_bucket.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {EvaluationParameters} from '../../style/evaluation_parameters';
3737
import {Formatted, ResolvedImage} from '@maplibre/maplibre-gl-style-spec';
3838
import {rtlWorkerPlugin} from '../../source/rtl_text_plugin_worker';
3939
import {getOverlapMode} from '../../style/style_layer/overlap_mode';
40+
import {isSafari} from '../../util/util';
4041
import type {CanonicalTileID} from '../../source/tile_id';
4142
import type {
4243
Bucket,
@@ -362,7 +363,7 @@ export class SymbolBucket implements Bucket {
362363
constructor(options: BucketParameters<SymbolStyleLayer>) {
363364
this.collisionBoxArray = options.collisionBoxArray;
364365
this.zoom = options.zoom;
365-
this.overscaling = options.overscaling;
366+
this.overscaling = isSafari(globalThis) ? Math.min(options.overscaling, 128) : options.overscaling;
366367
this.layers = options.layers;
367368
this.layerIds = this.layers.map(layer => layer.id);
368369
this.index = options.index;

0 commit comments

Comments
 (0)