Closed yuiseki closed 2 years ago
@yuiseki Thank you for your pull request.
@hfu @naogify What do you think this feature? I assume it is out of scopes of charites
to have a feature distributing tiles. There are serveral useful servers to distribute from mbtiles. For instance, mbtiles-server, mbtileserver, tileserver-gl can be used together with charites
.
However, it is still necessary to fix https://github.com/unvt/charites/issues/73 issue to be able to change default port of charites
in order to use other tile server at the same time. Maybe we can include #73 in v1.0.0.
Or, another option can be to utilise naru. If charites
will be introduced in naru
, it can provide all in one environment to create tiles with style.json.
Many thanks for the pull request and the mention. I have a few comments:
Oh, by the way I love using budo when hosting static files.
@yuiseki Thanks for the PR request!
@JinIgarashi @hfu
I also think that serving tiles is outside the scope of charites
role.
I think the use case listed below could be covered by a tool that hosts tiles locally, such as tileserver-gl or budo.
if you have a poor connection or are cut off from the Internet.
But for using those tools, especially tileserver-gl, I agree that we need to fix #73.
Hi everyone.
Thanks to careful comments for my pull request! It was a pleasure to hear everyone's opinion.
Honestly, I also think maybe serving tiles is out of scope of charites.
And I also agree the Do one thing
concept of UNIX philosophy.
I was wondering if perhaps this change might be needed other one, But after listening to everyone's opinions, I've reconsidered that this change is not necessary for charites.
So, now I decide to close this pull request.
I'd like to find another way to resolve #73.
Thank you everyone so much. See you in another pull request!
Description
Add capability to serve additional static files in the local directory for charites.
That means charites gets capability to serve tilesets itself if tiles has split as
/{z}/{x}/{y}/*.pbf
style in the local directory.This pull request possibly related to issue #73
Why
Currently charites has no capability to serve any tilesets itself. So charites require another server that serving some tilesets.
This can be a problem if you have a poor connection or are cut off from the Internet. I would like to be able to edit map styles without having to set up another server.
In addition, this can turn charites into a complete map server on its own.
Example
This pull request add capability to serve vector tile tilesets in the local directory.
Create vector tile to
./docs/zxy/{z}/{x}/{y}/*.pbf
Write or generate TileJSON to
docs/tiles.json
like belowstyle.yml
like belowcharites serve style.yml --local-dir docs
Open http://localhost:8080/ without connection to Internet. That will works.
Type of Pull Request
Verify the followings
main
branchnpm run build
npm run lint
charites help
globallyRefer to CONTRIBUTING.MD for more details.