Comments (7)
I'm not sure this change was intentional, I would consider finding the last version this worked and find the relevant PR to see what might have changed and what is the description in the PR.
from maplibre-gl-js.
i believe it was this PR https://github.com/maplibre/maplibre-gl-js/pull/3428/files
if i remove the
if (data.byteLength === 0) {
return createImageBitmap(new ImageData(1, 1));
}
it works like it used to, (though spams the console with this err)
DOMException: The source image could not be decoded.
from maplibre-gl-js.
This is basically intentional, if the tile server return 204 it means that it got the request for a tile, and returned an empty tile, which will be displayed in the map as empty.
If you want to get the previous behavior you'd need to configure the tile server to return 404 - which will tell maplibre that this tile doesn't exists and there's a need to overzoom.
I hope this makes sense to you.
from maplibre-gl-js.
I think the discussion in #161 (comment) and following is relevant here. So the original reasoning from mapbox was to use 204 for this use-case and not 404, because 404 triggers console errors.
from maplibre-gl-js.
that makes sense. It would be ideal if there were a toggle of some sort to have overzoom without having the 404 console spam, but it's workable how it is
from maplibre-gl-js.
Just to make sure I understand the behavior of MapLibre GL JS correctly:
Say I global satellite raster tiles up to zoom 10 and then I have higher-resolution satellite raster tiles for Switzerland up to zoom 16. If I want to mix the two together in a single raster tile source I can just say the maxzoom is 16 for the overall source and for tiles outside of Switzerland for example at z14 I could just return a 404 status code and MapLibre GL JS would overzoom the z10 tiles for me?
from maplibre-gl-js.
Thats exactly correct. The only downside of that setup is that browsers generate console messages for 404 subrequests automatically. So that setup would generate a lot of those messages and make it difficult to find 404 which are not expected and problematic among all the expected 404 messages. Thats why mapbox considered 204 as an alternative for the same behavior in the linked discussion. I never tested what their software (or maplibre-native) does in that situation though.
from maplibre-gl-js.
Related Issues (20)
- Render to user-supplied framebuffer HOT 4
- {fontstack} server requests: one or several when multiple fonts are specified? HOT 1
- Filter for BaseHeight and Height Comparison in Fill Extrusion Layer Causes Error HOT 5
- Simple geojson fill polygon renders incorrectly when spanning multiple tiles HOT 9
- Disable map rotation example allows user to rotate camera via keyboard HOT 2
- Fog in 2D HOT 1
- TypeError: Cannot read properties of undefined (reading 'sky') HOT 17
- Polygon Fill layer incorrectly displayed showing weird clipping HOT 4
- Lagging when zooming in/out of the map (especially with free rolling mouse wheel) HOT 7
- Performance issue on large FeatureCollection GeoJSON source updates HOT 6
- Valid Polygon with Hole renders with clipping Artifacts HOT 11
- Add canvas animation layer to display: "Cannot read properties of undefined (reading 'loaded')" HOT 5
- The map still adds the hash after calling map.remove() HOT 1
- Jump at the end of a pan when both terrain and transformCameraUpdate are used HOT 4
- `upcase` expression with Greek lowercase letters with accents does not remove accents HOT 4
- `style.loadURL` prints an error when the request is aborted HOT 4
- Issue with style.json and tiles vector URL HOT 1
- How to use csp, add protocol and PMtiles HOT 3
- PR 4071 resulted ~100ms perf regression (time to first idle) HOT 5
- Street view camera HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maplibre-gl-js.