Support for multi-parents ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
I was working on this project and I saw this message :
https://github.com/pelias/model/blob/37c4330028dad260038ab05befb81f119f24a67a/Document.js#L345-L368
I thought it was a pretty cool feature but when I saw this piece of code I thought it wasn't really going to work ...
https://github.com/pelias/model/blob/37c4330028dad260038ab05befb81f119f24a67a/Document.js#L321-L332
This does not really work as expected. For example in this example, the second London and LD will not be added and this can be an wired 🤔. (osm:locality:4004 with no name)
var doc = new Document( 'geoname', 'venue', 1003 )
.setCentroid({ lon: 0.5, lat: 50.1 })
.addParent( 'locality', 'London', '3003', 'LD', 'whosonfirst' )
.addParent( 'locality', 'London', '4004', 'LD', 'osm' )
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked sections of Document.js, especially the parent-handling code around lines 321–332 and the referenced message around lines 345–368. Reproduce the provided addParent example and inspect why the second locality is omitted; done means both London parents, including osm:locality:4004, are retained as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100