Update OpenLayers version and support non-built-in projections#7290
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OpenLayers template added in #7218 works fine when a request is made using one of the built-in OpenLayers projections - EPSG:4326 or EPSG:3857, however for other projections when using WMS requests and
&FORMAT=application/openlayersOpenLayers throws an error:This PR adds an additional JS check to prevent this error, by ensuring the code is registered with OpenLayers. As the map only shows layers from MapServer the actual projections don't need to have any further details (which would get very complicated and require proj4js to be included and fulll PROJ definitions to be sent back).
The check is as follows:
If the projection is already supported by OpenLayers no changes are made.
The PR also includes a test, and bumps up the inbuilt OL version to a custom build based on v10.5.0 of OpenLayers, with additional
ol.projobjects added (see geographika/ol-mapserver@ee41192). PR to the docs repo to follow.