Skip to content

Commit

Permalink
changed line id calculation in decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
mk30 committed Nov 16, 2020
1 parent c5fc416 commit 26d399d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (buffers) {
var plen = varint.decode(buf, offset) //pcount
offset+=varint.decode.bytes
sizes.line.types+=plen*2+2
sizes.line.ids+=plen*4+4
sizes.line.ids+=plen*2+2
sizes.line.positions+=plen*4+4
sizes.line.normals+=plen*4+4
}
Expand Down Expand Up @@ -58,7 +58,8 @@ module.exports = function (buffers) {
},
area: {
types: new Float32Array(sizes.area.types),
ids: new Float32Array(sizes.area.ids),
//ids: new Float32Array(sizes.area.ids),
ids: Array(sizes.area.ids.length).fill(0),
positions: new Float32Array(sizes.area.positions),
cells: new Uint32Array(sizes.area.cells),
labels: {}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"earcut": "^2.2.1",
"osm-is-area": "^1.0.0",
"osm-is-area": "^1.0.4",
"polyline-normals": "^2.0.2",
"split2": "^3.1.1",
"varint": "^5.0.0",
Expand Down

0 comments on commit 26d399d

Please sign in to comment.