Skip to content

Commit

Permalink
fix(core): base map creation error in DeckGL scripting interface (#8691)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 21, 2024
1 parent fcb5ccf commit 67390c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/src/scripting/map-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ export class MapWrapper {
}

private _initialize(props: MapProps) {
const {mapLib} = props;
const {mapLib, container} = props;

// Creation only props
mapLib.accessToken = props.mapboxApiAccessToken || '';

this.map = new props.mapLib.Map({
container,
maxZoom: 24,
...props.mapOptions,
...viewStateToMapboxProps(props.viewState),
Expand All @@ -92,7 +93,6 @@ export class MapWrapper {
// Hijack dimension properties
// This eliminates the timing issue between calling resize() and DOM update
/* eslint-disable accessor-pairs */
const {container} = props;
Object.defineProperty(container, 'offsetWidth', {get: () => this.width});
Object.defineProperty(container, 'clientWidth', {get: () => this.width});
Object.defineProperty(container, 'offsetHeight', {
Expand Down

0 comments on commit 67390c4

Please sign in to comment.