diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index 8f6abf3bc..1821a66bd 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -917,6 +917,9 @@ void StyleParser::parseRender(JSVal value, std::shared_ptr &layer) { } parseRenderProperty(value, render.translate_anchor, "text-translate-anchor", parseTranslateAnchorType); } break; + default: + // There are no render properties for these layer types. + break; } } diff --git a/test/fixtures/styles/0.style.json b/test/fixtures/styles/0.style.json index d5994b82c..c37774b66 100644 --- a/test/fixtures/styles/0.style.json +++ b/test/fixtures/styles/0.style.json @@ -11,9 +11,7 @@ "layers": [ { "id": "background", - "render": { - "type": "background" - }, + "type": "background", "style": { "background-color": "red" } @@ -22,9 +20,7 @@ "id": "water", "source": "mapbox", "source-layer": "water", - "render": { - "type": "fill" - }, + "type": "fill", "style": { "fill-color": "blue", "fill-antialias": false