diff --git a/src/components/static-map.js b/src/components/static-map.js index 726aa9c2..4a49f861 100644 --- a/src/components/static-map.js +++ b/src/components/static-map.js @@ -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 })), diff --git a/src/index.js b/src/index.js index 19e808c3..1e94b9d2 100644 --- a/src/index.js +++ b/src/index.js @@ -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 };