Skip to content
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

#10281: Use Cache Options functionality extended to be applied on all the layers from a service #10349

Merged
merged 2 commits into from
May 23, 2024

Conversation

mahmoudadel54
Copy link
Contributor

Description

In this PR, the functionality for use cache options for mapviewer, dashboard, geostory and context are added. Now user can specify the 'use cache options' from the catalog instead of manually setting in layer settings to activate the tile grid props.

  • In includes a checkbox in catalogs for the WMS tiled services for 'use cache options' flag.
  • any layer will be added from catalog with type wms service, will contain the tile gird props if 'use cache options' flag = true.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

#10281

What is the current behavior?
#10281

What is the new behavior?
Now user can specify the 'use cache options' from the catalog instead of manually setting in layer settings.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

… applied on all the layers from a service

Description:
- add the functionality for use cache options for mapviewer, dashboard, geostory, context
- add unit tests
- add translations
Copy link
Contributor

@MV88 MV88 left a comment

Choose a reason for hiding this comment

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

@mahmoudadel54 looks good to me, nice job

addLayer(layer);
toggleLayerSelector(false);
// fetching 'tileGridData' if layer has truthy flag 'remoteTileGrids' and adding the required props to layer object
let tileGridPromise = layer.type === 'wms' && layer.remoteTileGrids ? getLayerTileMatrixSetsInfo(generateGeoServerWMTSUrl(layer), layer.name, layer) : new Promise((resolve) => resolve(null));
Copy link
Contributor

Choose a reason for hiding this comment

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

looks nice this part

@MV88 MV88 merged commit 86e2eb7 into geosolutions-it:master May 23, 2024
6 checks passed
@MV88
Copy link
Contributor

MV88 commented May 23, 2024

@ElenaGallo please test it in DEV

@ElenaGallo
Copy link
Contributor

@mahmoudadel54 if the custom tile grids are not available for a layer a note does not appear, it is visible only when I click on Update available tile grids.

1.mp4

@tdipisa
Copy link
Member

tdipisa commented May 23, 2024

@mahmoudadel54 the behavior above reports an inconsistency. In the display tab the correct state should be reported to the user and the layer configured accordingly. If Use remote custom tile grids in catalog is active, I guess you have to perform a WMTS request before adding the layer to the map to verify if the remote custom tile grid definition exists and can be used. Then, the state of the layer should be consistent with this as well as the UI state.

@ElenaGallo
Copy link
Contributor

Test passed, @mahmoudadel54 please backport to 2024.01.xx. Thanks

mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this pull request May 27, 2024
…ctionality extended to be applied on all the layers from a service (geosolutions-it#10349)
MV88 pushed a commit that referenced this pull request May 27, 2024
…ed to be applied on all the layers from a service (#10349, #10361) (#10363)

* fix conflicts in merging  #10281: Use Cache Options functionality extended to be applied on all the layers from a service (#10349)

* #10281: Use Cache Options functionality extended to be applied on all the layers from a service (#10361)

* #10281: Use Cache Options functionality extended to be applied on all the layers from a service
Description:
- handle a missing case of showing a warning message in case of not able to fetch the grid sets
- add unit tests

* fix FE unit test failure  #10281

* fix FE unit test failure  #10281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Cache Options functionality extended to be applied on all the layers from a service
4 participants