fix(widget-map): update ol to latest version

This commit is contained in:
Paul
2021-12-07 18:46:55 +00:00
committed by GitHub
parent 9f0d11957c
commit 4a4adf0dbd
3 changed files with 306 additions and 115 deletions

View File

@ -30,6 +30,6 @@
"react-immutable-proptypes": "^2.1.0"
},
"dependencies": {
"ol": "^5.3.1"
"ol": "^6.9.0"
}
}

View File

@ -33,11 +33,13 @@ export default function withMapControl({ getFormat, getMap } = {}) {
static propTypes = {
onChange: PropTypes.func.isRequired,
field: PropTypes.object.isRequired,
height: PropTypes.string,
value: PropTypes.node,
};
static defaultProps = {
value: '',
height: '400px',
};
constructor(props) {
@ -70,6 +72,8 @@ export default function withMapControl({ getFormat, getMap } = {}) {
}
render() {
const { height } = this.props;
return (
<ClassNames>
{({ cx, css }) => (
@ -80,6 +84,7 @@ export default function withMapControl({ getFormat, getMap } = {}) {
${olStyles};
padding: 0;
overflow: hidden;
height: ${height};
`,
)}
ref={this.mapContainer}