Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upid attribute is not set if it is 0 #1877
Comments
|
Thanks for the bug report @strech345 |
|
If this is still an open issue, I would like to tackle it as it seems like a good first contribution to this project. |
|
I investigated this issue, and it's solved in 6.2.0-alpha.1. To test, I added an id of 0 to the linestring used in the unit tests. Here's the created feature object with the id attached: {
type: 'Feature',
id: 0,
properties: { name: 'test line' },
geometry: { type: 'LineString', coordinates: [ [Array], [Array] ] }
}If this needs more work, I can be involved :) |
|
This looks good. Just for reference, here is the section of the GeoJSON spec that backs this up: https://tools.ietf.org/html/rfc7946#section-3.2
|
|
@morganherlocker If the bug exists in the latest shipped released but is fixed in the current master, should the issue be closed? Or should it be fixed in a patch version? If there needs to be a fix in a patch, I would be able to do so and update the tests for it, just would appreciate some direction :) |
test with
turf.lineString(<coords>,{},{id:0})on
v.5.1.6if id is
0the id field is missing