• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geosolutions-it / MapStore2 / 19710972030

26 Nov 2025 03:38PM UTC coverage: 76.665% (-0.3%) from 76.929%
19710972030

Pull #11119

github

web-flow
Fix maven publish (#11739)
Pull Request #11119: Layer Selection Plugin on ArcGIS, WFS & WMS layers

32272 of 50209 branches covered (64.28%)

3 of 3 new or added lines in 2 files covered. (100.0%)

3018 existing lines in 249 files now uncovered.

40157 of 52380 relevant lines covered (76.66%)

37.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.3
/web/client/components/map/leaflet/Overview.jsx
1

2
var PropTypes = require('prop-types');
1✔
3
var React = require('react');
1✔
4
var MiniMap = require('leaflet-minimap');
1✔
5
var L = require('leaflet');
1✔
6
var Layers = require('../../../utils/leaflet/Layers');
1✔
7
require('./overview.css');
1✔
8

9
const defaultOpt = { // For all configuration options refer to https://github.com/Norkart/Leaflet-MiniMap
1✔
10
    position: 'bottomright',
11
    width: 300,
12
    height: 150,
13
    collapsedWidth: 25,
14
    collapsedHeight: 25,
15
    zoomLevelOffset: -5,
16
    zoomLevelFixed: null,
17
    zoomAnimation: false,
18
    toggleDisplay: true,
19
    autoToggleDisplay: false,
20
    minimized: true
21
};
22

23
class Overview extends React.Component {
24
    static displayName = 'Overview';
1✔
25

26
    static propTypes = {
1✔
27
        map: PropTypes.object,
28
        overviewOpt: PropTypes.object,
29
        layers: PropTypes.array
30
    };
31

32
    static defaultProps = {
1✔
33
        id: 'overview',
34
        overviewOpt: {},
35
        layers: [{type: 'osm', options: {}}]
36
    };
37

38
    componentDidMount() {
39
        let opt = Object.assign({}, defaultOpt, this.props.overviewOpt);
1✔
40
        if (this.props.layers) {
1!
41
            let lfLayers = [];
1✔
42
            this.props.layers.forEach((layerOpt) => {
1✔
43
                lfLayers.push(Layers.createLayer(layerOpt.type, layerOpt.options || {}));
1!
44
            });
45
            if (lfLayers.length === 1 ) {
1!
46
                this.overview = new MiniMap(lfLayers[0], opt);
1✔
UNCOV
47
            } else if (lfLayers.length > 1 ) {
×
48
                this.overview = new MiniMap(L.layerGroup(lfLayers), opt);
×
49
            }
50
        }
51
        if (this.props.map && this.overview) {
1!
52
            this.overview.addTo(this.props.map);
1✔
53
        }
54
    }
55

56
    render() {
57
        return null;
1✔
58
    }
59
}
60

61
module.exports = Overview;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc