Skip to content

Commit

Permalink
Fix OverviewMap Layer with possibly undefined key
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Feb 12, 2025
1 parent be3060f commit ad43996
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/map/OverviewSupport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {connect} from 'react-redux';

import ol from 'openlayers';
import PropTypes from 'prop-types';
import {v1 as uuidv1} from 'uuid';

import {LayerRole} from '../../actions/layers';
import OlLayer from '../../components/map/OlLayer';
Expand Down Expand Up @@ -58,7 +59,8 @@ class OverviewMap extends React.Component {
if (this.props.options.layer) {
overviewLayer = {
...this.props.options.layer,
visibility: true
visibility: true,
id: uuidv1()
};
if (overviewLayer.type === 'wms') {
overviewLayer.version = overviewLayer.params.VERSION || overviewLayer.version || this.props.themes?.defaultWMSVersion || "1.3.0";
Expand Down

0 comments on commit ad43996

Please sign in to comment.