hybrid jpg/png also generates google maps preview
When using the flag:
-f hybrid jpg png8a
It should also create an index.html file for previewing the files. A simple "If png doesn't exist, look for .jpg" in the html file should suffice.
Edge tiles will still be png (due transparency) so display a background map.
Hello Rowan,
We have changed the hybrid output format of the tiles to be able to use viewers, the files are without an extension, as each modern browser is able to display images based on the file headers and do not requires file extension.
You can generate hybrid tiles with viewers using the latest MapTiler 8.0+
-
AdminMapTiler Team (Admin, MapTiler) commented
The "if png doesn't exist" is problematic on client side in the web.
In JavaScript you can only test "Not found 404 error" on an failed request and try afterwards a new request for a different tile extension. But this still means the maps appear slow and there will be thousands of error messages on the hosting logs.
To make this behaviour in a default viewer is very bad practice - that's why we did not include it.A proper solution is to set redirects on the server side and serve the tiles on URLs without extension. This way JavaScript requests only once and server directly responds. Extension is not required in the URL the MIME is available and browser can display the image just fine.
It sounds to me that the request is not that good idea to implement now. We would also need to add the handling code to all viewers (Google Maps API, Leaflet, OpenLayers, ...).
Hybrid on mercator tiles is an advanced option for advanced users on command line and these users should better set the server side redirects, instead of applying client side hacks which are degrading performance.