mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
Fix render error when using viewState instead of flat props (#632)
This commit is contained in:
parent
90f61ac231
commit
db7c380326
@ -216,7 +216,7 @@ export default class StaticMap extends PureComponent {
|
||||
this._updateMapSize(width, height);
|
||||
|
||||
const staticContext = {
|
||||
viewport: new WebMercatorViewport(Object.assign({}, this.props, {
|
||||
viewport: new WebMercatorViewport(Object.assign({}, this.props, this.props.viewState, {
|
||||
width,
|
||||
height
|
||||
})),
|
||||
|
||||
@ -45,7 +45,9 @@ export {
|
||||
|
||||
// Experimental Features (May change in minor version bumps, use at your own risk)
|
||||
import MapControls from './utils/map-controls';
|
||||
import {StaticContext} from './components/static-map';
|
||||
|
||||
export const experimental = {
|
||||
MapControls
|
||||
MapControls,
|
||||
MapContext: StaticContext
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user