The intention here is to determine the proper convention for adding multiple styling rules for a single layer in 'layers' list. My impression was such that multiple layer entries would mean a call to draw the whole layer multiple times which should be avoided. However, in cases such as the need to style both fill and stroke (lines) it appears the official recommendation is to add one layer with Fill type, and another layer with Line type. In this instance, will the engine draw the whole layer twice? Does that only happen when the type is repeated? Or rather, is it contingent on ID uniqueness?
This is what I initially imagined handling for an "else rule" and one with a filter would look like:
{
"source-layer" : "myLayer",
"type" : "fill",
"paint" : {
"fill-color" : "blue"
},
"id" : "myLayer",
"source" : "test"
},
{
"source-layer" : "myLayer",
"type": "fill",
"paint" : {
"fill-color" : "red"
},
"id" : "myLayer",
"source" : "test",
"filter" : [ "==", [ "get", "ATTRIBUTE" ], "colorMeRed" ]
},
Will this draw myLayer, then draw it again, overlapping?