-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
tile-avoid-edges test failure #479
Comments
Another interesting note. when I test what the user posted with my own style by going to I get this image, which you can see the background color and hillshade I have in my style cover the whole image, just the openmaptiles layers seem trimmed off |
For future research into this issue: The logging events for ...
... comes from the C++ logic here: idealTiles = util::tileCover(parameters.transformState, idealZoom, tileZoom);
if (parameters.mode == MapMode::Tile && type != SourceType::Raster && type != SourceType::RasterDEM &&
idealTiles.size() > 1) {
mbgl::Log::Warning(mbgl::Event::General,
"Provided camera options returned %zu tiles, only %s is taken in Tile mode.",
idealTiles.size(),
util::toString(idealTiles[0]).c_str());
idealTiles = {idealTiles[0]};
} |
Looking at mapbox/mapbox-gl-native@9ceb619 , that was actually the last commit made to that file on Apr 24, 2020 |
@acalcutt , so would it fix the issue to be in another mode than tile mode, so this "parameters.mode == MapMode::Tile" becomes false? Is there still a problem in the library, or can you adjust the configuration you have to resolve it? |
I just tested turning off tile mode on my server and going to https://tiles.wifidb.net/styles/WDB_OSM/static/13.389587,52.515359,12/500x500.png And yes, it seems to look fine in the default mode Looks like this in static mode (I put back the tile mode btw because I need it for the label clipping issue) |
Awesome! Can this issue be closed? |
not really, it's still a tile mode bug I think. I can research in the tileserver if I can switch the mode in a static image request, but that wasn't needed before with the last mapbox release. |
Also, the test I noted is still not right. so I would say it was expected to work like that at one point xvfb-run -a ./build/mbgl-render-test-runner --manifestPath metrics/macos-xcode11-release-style.json --filter "render-tests/map-mode/tile-avoid-edges" |
BTW, I know this was marked as node, but I think the test shows this isn't just a node issue. The test is on the linux build test runner. |
Any opinions on making PR to remove mapbox/mapbox-gl-native@9ceb619 Does this block of code make sense? The image generated by this test obviously has 4 tiles, so why would it be limited to 1? If you were centered on a tile and the view didn't included any of the other tiles it may make sense..., but here, where the view does included multiple tiles, does it make sense? to me not really. I looked a bit into the tileserver code and changing the mode for static images, but keeping it tile mode for everything else would be difficult since it sets up a pool of renders when it loads and uses them later when the pages are requested. I couldn't see a way to switch tile modes unless I set up static renderers up front, which would add a lot of duplicate code. Unfortuanly tile mode is needed for everything but static images, so it can't just be turned off |
Removing the code does indeed break the rendering in the iOS test app Edit: The previous statement is wrong, no way to strike out. See updated comment at bottom of issue.. But we may look at how the Node static path gets into this C++ code. The code says, "If the This makes the entry point from TileServer-GL a bit difficult, as we would want to convert a vector ( idealTiles = util::tileCover(parameters.transformState, idealZoom, tileZoom);
// my reformatting for clarity
if (parameters.mode == MapMode::Tile &&
type != SourceType::Raster &&
type != SourceType::RasterDEM &&
idealTiles.size() > 1) {
// continue |
I guess it not affecting Raster and RasterDEM explains why my hillshade and color raster still covers the entire image in this test https://user-images.githubusercontent.com/3792408/190528875-38a02b33-54e1-428c-8471-be1df367b1e8.png |
Question @roblabs you mention this breaking the iOS test app. Is the actual app broken or are the render tests just failing? I notice in my fork where I made this change, the macos render tests end in "Process completed with exit code 1.", however the amount of failed tests and warning has not changed. for example, In the latest run, it got this
But in a previous run that worked, it got the same number of errors.
Strange that the first one, the one after removing that block, gets the same errors but fails at the end |
@acalcutt — I took another look at this today, and I was wrong, rendering is not broken as I mentioned in #479 (comment). I had the wrong lines commented out in my smoke test. I think your analysis and testing criteria is correct. Since the change mapbox/mapbox-gl-native@9ceb619 is related to macOS, your approach to rendering tests in macOS is the right way to go. We should also review all camera tests across all platforms (QT, macOS, Linux, Android, iOS) to verify nothing else is broken. It is possible that the TileServer GL Static path is one of the best and most flexible camera tests we have among all platforms. |
I'm still confused why removing that block causes a rendering test "Process completed with exit code 1" in my workflow. when i try the render test on linux it ends right with exit code 0. I tested putting it back and the workflow succeeds. strange. trying to set up an old mac laptop I have collecting dust to see if i can run the test there. |
This reverts commit 9ceb619. for maplibre#479 . If the tile returned is off center, this causes vector layers to be missing on the tiles that were not included
For what it's worth, Tile mode is used in combination with when you set your camera to the center of a single XYZ tile. It's primarily used to render individual tiles as images for use elsewhere (e.g., server-side for use in leaflet). |
I've re-opened this due to my testing of tileserver issue maptiler/tileserver-gl#649 . While it isn't 100% the same, it does get the same error as above, which led me to this test in the first place.
In this new tileserver issue, I think the image is centered, but the TileMargin extends the width/height of the rendering by a certain amount of pixes on all sides. For example, in the test files the user provided, I focused on these two images However, with mapbox/mapbox-gl-native@9ceb619 revered it makes two images like this The parameters for the images, with tile mode look like this. TileMargin has increased rendering width/height by 20 (10x2)
|
I see @acalcutt. If I understand correctly, what you're doing can't be combined with TileMode (nor do I think it should), since TileMargin almost always implies you'll need more than one vector tile. |
(That being said, the label clipping is probably the key issue you're highlighting, and I think that is problematic. :) ) |
Without TileMargin, the images still look like the first example. and with tile mode not enabled, other types of labels have a clipping issue like #284 which was fixed by getting tile mode working again. |
I expected the fix for tile mode in #284 would have fixed this label issue, but it doesn't. the labels fixed in that issue are still fine. |
I am trying to track down this issue on my tileserver-gl fork acalcutt/tileserver-gl#5 . From what it looks like, it seems like only 1 of the 4 tiles is getting displayed.
I was looking through the render tests and I found this failed test that looks similar.
render-tests/map-mode/tile-avoid-edges
When the test runs, the result looks like this
however, it expects this
To Reproduce
Steps to reproduce the behavior:
1.) On Ubuntu/Debian, Follow the build steps at https://github.com/maplibre/maplibre-gl-native/tree/main/platform/linux
2.) xvfb-run -a ./build/mbgl-render-test-runner --manifestPath metrics/macos-xcode11-release-style.json --filter "render-tests/map-mode/tile-avoid-edges"
3.) Look at 'maplibre-gl-native/maplibre-gl-js/test/integration/render-tests/map-mode/tile-avoid-edges' generated actual image compared to expected. Also look at 'maplibre-gl-native-ac/metrics/macos-xcode11-release-style.html
4.) The console will also report a bunch of errors like the user reports "Provided camera options returned 4 tiles, only 13/2099/3045=>13 is taken in Tile mode"
Just one note, this test says it passes if i run it with "--manifestPath metrics/linux-clang8-release-style.json", but it still gets these errors and the results look the same.
Platform information (please complete the following information):
The text was updated successfully, but these errors were encountered: