-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Cheapo WMS support #2409
Cheapo WMS support #2409
Conversation
This adds a `{bbox-epsg-3857}` token to URL requests. This would let us support 3857-supporting CORS-supporting WMS servers in GL JS with very little change - it would be a minor addition to the style spec and easy to port to Native. It's broken in a minor way right now: images aren't correctly y-positioned through each zoom level. I know this is fixable, someone with more sleep or fewer cold symptoms could probably get it working quickly: the conversion from X/Y coords to "pseudo-meters" or whatever you call 3857 units is wrong in a way that's probably an off-by-one or something. Refs #965
Does it matter that the bbox parameter is constructed differently depending on which version of WMS we're talking to? |
I like the approach. We could drop support for older WMS versions since we're already making assumptions like CORS and EPSG3857. Let's fix the discrepancy in the calculations, and then maybe refactor so that the bbox code only executes if there's a bbox token present in the url. Also, I think we could do away with just |
We can avoid worrying about how to construct the bbox by having different tokens for the bounding edges, like |
@bhousel This is EPSG:3857 with units in (quasi)meters, not lat/lon degrees. And the (irritating) issue of BBOX parameter ordering between WMS version is for EPSG:4326, not EPSG:3857. So having a single {bbox-epsg-3857} works fine for me. |
Closing in favor of #2612 |
@bhousel, @indus I like your proposal as it is more in-line with the original proposal here #965. I assume If coordinates are swapped, it is easier (and more flexible) to swap tokens than lookup in the documentation for how BBOX parameter have been defined: not to speak about more general getUrl-like API for raster tile that would enable to call any URL with whatever parameter sequence. |
(these changes would be resubmitted against master if people think this is a decent idea, this is more of a proposal than a nearly-finished PR)
This adds a
{bbox-epsg-3857}
token to URL requests. This would letus support 3857-supporting CORS-supporting WMS servers in GL JS
with very little change - it would be a minor addition to the style
spec and easy to port to Native.
It's broken in a minor way right now: images aren't correctly
y-positioned through each zoom level. I know this is fixable,
someone with more sleep or fewer cold symptoms could probably get it
working quickly: the conversion from X/Y coords to "pseudo-meters"
or whatever you call 3857 units is wrong in a way that's probably
an off-by-one or something.
Example usage:
Refs #965