-
Notifications
You must be signed in to change notification settings - Fork 7
HTM-1886 | HTM-1883: Enable choosing a layer style in the viewer when configured #1141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
423f74d to
ed44057
Compare
ed44057 to
0aa59f4
Compare
0aa59f4 to
4271bb6
Compare
There was a problem hiding this 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
WmsStyleModeland addsstyles/selectedStyleNameto 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. |
projects/core/src/lib/components/toc/toc-node-layer/toc-node-layer.component.html
Show resolved
Hide resolved
projects/shared/src/lib/components/legend-image/legend-image.component.ts
Outdated
Show resolved
Hide resolved
projects/core/src/lib/components/legend/legend-layer/legend-layer.component.ts
Show resolved
Hide resolved
projects/admin-core/src/lib/catalog/layer-settings-form/layer-settings-form.component.ts
Show resolved
Hide resolved
4271bb6 to
ace34b2
Compare
and react to the check
also be consistent about legendUrl capitalisation een make sure the legend is updated on the panel and in the state
0d67110 to
efa2ffd
Compare
requires: Tailormap/tailormap-api#1593