-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Quadkey tokens in tile URL templates, limited WMS support #5628
Conversation
The WMS test is failing due to what appears to be a double rounding discrepancy. (Formatting floats has long been a painful topic in gl-native: #5054.) Does it matter that (x0, y0, z1) produces:
instead of the GL JS expected value of:
/cc @kkaefer |
@@ -55,6 +89,8 @@ Resource Resource::tile(const std::string& urlTemplate, | |||
int8_t z, | |||
Necessity necessity) { | |||
bool supportsRatio = urlTemplate.find("{ratio}") != std::string::npos; | |||
auto quadKey = getQuadKey(x, y, z); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move getQuadKey
and getTileBBox
into the lambda conditionals, so they are only called if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Fixed.
dbb7403
to
d1cf19d
Compare
Going to assume the discrepancy doesn’t matter because these are projected meters. If anyone has a problem with gl-native being a nanometer off gl-js in both directions, we can address that as tail work. |
Added a style to the macosapp resource bundle that can be used to test WMS support. To use it, zoom in to somewhere in New Jersey, then go to View ‣ Custom Style and enter “wms.json”.
@1ec5 given that these units are Spherical Mercator meters, the slight discrepancy doesn't matter, since it's just 1 nanometer at the equator. |
Ported mapbox/mapbox-gl-js#2805 and mapbox/mapbox-gl-js@0877cac to support quadkey tokens in tile URL templates.
Ported mapbox/mapbox-gl-js#2612 (comment) along with the necessary parts of mapbox/whoots-js@f2ca0ca for limited WMS scheme support. Added a local style to macosapp that you can use to debug WMS support in the macOS SDK: zoom in to New Jersey, then go to View ‣ Custom Style and enter
wms.json
.Fixes #822 and fixes #5485.
/cc @lucaswoj @tmcw @bhousel