We created a dataset, tileset, and style via Mapbox Studio
It was very simple with only one colored layer.
Then we used the REST API to add many layers.
For example, (reference see: https://www.mapbox.com/api-documentation/#update-a-style)
The style.json file has many new layers that were generated via a python script.
"layers": [
...
{"id": "bid_id-WPLNS", "source": "composite", "paint": {"fill-color": "rgba(62,129,54,0.4)"}, "source-layer": "Business_Improvement_Districts", "interactive": true, "filter": ["==", "bid_id", "WPLNS"], "layout": {"visibility": "visible"}, "type": "fill"},
{"id": "bid_id-WSTSH", "source": "composite", "paint": {"fill-color": "rgba(17,31,177,0.4)"}, "source-layer": "Business_Improvement_Districts", "interactive": true, "filter": ["==", "bid_id", "WSTSH"], "layout": {"visibility": "visible"}, "type": "fill"},
{"id": "bid_id-WSTSQ", "source": "composite", "paint": {"fill-color": "rgba(143,124,110,0.4)"}, "source-layer": "Business_Improvement_Districts", "interactive": true, "filter": ["==", "bid_id", "WSTSQ"], "layout": {"visibility": "visible"}, "type": "fill"},
...
then we issue a REST HTTP PATCH to update the style:
curl -X PATCH "https://api.mapbox.com/styles/v1/ryozzopanodex/cistmnflb002l2woxcfbgyl3m?access_token=WRITE-TOKEN-HERE" --data @style.json --header "Content-Type:application/json"
For the result:
see https://city.tidalforce.org/bid
Question WHY when I go to Mapbox Studio and edit the style, do I NOT see the REST API created layers?
I only see the original layers that were created in Studio. If I edit and save, it appears that all the REST API created layers would be overwritten.
Please let us know if there is a way to edit the new layers via Mapbox Studio (which we love!)