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

Lock wms crs input to epsg-3857 (issue 600) #632

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

qugu2427
Copy link
Contributor

@qugu2427 qugu2427 commented Jul 9, 2024

Description

Disable the custom wms crs input and set it to a constant value of EPSG:3857.

Currently, users are able to input a different crs into the curstom wms field. The problem is that maplibre only allows epsg-3857 (see #600 (comment)), thus inputting any other value creates an incorrect bbox which essentially ruins the whole map.

Though this is not a perfect 'fix', it does prevent these bbox errors from occuring. Additionally, most map servers will allow epsg-3857 as a source.

Issues Resolved

#600

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Quinn Guerin added 2 commits July 9, 2024 15:33
Signed-off-by: Quinn Guerin <qguerin@icr-team.com>
Signed-off-by: Quinn Guerin <qguerin@icr-team.com>
@junqiu-lei
Copy link
Member

Thanks for sharing the context for maplibre supported projections, like it metioned:

MapLibre Native supports Web Mercator (EPSG:3857) as its only supported projection. This fulfills most of the web and device map needs. At the time of writing, modern map renderers such as Google Maps and Mapbox GL offers 3D globe, conic, and rectangular projections too. At the time of writing, MapLibre Native renderer component does not have an architectural separation for supporting multiple projections and coordinate reference systems.

In this case, maybe we remove crs field component on UI and use the fixed constant value of EPSG:3857 here?

@qugu2427
Copy link
Contributor Author

@junqiu-lei Per maplibre/maplibre-gl-js#168, there is a very slow push to add support for additional crs types. My thinking was that leaving the wms crs ui field, would make it trivial to re-enable once maplibre adds support. Additionally, it would at least alert users to the fact that they can only use epsg-3857, which could save them a headache since some legacy sources do not support epsg-3857.

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.

None yet

2 participants