Closed laszbalo closed 5 years ago
Hi @laszbalo,
I don't believe so. The API middleware has several stages, one of which (geojsonify), runs before the assignLabels middlelware and creates the top level properties country_a
(and others) for use in the final response object. The labels are created using those.
Is there a particular issue or concern you're looking to address?
Thanks for the info. Not really, I am just trying to use the pelias-whosonfirst
importer and the pelias-labels
projects to generate labels in my own code, but I missed the fact that the pelias documents are needed post-processing before I can feed them into pelias-labels
.
Should one here not pass in record.parent.country_a? https://github.com/pelias/labels/blob/master/labelGenerator.js#L148
Similarily, when building the admin part, should it not be record.parent? https://github.com/pelias/labels/blob/master/labelGenerator.js#L153