Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
f662957
Add Configs
arxitpln May 20, 2025
c2cd086
Add dynamic legend to plugin
arxitpln May 20, 2025
4d299a2
Add enableDynamicLegend in TOC
arxitpln May 20, 2025
c563d76
Add dynamic legend capabilities
arxitpln May 20, 2025
ad6aca6
Add plugin code
arxitpln May 20, 2025
60f145b
Correction call on OnUpdate
arxitpln May 20, 2025
c4b1197
Trasnmit onUpdate
arxitpln May 20, 2025
7ded0c4
Correction on Transmit
arxitpln May 20, 2025
2a40ff6
Add translations
arxitpln May 20, 2025
5d60a51
Use of disableResolutionLimits for min- and maxResolution
arxitpln May 28, 2025
a11b673
review changes
allyoucanmap May 29, 2025
6880a60
Add WMSLegendOptions
arxitpln Jun 6, 2025
f56a754
Merge remote-tracking branch 'allyoucanmap/arxit-floating-dynamic-leg…
arxitpln Jun 6, 2025
5d26cde
Remove Duplicate
arxitpln Jul 24, 2025
9892f8c
Test 1st draft
arxitpln Jul 24, 2025
95268df
default layout for this type of plugin is a side panel
arxitpln Jul 25, 2025
c8272e8
 When the legend is completely empty there is no feedback to the user.
arxitpln Jul 25, 2025
887c50a
visualize the legend as a flat list of layers without groups
arxitpln Jul 25, 2025
53211d8
Add isFloating & flatLegend to cfg
arxitpln Jul 25, 2025
a20f887
DynamicLegend JsDoc
arxitpln Jul 25, 2025
17d2612
Split DynamicLegend Component
arxitpln Jul 25, 2025
0ade2b1
Set versions of main dependencies (geostore, mapfish, http-proxy) (#1…
github-actions[bot] Nov 4, 2025
dbd9faf
Bump org.apache.tomcat:tomcat-catalina in /binary (#11639) (#11654)
offtherailz Nov 5, 2025
25bb1a0
chore: Remove @babel/runtime (#11629) (#11663)
jna4k Nov 7, 2025
1fd74e7
remove from plugin from localJson
bgr-arxit Nov 7, 2025
41c74aa
remove plugin from simple json
bgr-arxit Nov 7, 2025
ee68b3b
#11655: Fix Auth token not sent in /rest requests for rule manager (#…
mahmoudadel54 Nov 12, 2025
86425e7
Fix #11257 Add the draping of imagery layers on 3d tiles functionalit…
subashtiwari1010 Nov 14, 2025
d696ed6
fix: prevent warnings during line drawing (#11642) (#11682)
rowheat02 Nov 14, 2025
dcb0e0b
Map Templates list is not retained when replacing the current map #11…
rowheat02 Nov 14, 2025
0a5a87a
Fix #11613 and #11614 issues on mapview's TOC (#11656) (#11681)
rowheat02 Nov 14, 2025
b9be5c1
correct layers order in flat mode
bgr-arxit Nov 14, 2025
d30f233
display message when legend is empty
bgr-arxit Nov 14, 2025
d09437b
Rename directory dynamicLegend to DynamicLegend
bgr-arxit Nov 14, 2025
3db940a
clean repo
bgr-arxit Nov 14, 2025
d894351
#11678: Fix Manage Rule - WMS service is not reachable (#11679) (#11699)
mahmoudadel54 Nov 19, 2025
e806336
Improve the Street Smart plugin view for 3D maps visualization(Re-log…
rowheat02 Nov 19, 2025
4905f46
[Backport 2025.02.xx] #11387: Enhance Itinerary panel (#11657) (#1167…
dsuren1 Nov 19, 2025
da60c28
[Backport 2025.02.xx] #11437 - Isochrone panel enhancement (#11674)
dsuren1 Nov 19, 2025
a80efc4
add jsDocs for the plugin configuration
bgr-arxit Nov 19, 2025
351ed73
little correction for jsDoc
bgr-arxit Nov 19, 2025
86d31dc
[Backport 2025.02.xx] #10924: fix the regression issue of disable ip …
mahmoudadel54 Nov 20, 2025
ff65658
Grant access to MapStore resources by IP #972 (#11333) (#11707)
rowheat02 Nov 20, 2025
74a90d4
hide permission for annonimous user (#11690) (#11701)
github-actions[bot] Nov 20, 2025
6ee200e
Fix #11691 Test failing randomly during build (#11704) (#11706)
github-actions[bot] Nov 20, 2025
6725264
Fixes failing binary build (#11717) (#11718)
github-actions[bot] Nov 24, 2025
a52f299
Update pom.xml (#11723)
tdipisa Nov 25, 2025
eabc567
Add pull_request_target event to CI workflow (#11719) (#11724)
offtherailz Nov 25, 2025
5a9f94b
Disable tests that randomly fail on jenkins CI (#11725) (#11729)
github-actions[bot] Nov 26, 2025
e3dabff
[Backport 2025.02.xx] Fix maven publish (#11739) (#11740)
offtherailz Nov 27, 2025
6079e21
Fix #11734. Adjust footer buttons (#11735) (#11736)
github-actions[bot] Dec 1, 2025
77a7228
Fix #11731 Support for Burgermenu in Itinerary and Isochrone plugin (…
github-actions[bot] Dec 1, 2025
415053c
French translation for "buckets" in Isochrone plugin (#11727) (#11743)
github-actions[bot] Dec 1, 2025
db3ab7b
[Backport 2025.02.xx] Update User Guide - Update Tags menu section (#…
github-actions[bot] Dec 2, 2025
d127f27
Fix #11748 Access Restrictions for Maps Created from Unadvertised Co…
github-actions[bot] Dec 2, 2025
32deb5d
Update User Guide - 3D Tiles imagery layers (#11758) (#11759)
github-actions[bot] Dec 2, 2025
b76ccfc
Fix #11754 - Moved assemply to bin-war module (#11761) (#11763)
github-actions[bot] Dec 3, 2025
05f4202
Update User Guide - Show the current time and Null values options on …
github-actions[bot] Dec 3, 2025
b384da1
Update User Guide - Cascading search filter (#11766) (#11767)
github-actions[bot] Dec 3, 2025
e7c2a16
fix panel layout
allyoucanmap Nov 27, 2025
939a76f
rename plugin folder
allyoucanmap Nov 27, 2025
359f508
Merge remote-tracking branch 'mapstore2official/2025.02.xx' into arxi…
bgr-arxit Dec 4, 2025
b59850a
add units test
bgr-arxit Dec 4, 2025
65d5f5e
add test and rename
bgr-arxit Dec 4, 2025
a4ec629
clean repo
bgr-arxit Dec 4, 2025
ab98067
restaure test file
bgr-arxit Dec 4, 2025
61b3699
restaure test file
bgr-arxit Dec 4, 2025
6827b21
Merge branch 'master' of https://github.com/geosolutions-it/MapStore2…
allyoucanmap Jan 12, 2026
affec99
revert changes in testConfig.js and pom.xml
allyoucanmap Jan 12, 2026
8d8d61c
remove default config and rely on default props
allyoucanmap Jan 12, 2026
76c37ea
review name import and location of unit tests
allyoucanmap Jan 12, 2026
d21ee32
update jsdoc link
allyoucanmap Jan 12, 2026
17d00dc
update jsdoc description
allyoucanmap Jan 12, 2026
15a1775
rename _test_ folder to __tests__
allyoucanmap Jan 12, 2026
458ff5d
add unit tests
allyoucanmap Jan 12, 2026
33b7fcf
restore removed unit test
allyoucanmap Jan 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions project/standard/templates/configs/pluginsConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@
"children": ["Permalink"],
"autoEnableChildren": ["Permalink"]
},
{
"name": "DynamicLegend",
"glyph": "align-left",
"title": "plugins.DynamicLegend.title",
"description": "plugins.DynamicLegend.description",
"dependencies": ["SidebarMenu"],
"defaultConfig": {
"isFloating": false,
"flatLegend": false
}
},
{
"name": "Permalink",
"glyph": "link",
Expand Down
11 changes: 11 additions & 0 deletions web/client/configs/pluginsConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@
"children": ["Permalink"],
"autoEnableChildren": ["Permalink"]
},
{
"name": "DynamicLegend",
"glyph": "align-left",
"title": "plugins.DynamicLegend.title",
"description": "plugins.DynamicLegend.description",
"dependencies": ["SidebarMenu"],
"defaultConfig": {
"isFloating": false,
"flatLegend": false
}
},
{
"name": "Permalink",
"glyph": "link",
Expand Down
15 changes: 12 additions & 3 deletions web/client/plugins/TOC/components/ArcGISLegend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ import { getLayerIds } from '../../../utils/ArcGISUtils';
/**
* ArcGISLegend renders legend from a MapServer or ImageServer service
* @prop {object} node layer node options
* @prop {function} onChange return the changes of a specific node
*/
function ArcGISLegend({
node = {}
node = {},
onChange = () => {}
}) {
const [legendData, setLegendData] = useState(null);
const [error, setError] = useState(false);
Expand All @@ -31,8 +33,15 @@ function ArcGISLegend({
f: 'json'
}
})
.then(({ data }) => setLegendData(data))
.catch(() => setError(true));
.then(({ data }) => {
const legendEmpty = data.layers.every(layer => layer.legend.length === 0);
onChange({ legendEmpty });
setLegendData(data);
})
.catch(() => {
onChange({ legendEmpty: true });
setError(true);
});
}
}, [legendUrl]);

Expand Down
1 change: 1 addition & 0 deletions web/client/plugins/TOC/components/DefaultLayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const NodeLegend = ({
<li>
{visible ? <ArcGISLegend
node={node}
onChange={onChange}
/> : null}
</li>
</>
Expand Down
7 changes: 2 additions & 5 deletions web/client/plugins/TOC/components/LayersTree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const LayersTree = ({
nodeToolItems,
nodeContentItems,
singleDefaultGroup = isSingleDefaultGroup(tree),
theme
theme,
getNodeStyle = () => ({})
}) => {

const containerNode = useRef();
Expand All @@ -117,10 +118,6 @@ const LayersTree = ({
return (<Layer />);
};

const getNodeStyle = () => {
return {};
};

const getNodeClassName = (currentNode) => {
const selected = selectedNodes.find((selectedNode) => currentNode.id === selectedNode.id);
const contextMenuHighlight = contextMenu?.id === currentNode.id;
Expand Down
11 changes: 8 additions & 3 deletions web/client/plugins/TOC/components/Legend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { getWMSLegendConfig, LEGEND_FORMAT } from '../../../utils/LegendUtils';
* @prop {string} language current language code
* @prop {number} legendWidth width of the legend symbols
* @prop {number} legendHeight height of the legend symbols
* @prop {function} onUpdateNode return the changes of a specific node
*/
class Legend extends React.Component {
static propTypes = {
Expand All @@ -49,15 +50,17 @@ class Legend extends React.Component {
language: PropTypes.string,
projection: PropTypes.string,
mapSize: PropTypes.object,
bbox: PropTypes.object
bbox: PropTypes.object,
onChange: PropTypes.func
};

static defaultProps = {
legendHeight: 12,
legendWidth: 12,
legendOptions: "forceLabels:on",
style: {maxWidth: "100%"},
scaleDependent: true
scaleDependent: true,
onChange: () => {}
};
state = {
error: false
Expand Down Expand Up @@ -132,9 +135,11 @@ class Legend extends React.Component {
validateImg = (img) => {
// GeoServer response is a 1x2 px size when legend is not available.
// In this case we need to show the "Legend Not available" message
if (img.height <= 1 && img.width <= 2) {
const imgError = img.height <= 1 && img.width <= 2;
if (imgError) {
this.onImgError();
}
this.props.onChange({ legendEmpty: imgError });
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class StyleBasedWMSJsonLegend extends React.Component {

const currEnableDynamicLegend = this.props?.layer?.enableDynamicLegend;
const prevEnableDynamicLegend = prevProps?.layer?.enableDynamicLegend;

const [prevFilter, currFilter] = [prevProps?.layer, this.props?.layer]
.map(_layer => getLayerFilterByLegendFormat(_layer, LEGEND_FORMAT.JSON));

Expand Down Expand Up @@ -104,8 +103,11 @@ class StyleBasedWMSJsonLegend extends React.Component {
}
this.setState({ loading: true });
getJsonWMSLegend(jsonLegendUrl).then(data => {
const legendEmpty = data.length === 0 || data[0].rules.length === 0;
this.props.onChange({ legendEmpty: legendEmpty });
this.setState({ jsonLegend: data[0], loading: false });
}).catch(() => {
this.props.onChange({ legendEmpty: true });
this.setState({ error: true, loading: false });
});
}
Expand Down
6 changes: 5 additions & 1 deletion web/client/plugins/TOC/components/TOC.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
* @prop {object} config.groupOptions.tooltipOptions options for group title tooltip
* @prop {object} config.layerOptions specific options for layer nodes
* @prop {object} config.layerOptions.tooltipOptions options for layer title tooltip
* @prop {boolean} config.layerOptions.enableDynamicLegend make the legend dynamic
* @prop {boolean} config.layerOptions.hideLegend hide the legend of the layer
* @prop {object} config.layerOptions.legendOptions additional options for WMS legend
* @prop {boolean} config.layerOptions.hideFilter hide the filter button in the layer nodes
Expand All @@ -77,7 +78,8 @@ export function ControlledTOC({
nodeToolItems,
nodeContentItems,
singleDefaultGroup,
theme
theme,
getNodeStyle
}) {
return (
<LayersTree
Expand All @@ -104,6 +106,7 @@ export function ControlledTOC({
nodeToolItems={nodeToolItems}
nodeContentItems={nodeContentItems}
singleDefaultGroup={singleDefaultGroup}
getNodeStyle={getNodeStyle}
/>
);
}
Expand Down Expand Up @@ -137,6 +140,7 @@ export function ControlledTOC({
* @prop {object} config.groupOptions.tooltipOptions options for group title tooltip
* @prop {object} config.layerOptions specific options for layer nodes
* @prop {object} config.layerOptions.tooltipOptions options for layer title tooltip
* @prop {boolean} config.layerOptions.enableDynamicLegend make the legend dynamic
* @prop {boolean} config.layerOptions.hideLegend hide the legend of the layer
* @prop {object} config.layerOptions.legendOptions additional options for WMS legend
* @prop {boolean} config.layerOptions.hideFilter hide the filter button in the layer nodes
Expand Down
1 change: 1 addition & 0 deletions web/client/plugins/TOC/components/WMSLegend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class WMSLegend extends React.Component {
}
legendOptions={this.props.WMSLegendOptions}
{...this.getLegendProps()}
onChange={this.props.onChange}
/>
</div>
);
Expand Down
Loading