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

geosolutions-it / MapStore2 / 19927590746

04 Dec 2025 10:45AM UTC coverage: 76.674% (+0.01%) from 76.664%
19927590746

Pull #11768

github

web-flow
Update User Guide - Isochrone plugin (#11769)

* add_11665

* Update docs/user-guide/isochrone.md

* Update docs/user-guide/isochrone.md

---------

Co-authored-by: Suren <dsuren1@gmail.com>
Pull Request #11768: Update User Guide - Itinerary plugin

32304 of 50262 branches covered (64.27%)

40210 of 52443 relevant lines covered (76.67%)

38.06 hits per line

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

30.0
/web/client/plugins/mapEditor/enhancers/editor.js
1
/*
2
 * Copyright 2019, 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
import React from 'react';
9
import {withHandlers, compose, defaultProps} from 'recompose';
10
import pickBy from 'lodash/pickBy';
11
import isNil from 'lodash/isNil';
12
import {connect} from 'react-redux';
13
import {resizeMap} from '../../../actions/map';
14

15
import WithConfirm from '../../../components/misc/withConfirm';
16
import Message from '../../../components/I18N/Message';
17
import withResizeSpy from '../../../components/misc/enhancers/withResizeSpy';
18

19
import {createSelector} from 'reselect';
20
import {mapSelector} from '../../../selectors/map';
21
import {layersSelector, groupsSelector} from '../../../selectors/layers';
22
import {backgroundListSelector} from '../../../selectors/backgroundselector';
23
import {mapOptionsToSaveSelector} from '../../../selectors/mapsave';
24
import {textSearchConfigSelector, bookmarkSearchConfigSelector} from '../../../selectors/searchconfig';
25
import MapUtils from '../../../utils/MapUtils';
26

27

28
const saveSelector = createSelector(
1✔
29
    layersSelector,
30
    groupsSelector,
31
    backgroundListSelector,
32
    mapOptionsToSaveSelector,
33
    textSearchConfigSelector,
34
    bookmarkSearchConfigSelector,
35
    mapSelector,
36
    (layers, groups, backgrounds, additionalOptions, textSearchConfig, bookmarkSearchConfig, map) =>
37
        ({layers, groups, backgrounds, additionalOptions, textSearchConfig, bookmarkSearchConfig, map})
4✔
38
);
39

40

41
export default compose(
42
    connect(saveSelector),
43
    defaultProps({
44
        confirmTitle: <Message msgId = "mapEditor.confirmExitTitle"/>,
45
        confirmContent: <Message msgId = "mapEditor.confirmExitContent"/>
46
    }),
47
    withHandlers({
48
        onClick: ({hide, owner}) => () => {
×
49
            hide(owner);
×
50
        },
51
        save: ({save, owner, map, layers, groups, backgrounds, textSearchConfig, bookmarkSearchConfig, additionalOptions}) => () => {
×
52
            const mapData = MapUtils.saveMapConfiguration(map, layers, groups,
×
53
                backgrounds, textSearchConfig, bookmarkSearchConfig, additionalOptions);
54

55
            return save({
×
56
                ...mapData.map,
57
                ...(map.widgetId && {widgetId: map.widgetId}),
×
58
                ...(map.mapId && {mapId: map.mapId}),
×
59
                layers: mapData.map.layers.map(l => pickBy(l, (p) => !isNil(p)))},
×
60
            owner);
61
        }
62
    }),
63
    WithConfirm,
64
    withHandlers({hide: ({onClick}) => (...args) => onClick(...args) })
×
65
);
66

67
export const withResizeMap = compose(
1✔
68
    connect(null, {onResize: resizeMap}),
69
    withResizeSpy({debounceTime: 150})
70
);
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