Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stopgag for empty vt #2

Open
brunosan opened this issue Nov 2, 2014 · 1 comment
Open

Fix stopgag for empty vt #2

brunosan opened this issue Nov 2, 2014 · 1 comment
Labels

Comments

@brunosan
Copy link
Owner

brunosan commented Nov 2, 2014

Bug on
./live.js 16/34823/32358

Which yields:

/mnt/data/tiles/live.js:68
    var data = output_vt.toGeoJSON(0);
                         ^
TypeError: Zero-based layer index '0' not valid, no layers found in map
    at /mnt/data/tiles/live.js:68:26
    at Gunzip.onEnd (zlib.js:166:5)
    at Gunzip.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

Current stopgag is to catch the error https://github.com/brunosan/osm-tracing-candidates/blob/master/live.js#L75

@brunosan brunosan added the bug label Nov 2, 2014
@brunosan
Copy link
Owner Author

brunosan commented Nov 3, 2014

Solution can be to add a check with

output_vt.names().length==0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant