WebMapServiceImageryProvider clobbers srs option
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 15.8k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
If, theoretically, one were using a different SRS, such as one for the moon, and wanted to pass that through to a WMS via the WebMapServiceImageryProvider, there is currently no way to do so as this is hardcoded as follows:
// Use SRS or CRS based on the WMS version.
if (parseFloat(resource.queryParameters.version) >= 1.3) {
// Use CRS with 1.3.0 and going forward.
// For GeographicTilingScheme, use CRS:84 vice EPSG:4326 to specify lon, lat (x, y) ordering for
// bbox requests.
parameters.crs = options.tilingScheme instanceof WebMercatorTilingScheme ? 'EPSG:3857' : 'CRS:84';
} else {
// SRS for WMS 1.1.0 or 1.1.1.
parameters.srs = options.tilingScheme instanceof WebMercatorTilingScheme ? 'EPSG:3857' : 'EPSG:4326';
}
It would be a simple thing to check for the srs parameter in the options, and use that instead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the WebMapServiceImageryProvider entry point and inspect the shown WMS-version branch and its options/query-parameter flow. Verify how an explicitly supplied SRS is handled for different WMS versions, then run the relevant provider tests and confirm the request preserves that option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100