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

Create new loader if view projection changes #15165

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

mike-000
Copy link
Contributor

Fixes #15161

@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-15165--ol-site.netlify.app/.

@mike-000 mike-000 marked this pull request as ready for review September 22, 2023 13:29
@@ -141,8 +147,9 @@ class ImageArcGISRest extends ImageSource {
if (this.url_ === undefined) {
return null;
}
if (!this.loader) {
if (!this.loader || this.loaderProjection_ !== projection) {
Copy link
Member

Choose a reason for hiding this comment

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

The equivalent() function should be used here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code replicates the behavior before version 8 - if the view projection was EPSG:3857 the image was requested for CRS EPSG:3857, if the view projection was changed to EPSG:900913 the image was requested for CRS EPSG:900913. Ditto for EPSG:4326/CRS:84, etc.

@@ -141,8 +147,9 @@ class ImageMapGuide extends ImageSource {
if (this.url_ === undefined) {
return null;
}
if (!this.loader) {
if (!this.loader || this.loaderProjection_ !== projection) {
Copy link
Member

Choose a reason for hiding this comment

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

Same

@@ -195,8 +201,9 @@ class ImageWMS extends ImageSource {
if (this.url_ === undefined) {
return null;
}
if (!this.loader) {
if (!this.loader || this.loaderProjection_ !== projection) {
Copy link
Member

Choose a reason for hiding this comment

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

Same

@ahocevar
Copy link
Member

Obviously a test would be good to avoid future regressions on this.

@ahocevar ahocevar merged commit 4bf147e into openlayers:main Sep 23, 2023
8 checks passed
@ahocevar
Copy link
Member

Thanks, @mike-000

@KyllianGautier
Copy link

Thanks you very much guys ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image WMS does not consider projection after view changed
3 participants