Skip to content

Commit

Permalink
fix: add id back to geojson props (#386)
Browse files Browse the repository at this point in the history
* fix: add id back to geojson props
  • Loading branch information
vnugent committed Jan 20, 2024
1 parent 494c830 commit 9518cf1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/db/utils/jobs/CragGeojson/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ async function exportLeafCrags (): Promise<void> {

const ancestorArray = ancestors.split(',')
const pointFeature = point(doc.metadata.lnglat.coordinates, {
id: metadata.area_id.toUUID().toString(),
name: areaName,
type: 'crag',
content,
Expand Down Expand Up @@ -122,6 +123,7 @@ async function exportCragGroups (): Promise<void> {
for await (const doc of rs) {
const polygonFeature = feature(doc.polygon, {
type: 'crag-group',
id: doc.uuid.toUUID().toString(),
name: doc.name,
children: doc.childAreaList.map(({ uuid, name, leftRightIndex }) => (
{ id: uuid.toUUID().toString(), name, lr: leftRightIndex }))
Expand Down

0 comments on commit 9518cf1

Please sign in to comment.