CesiumGS / CesiumGS/cesium

WebMapServiceImageryProvider clobbers srs option

Open
#6,223 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

category - terrain and imagery
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.