Closed schmidtk closed 1 year ago
When creating the layers list here: https://github.com/koopjs/FeatureServer/blob/878c38ffd3ec65870a22df0ee209f3015cf8866d/lib/layers-metadata.js#L10-L12
The create options specify layerId as a direct property of options. In the normalizeInput function, layerId is retrieved from req.params.layer which is not what we want given the above. https://github.com/koopjs/FeatureServer/blob/878c38ffd3ec65870a22df0ee209f3015cf8866d/lib/helpers/table-layer-metadata.js#L27-L32
create
layerId
options
normalizeInput
req.params.layer
This causes layerId to be undefined and each layer is assigned id: 0.
undefined
id: 0
When creating the layers list here: https://github.com/koopjs/FeatureServer/blob/878c38ffd3ec65870a22df0ee209f3015cf8866d/lib/layers-metadata.js#L10-L12
The
create
options specifylayerId
as a direct property ofoptions
. In thenormalizeInput
function,layerId
is retrieved fromreq.params.layer
which is not what we want given the above. https://github.com/koopjs/FeatureServer/blob/878c38ffd3ec65870a22df0ee209f3015cf8866d/lib/helpers/table-layer-metadata.js#L27-L32This causes
layerId
to beundefined
and each layer is assignedid: 0
.