Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/maps/src/mapbox/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default class MapboxService extends BaseMapService<Map & IMapboxInstance>
token,
rotation = 0,
mapInstance,
preserveDrawingBuffer,
...rest
} = this.config;

Expand Down Expand Up @@ -128,7 +129,7 @@ export default class MapboxService extends BaseMapService<Map & IMapboxInstance>
style: this.getMapStyleValue(style),
attributionControl,
bearing: rotation,
...rest,
preserveDrawingBuffer: preserveDrawingBuffer ?? undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

在修改中移除了 ...rest 扩展运算符,这会导致 this.config 中原本通过 ...rest 传递给 Mapbox 的其他配置项(如 zoom, center, pitch, antialias 等)丢失,从而导致功能回归。建议在显式传递 preserveDrawingBuffer 的同时保留 ...rest

        preserveDrawingBuffer: preserveDrawingBuffer ?? undefined,
        ...rest,

});
}
this.map.on('load', () => {
Expand Down
Loading