-
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
tileSize in source option can not overwrite tilejson #8192
Comments
Yeah, I think it would be reasonable for explicit properties to take precedence over TileJSON, although it's arguable. Want to explore how a PR could look for the fix? |
I'm not using tilejson but seeing an issue with the 512 tileSize on a TMS source, please let me understand if I'm missing something or there's a more general bug in mapbox gl and the tileSize 512 setting is always ignored. I've configured a source just like in following example and mapbox is trying to load the tiles with X and Y coordinates which are exactly double of what is on the file system despite the "tileSize": 512 setting.
I've received the same raster image also exported with 256 tilesize, in fact the X and Y coordinates double on the file system and it loads perfectly with the following style source:
The strange thing is that If I change the tileSize setting to 512 on this last example, keeping the same (256) tiles url it still loads fine. |
@htrex Mapbox use 512 as base tileSize, which is 1 zoom offset compare to ordinary 256 raster tile services. So when you use I do not get understand what problems with @mourner I have notice many existing map services do not following slippy map tiling scheme, some start with zoom 0, other start with zoom 1. Shall we introduce a |
Closed by #8232 |
Suppose I want to add a raster source through a tilejson url:
However, this tilejson is not configured correctly. The actual tileSize is 512, but in tilejson is configured as 256. So I overwrite the tileSize like this:
The expected behavior is that I can load the tile service as 512 tileSize.
However, the code tells me I can't:
mapbox-gl-js/src/source/raster_tile_source.js
Lines 58 to 69 in 88a0526
As the code shows that tilejson always loads after Source initialization. So if tilejson have
tileSize
key, it will always overwrite source option.I think
scheme
option will face same issue.The text was updated successfully, but these errors were encountered: