-
Notifications
You must be signed in to change notification settings - Fork 64
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
Unexpected y tile values in request from Docker image #28
Comments
@bob-gray Can you please tell us more about the map service you are using for this example (if possible, include link to it). Some map services vary in the origin point of their y-values (bottom or top), which could cause us to be requesting different y values than are displayed in your browser. Also - what |
The service is a simple proof of concept. I created it by wrapping an .mbtiles db created by Tilemaker in a simple Node.js service using @mapbox/mbtiles. I'm not specifying the scheme in the browser, so it looks like it would be using the default "xyz" |
I've done a little research into xyz vs tms. It looks like this is the issue and it appears that the tile services is tms.
I tried to set the scheme in the browser and got an error that you can't set the scheme and use a URL for the style. I'm thinking that the browser is reading the scheme from the service (tms) and working correctly. |
@bob-gray using a simple style file, I was unable to reproduce this issue with either the CLI or the server version of
When I have it log out the tiles it is requesting, they match what I see requested in the browser (from basemap tiles) for the same location, e.g., Command line call:
API call (using HTTPIE):
When I do the same thing against the server running in the docker container, I get the same output image as above where I know the requests are correct. For the above tests, I get this image - which means that the tile requests are not failing: |
@bob-gray when I set scheme to "tms" in the above If I set it to Your service is Is it possible you have the scheme set to |
I'm using the same style file for both. The response says the scheme for the tileset is tms. This is what is stored in the .mbtiles db that was created by Tilemaker |
@bob-gray I wonder if the tileset itself is created as TMS (suggested by this thread), but that That is suggested here, where the Y coordinate is being flipped as part of getting the tile from the mbtiles file. Since I'm not sure why Mapbox GL JS appears to be ignoring the scheme in your tileJSON whereas the Mapbox GL Node (as used by As a simple test, what happens if you alter the value of |
@brendan-ward Yep. That did it. Thanks for the help! It's strange that Mapbox GL JS ignores the scheme. I don't understand how the mbtiles file works. If the data is created as TMS, I wonder why Any recommendation whether generating tiles ( |
Recommendations depend a lot on what you are trying to accomplish (DM me at [email protected]). I don't have any experience using For my work, where I'm often creating vector tilesets from CSV files of lat / long data or shapefiles, I use |
I'm trying out the docker image using
docker run --rm -p 8080:80 consbio/mbgl-renderer
When sending a request using values from a map that is successfully rendered using Mapbox GL JS in the browser, the service fails when making requests for tiles. It requests tiles outside the range of my tileset. The y values are different than the values requested by the browser and seem to be calculated incorrectly. I get similar results using either center or bounds.
width: 1920
height: 977
zoom: 14
bounds: -93.43098873048935,41.922703599964336,-93.3485912695486,41.95389258663502
In the browser the y values range from 6084-6086. In the mbgl-render container the y values range from 10297-10299.
Thanks
The text was updated successfully, but these errors were encountered: