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

WebMapServiceImageryProvider clobbers srs option #6223

Open
tamarmot opened this issue Feb 15, 2018 · 2 comments
Open

WebMapServiceImageryProvider clobbers srs option #6223

tamarmot opened this issue Feb 15, 2018 · 2 comments

Comments

@tamarmot
Copy link
Contributor

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.

@hpinkos
Copy link
Contributor

hpinkos commented Feb 15, 2018

Thanks @tamarmot! If you have a chance, we'd be happy to take another PR with this fix =)

@tamarmot
Copy link
Contributor Author

tamarmot commented Feb 15, 2018 via email

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

No branches or pull requests

2 participants