unvt / charites

It is an application to style vector tiles easily
https://unvt.github.io/charites/
MIT License
54 stars 13 forks source link

initialize style.yml from tilejson URL #27

Closed JinIgarashi closed 3 years ago

JinIgarashi commented 3 years ago

It is draft pull request because it's still under development

It will generate layers from tilejson which is specified by --tilejson-urls optional parameter.

charites init style.yml --tilejson-urls https://raw.githubusercontent.com/mapbox/tilejson-spec/master/3.0.0/example/osm.json

It was successful for npm test, however an error is occurred when I tried to use CLI tool.

$ node --trace-warnings dist/cli.js init style.yml --tilejson-urls https://raw.githubusercontent.com/mapbox/tilejson-spec/master/3.0.0/example/osm.json
Error: connect ECONNREFUSED 127.0.0.1:80
JinIgarashi commented 3 years ago

fixed bugs of CLI mentioned in the above comment.

This PR implemented a part of https://github.com/unvt/charites/issues/20.

You can also specify multiple tilejson URLs by using comma (,). If vector_layers property is missing in tilejson, layers will not be inserted. Source will be created in style.yml.

JinIgarashi commented 3 years ago

@miya0001 Now I implemented --composite-layers option to initialize a single style.yaml. If you don't specify the option, it will generate layer configuration files separately.