mapbox / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
2.73k stars 432 forks source link

How to create a mbtitles with layer based on different features properties #863

Closed 2803media closed 4 years ago

2803media commented 4 years ago

I try to manage this for some time but can't get a way to make it working. The idea is to build a Mbtitles with multiple layers based a the properties inside the geojson.

For example if in my json i have the property name STATE with different state names I want to create an mbtitles with different layers based on the name of STATE.

Any idea easier than split the json into multi json files (one for each STATE) and then use tippecanoe?

e-n-f commented 4 years ago

There is no way to do it just from an attribute, but you can use "tippecanoe": { "layer": "whatever" } in the Feature to specify the layer name.

2803media commented 4 years ago

Thanks Eric, I'll dig this way ;)