This PR includes is a small refactor to simplify the rendering of layer info.
Moved calculation of extent and the geometryType lookup into the renderLayer, as this pair were always being executed before it and then passed into renderLayer
removed geometryType from the layer.json template. This value either comes from provider metadata or is determined by feature data, so no reason to have it in the source template
removed a series of unnecessary conditional checks in renderLayer; checks were for properties on an object constructed from the layer.json template. We know those properties are there - they are part of the template and under test. No reason to check.
refactored the isTable and layersInfo to make more readable.
This PR includes is a small refactor to simplify the rendering of layer info.
Moved calculation of
extent
and thegeometryType
lookup into therenderLayer
, as this pair were always being executed before it and then passed intorenderLayer
removed
geometryType
from thelayer.json
template. This value either comes from provider metadata or is determined by feature data, so no reason to have it in the source templateremoved a series of unnecessary conditional checks in
renderLayer
; checks were for properties on an object constructed from thelayer.json
template. We know those properties are there - they are part of the template and under test. No reason to check.refactored the
isTable
andlayersInfo
to make more readable.