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

geosolutions-it / MapStore2 / 19933858499

04 Dec 2025 01:54PM UTC coverage: 76.636% (-0.03%) from 76.661%
19933858499

Pull #11648

github

web-flow
Update User Guide - Itinerary plugin (#11768)

* add_11664

* Update docs/user-guide/itinerary.md

Co-authored-by: Suren <dsuren1@gmail.com>

* Update docs/user-guide/itinerary.md

Co-authored-by: Suren <dsuren1@gmail.com>

* Update docs/user-guide/itinerary.md

Co-authored-by: Suren <dsuren1@gmail.com>

* Update docs/user-guide/itinerary.md

Co-authored-by: Suren <dsuren1@gmail.com>

---------

Co-authored-by: Suren <dsuren1@gmail.com>
Pull Request #11648: #11644: Implement dynamic request configurations

32316 of 50296 branches covered (64.25%)

132 of 155 new or added lines in 40 files covered. (85.16%)

283 existing lines in 32 files now uncovered.

40207 of 52465 relevant lines covered (76.64%)

37.89 hits per line

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

7.69
/web/client/components/map/openlayers/plugins/COGLayer.js
1
/**
2
 * Copyright 2015, GeoSolutions Sas.
3
 * All rights reserved.
4
 *
5
 * This source code is licensed under the BSD-style license found in the
6
 * LICENSE file in the root directory of this source tree.
7
 */
8

9
import Layers from '../../../../utils/openlayers/Layers';
10
import isEqual from 'lodash/isEqual';
11
import get from 'lodash/get';
12

13
import GeoTIFF from 'ol/source/GeoTIFF.js';
14
import TileLayer from 'ol/layer/WebGLTile.js';
15
import { isProjectionAvailable } from '../../../../utils/ProjectionUtils';
16
import { getCredentials } from '../../../../utils/SecurityUtils';
17

18
function create(options) {
19
    let sourceOptions;
NEW
20
    if (options.security) {
×
NEW
21
        const storedProtectedService = getCredentials(options.security?.sourceId) || {};
×
NEW
22
        sourceOptions.headers = {
×
23
            "Authorization": `Basic ${btoa(storedProtectedService.username + ":" + storedProtectedService.password)}`
24
        };
25
    }
26
    return new TileLayer({
×
27
        msId: options.id,
28
        style: get(options, 'style.body'),
29
        opacity: options.opacity !== undefined ? options.opacity : 1,
×
30
        visible: options.visibility,
31
        source: new GeoTIFF({
32
            convertToRGB: 'auto', // CMYK, YCbCr, CIELab, and ICCLab images will automatically be converted to RGB
33
            sources: options.sources,
34
            wrapX: true,
35
            sourceOptions
36
        }),
37
        zIndex: options.zIndex,
38
        minResolution: options.minResolution,
39
        maxResolution: options.maxResolution
40
    });
41
}
42

43
Layers.registerType('cog', {
1✔
44
    create,
45
    update(layer, newOptions, oldOptions, map) {
UNCOV
46
        if (newOptions.srs !== oldOptions.srs
×
47
            || !isEqual(newOptions.style, oldOptions.style)
48
            || !isEqual(newOptions.security, oldOptions.security)
49
            || !isEqual(newOptions.sources, oldOptions.sources) // min/max source data value can change
50
        ) {
NEW
51
            return create(newOptions, map);
×
52
        }
53
        if (oldOptions.minResolution !== newOptions.minResolution) {
×
UNCOV
54
            layer.setMinResolution(newOptions.minResolution === undefined ? 0 : newOptions.minResolution);
×
55
        }
56
        if (oldOptions.maxResolution !== newOptions.maxResolution) {
×
UNCOV
57
            layer.setMaxResolution(newOptions.maxResolution === undefined ? Infinity : newOptions.maxResolution);
×
58
        }
59
        return null;
×
60
    },
61
    isCompatible: (layer) => {
UNCOV
62
        return isProjectionAvailable(layer?.sourceMetadata?.crs);
×
63
    }
64
});
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

© 2026 Coveralls, Inc