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

#9025 WMS caching with custom scales (projection resolutions strategy) #9168

Merged
merged 6 commits into from
May 17, 2023

Conversation

allyoucanmap
Copy link
Contributor

Description

This PR refactors the TileGrid options generated for the WMS source of OpenLayers and it reviews following parts:

  • extent and projection of default projections, in particular EPSG:3857
  • use of getResolutionsForProjection instaed of MapUtils.getResolutions in WMS tilegrid for openlayers
  • review of some projection related functions

Please check if the PR fulfills these requirements

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

  • Feature

Issue

What is the current behavior?

#9025

What is the new behavior?

Breaking change

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

  • No

Other useful information

@allyoucanmap allyoucanmap self-assigned this May 15, 2023
@allyoucanmap allyoucanmap changed the title #9025 WMS caching with custom scales #9025 WMS caching with custom scales (projection resolutions strategy) May 15, 2023
@allyoucanmap allyoucanmap linked an issue May 15, 2023 that may be closed by this pull request
2 tasks
@tdipisa tdipisa requested a review from offtherailz May 15, 2023 09:14
@tdipisa tdipisa added this to the 2023.02.00 milestone May 15, 2023
Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

I only suggested one change, but it is not mandatory, so I approve it anyway. The rest looks good.
Probably you will have to refactor a little bit when you will have to handle the custom gridset from WMTS/config.

@@ -439,7 +443,7 @@ class OpenlayersMap extends React.Component {
updateMapInfoState = () => {
let view = this.map.getView();
let tempCenter = view.getCenter();
let projectionExtent = view.getProjection().getExtent() || getExtentForProjection(this.props.projection);
let projectionExtent = view.getProjection().getExtent() || msGetProjection(this.props.projection).extent;
Copy link
Member

Choose a reason for hiding this comment

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

This is used twice. IDK exactly why OL extent may be null (and if it should have priority or not).
You can create a function getExtent(this.map, this.props) to centralize and help future refactors and/or changes.

@allyoucanmap allyoucanmap requested a review from offtherailz May 17, 2023 10:07
@offtherailz offtherailz merged commit ec60301 into geosolutions-it:master May 17, 2023
@allyoucanmap
Copy link
Contributor Author

@ElenaGallo please test this enhancement in dev, thanks.
Note: this implement only partially the work required to solve the issue

allyoucanmap added a commit to allyoucanmap/MapStore2 that referenced this pull request Jun 14, 2023
offtherailz added a commit that referenced this pull request Jun 15, 2023
…scales (#9222)

* #9025 WMS caching with custom scales (projection resolutions strategy) (#9168)

* Fix #9025 WMS caching with custom scales (custom resolutions strategy from WMTS) (#9184)

---------

Co-authored-by: Lorenzo Natali <lorenzo.natali@geosolutionsgroup.com>

* Fix #9025 Available tile grids popup always reports mismatch in geostories and dashboards (#9196)

* Fix #9193 Add a cache options checks/info also for default WMS tile grid (#9195)

* Fix #9193 failing test (#9207)

* #9025 add caching options to wms background settings (#9213)

* fix failing tests

---------

Co-authored-by: Lorenzo Natali <lorenzo.natali@geosolutionsgroup.com>
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.

WMS caching with custom scales
3 participants