Skip to content

Commit

Permalink
Onldy create declutter builder group when using it
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo committed Mar 15, 2024
1 parent e1480d7 commit ec8657e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MVTEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default class MVTEncoder {
);

let declutterBuilderGroup: CanvasBuilderGroup | undefined;
if (declutter) {
if (declutter && olMajorVersion <= 9) {
declutterBuilderGroup = new CanvasBuilderGroup(
0,
featuresExtent.extent,
Expand Down Expand Up @@ -173,7 +173,9 @@ export default class MVTEncoder {
tolerance,
resourceLoadedListener,
undefined,
declutterBuilderGroup
olMajorVersion <= 9
? (declutterBuilderGroup as unknown as boolean)
: declutter
) || loading;
}
}
Expand Down

0 comments on commit ec8657e

Please sign in to comment.