Closed okimiko closed 2 months ago
In my project at wifidb.net I use https://github.com/felt/tippecanoe to convert my geojson into mbtiles or pmtiles, then they can be served by tileserver directly. I just have a bash script like https://github.com/acalcutt/wifidb-tileserver-gl/blob/master/convert/convert.sh
It does make sense what you are saying as right now there is no handling for geojson files and no real place to put them.
I am off this week on vacation, but will look more at PRs next week
Added an inital PR, but I assume, that it may make sense to implement something, that works for every endpoint.
@acalcutt: Thanks for the hint, I haven't thought over mbtiles as geojson is supported in the style spec. Have a nice vacation!
Fixed in #1326 and release 4.13.2 (with some good improvements regarding parameter handling, thanks a lot) :)
I'm using the latest docker release (v4.12.0) and created a custom-style based on osm-liberty, which works fine so far in vector and raster view.
Then I integrated a geojson source and added style information for its content. In vector view everything is fine and it works like expected, but in raster view there is no image (grey-screen). The preview on the index page is emtpy, too.
Here the logs, there is no http return code, no size, no duration in error case but no other error:
And here the snippet of the style:
I started a bit try and error:
It did not work, too, so I started a bit code digging (serve_rendered.js):
I appended the code a bit and used my previously added volume and it worked, too. Here is my change:
I'm not sure, if this really clean (at least not portable, if Windows is in the room, but then the path would not match in any case). But in general it adds an option for local geojson rendering. May be adding an additional switch for "file://" would be a good idea, too, it may help someone who is using only the rendered endpoint.