-
-
Notifications
You must be signed in to change notification settings - Fork 825
Locally hosted tiles for benchmarks and debug pages #1552
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
Conversation
@HarelM @birkskyum @wipfli do you agree with this approach? should I continue with it? |
Bundle size report: Size Change: 0 B
ℹ️ View DetailsNo major changes |
I would prefer if we could avoid introducing new dependencies. Two options which come to mind is extract tiles into a repository (maybe have them in a zipfile) or use PMTiles... |
But other than that I think this is going in the right direction, thanks for working on this @xabbu42! |
I agree that this is probably not the preferred path forward. The fewer deps we have, the better, especially because we want to share testing as much as possible with the native project, as well as be able to use it in CI and on dev machines.
|
@wipfli Just so I understand: You would want to get rid of the tileserver part and the sqlite3 dependency by unpacking the tiles localy in the filesystem and just let the st handle serving the tiles? pmtiles or zip are only possible formats to download and unpack the tiles? |
Yes. We could store tiles in a normal folder structure a bit like in https://github.com/maplibre/demotiles. To make git stuff faster, we could store the tiles in a zip file and unpack that in the npm pre-install hook or something. But maybe we do not even need the zip, we might get away with just putting tiles in the directory... Cloning time is probably anyway dominated by the long commit history and not by the number of file... |
@nyurik I believe this changes are separate from automated testing, where this topic is already solved. Also, as far as I can tell, native has its own benchmarks completely separate from maplibre-gl-js. Are there any plans to integrate manual testing with debug pages and benchmarks between native and js? Also I'm not quite sure where Just comes into the picture. Can you elaborate? |
@wipfli I see two (possible) downsides to that approach.
|
I am a bit tempted to just run the benchmarks and use the debug pages a bit with some sort of network request logger and then put all the tilea that were requested into a folder. Somewhow that might not be that many tiles is my guess... |
Question about attribution: If we store OpenMapTiles data in MapLibre GL JS, do we have to mention it somewhere in the license or so? |
I would like to avoid adding more dependencies as well. |
@HarelM I stand by the downsides of static files I already mentioned. Probably there is a way to solve the second one though? @wipfli how would the commited tiles be updated? or would we just live with old maps? I generally would prefer not to include a copy of the data itself in the repo but to have a script to download it. This avoids the problem with attribution completely, allows us to use larger test data without bloating the repo and automatically ensures we have current data. |
I'm not sure I understand this thread anymore. |
Perhaps we are mixing too many different orthogonal questions here. As far as I see @klokan (tileserver-gl-lite) and @nyurik (Martin) suggested external tileservers as a dependency, where as @wipfli and @HarelM are in favor of a solution using static tile files. As nobody beside me considers implementing a minimalistic tileserver in maplibre-gl-js to reduce dependencies worthwhile, I will close this pull request. |
@xabbu42 thx, let me try to parse through those:
Given the above, I would recommend the |
Locally serve tiles from mbtiles file in a included dev server.
This is a first step to fix #198. I implemented a very minimalistic tileserver to reduce additional dependencies. This seems fine to me as long as the code remains short and the number of features low. If we want a more feature complete tileserver I would prefer to use an existing implementation as a dependency instead of reimplementing our own. For now I just added a copy of the demotiles, this should be replaced by a download script for more complex free tiles.
Todos
Launch Checklist