Skip to content

Conversation

@mprins
Copy link
Contributor

@mprins mprins commented Feb 9, 2026

HTM-1886 Powered by Pull Request Badge
HTM-1883

  • HTM-1886: Handle updated models communicating available styles as part of layer properties
  • HTM-1883: Make TOC handle configured WMS style(s)

requires: Tailormap/tailormap-api#1593

@mprins mprins self-assigned this Feb 9, 2026
@mprins mprins added the enhancement New feature or request label Feb 9, 2026
@mprins mprins force-pushed the HTM-1886_handle_styles_in_viewer branch from 423f74d to ed44057 Compare February 10, 2026 09:30
@mprins mprins force-pushed the HTM-1886_handle_styles_in_viewer branch from ed44057 to 0aa59f4 Compare February 10, 2026 09:38
@mprins mprins changed the title [WIP] HTM-1886: Handle updated models communicating available styles as part of layer properties [WIP] HTM-1886 | HTM-1883: Enable choosing a layer style when configured Feb 10, 2026
@mprins mprins force-pushed the HTM-1886_handle_styles_in_viewer branch from 0aa59f4 to 4271bb6 Compare February 10, 2026 11:22
@mprins mprins changed the title [WIP] HTM-1886 | HTM-1883: Enable choosing a layer style when configured HTM-1886 | HTM-1883: Enable choosing a layer style in the viewer when configured Feb 10, 2026
@mprins mprins marked this pull request as ready for review February 10, 2026 11:23
Copilot AI review requested due to automatic review settings February 10, 2026 11:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for WMS layer style selection in the viewer (when styles are configured/provided by the API) and wires the chosen style through state, map rendering, and legend rendering.

Changes:

  • Introduces a WmsStyleModel and adds styles / selectedStyleName to layer models (viewer + map).
  • Adds store action/reducer handling for style selection and applies the selected style to WMS requests.
  • Extends TOC UI to display selectable WMS styles and updates legend rendering to use the selected style’s legend URL.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
projects/shared/src/lib/components/tree/tree.component.html Adds CSS hook classes for checkbox/radio alignment tweaks used by TOC.
projects/shared/src/lib/components/legend-image/legend-image.component.ts Adds debug logging during legend settings computation.
projects/map/src/lib/openlayers-map/open-layers-layer-manager.ts Adds imperative API to update WMS STYLES param and refresh the layer.
projects/map/src/lib/models/wms-layer.model.ts Extends WMS layer model with available styles and selected style name.
projects/map/src/lib/models/layer-manager.model.ts Extends layer manager interface with setLayerStyle.
projects/map/src/lib/map-service/map.service.ts Exposes setLayerStyle on the map service facade.
projects/map/src/lib/helpers/ol-layer.helper.ts Adds STYLES param support when creating WMS source params.
projects/core/src/lib/map/state/map.reducer.ts Adds reducer handling to persist selectedStyleName in map state.
projects/core/src/lib/map/state/map.actions.ts Adds setLayerStyle action.
projects/core/src/lib/map/services/application-map.service.ts Passes styles and selectedStyleName into created WMSLayerModels.
projects/core/src/lib/map/helpers/layer-model.helper.ts Initializes selectedStyleName when styles are present.
projects/core/src/lib/components/toc/toc/toc.component.ts Wires TOC “changeStyle” event to store + map service.
projects/core/src/lib/components/toc/toc/toc.component.html Hooks up (changeStyle) output from TOC layer node.
projects/core/src/lib/components/toc/toc/toc.component.css Adjusts checkbox alignment in TOC tree via ::ng-deep.
projects/core/src/lib/components/toc/toc-node-layer/toc-node-layer.component.ts Adds output + helpers for style selection.
projects/core/src/lib/components/toc/toc-node-layer/toc-node-layer.component.html Adds radio UI for selecting a WMS style per layer.
projects/core/src/lib/components/toc/toc-node-layer/toc-node-layer.component.css Adds styling for style radio buttons.
projects/core/src/lib/components/legend/legend-layer/legend-layer.component.ts Uses selected style’s legendUrl when available.
projects/api/src/lib/models/wms-style.model.ts Introduces WmsStyleModel interface.
projects/api/src/lib/models/index.ts Exports WmsStyleModel.
projects/api/src/lib/models/app-layer.model.ts Extends app layer model with styles and selectedStyleName.
projects/admin-core/src/lib/catalog/layer-settings-form/layer-settings-form.component.ts Switches style model import and supports selected styles in admin UI.
projects/admin-core/src/lib/catalog/geo-service-layer-details/geo-service-layer-details.component.ts Switches style model import for available styles.
projects/admin-api/src/lib/models/layer-settings-wms.model.ts Uses viewer WmsStyleModel for WMS layer settings.
projects/admin-api/src/lib/models/index.ts Stops exporting admin-api’s own wms-style.model.
projects/admin-api/src/lib/models/geo-service-layer.model.ts Uses viewer WmsStyleModel for GeoService layer styles.

also be consistent about legendUrl capitalisation een make sure the legend is updated on the panel and in the state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant