Closed Wentao-Kuang closed 2 months ago
We should remove metadata, sprite, glphys if not defined from style config. empty sprite or glphys will broken the maplire.
{ "version": 8, "id": "st_aerial", "name": "aerial", "sources": { "basemaps-aerial": { "tileSize": 256, "tiles": [ "[https://dev.basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=c01hzzbj62y83k27kw7pd89jsw1&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrcnYE9V7NUW5A8WmuM3FpWejcebdKmVDGzTMLXbMvmCSs2XouTFdCmeHCAfTLyzMmr3YxANL1" ], "type": "raster" }, "basemaps-terrian": { "tileSize": 256, "tiles": [ "https://dev.basemaps.linz.govt.nz/v1/tiles/elevation/WebMercatorQuad/{z}/{x}/{y}.png?api=c01hzzbj62y83k27kw7pd89jsw1&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrcnYE9V7NUW5A8WmuM3FpWejcebdKmVDGzTMLXbMvmCSs2XouTFdCmeHCAfTLyzMmr3YxANL1" ], "type": "raster-dem" } }, "layers": [ { "id": "basemaps-aerial", "source": "basemaps-aerial", "type": "raster" } ], "metadata": {}, "glyphs": "", "sprite": "" }
Only add these optional filed if defined in the getStyleJSON Api
If not applicable, provide explanation of why.
Motivation
We should remove metadata, sprite, glphys if not defined from style config. empty sprite or glphys will broken the maplire.
Modification
Only add these optional filed if defined in the getStyleJSON Api
Checklist
If not applicable, provide explanation of why.