-
Notifications
You must be signed in to change notification settings - Fork 25
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
Too Much Recursion #30
Comments
Can reproduce the error in Firefox. Chromium works with South Yorkshire (14,4 MB), but hangs with a larger file (older Berlin, 29,4 MB). I'm having some troubles debugging this in Firefox, and updating dependencies needs some work. Will look further into this. Don't know what your use case is, but for rendering on a map, splitting the data into vector tiles might help. |
Thanks for looking into it. This was just for an experiment which i've concluded successful enough (but continue to play with), so there's no rush on a fix :) |
The reason for this error is trying to execute Node.js-style callback code synchronously in the Browser. The recursive loop in visitNextBlock then leads the call stack to pile up. As a fix I added an asynchronous call in the arrayBufferReader. In addition, there is now a new reader for the HTML5 File API that uses async, sliced reading, see README and example/file.html on how to use it. Furthermore, you can already load a PBF file yourself with
Nice idea to tile into indexedDB! Would be great if this could be used with an existing renderer/map lib. My approach requires the Mapsplit commandline tool to generate PBF tiles. |
Cool, many thanks for this. I'll check it out :) |
Hi,
I've been playing with the PBF parser for reading OSM data into a (experimental) web app. However, reading large files results in a "too much recursion error"
This happens, for example, with the South Yorkshire PBF available here.
Is it possible to fix this, or is it an intrinsic problem with trying to read PBF in Javascript :)
The text was updated successfully, but these errors were encountered: