iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.08k stars 293 forks source link

[Bug - Example] source_file_from_parsed_data examples broken #2207

Closed jailln closed 9 months ago

jailln commented 9 months ago

The example source_file_from_parsed_data.html is broken.

Your Environment

Context

Nothing is displayed and the following error is thrown:

View.js:10 Uncaught TypeError: Cannot read properties of undefined (reading 'source')
    at GlobeView.<anonymous> (source_file_from_parsed_data.html:99:67)
    at GlobeView.dispatchEvent (three.module.js:281:1)
    at GlobeView.fn (View.js:229:1)
    at GlobeView.dispatchEvent (three.module.js:281:1)
    at View._this._allLayersAreReadyCallback (View.js:220:1)
    at GlobeView.execFrameRequesters (View.js:775:1)
    at MainLoop._step5 (MainLoop.js:290:1)
    at MainLoop.js:169:1
ftoromanoff commented 9 months ago

I cannot reproduce this error. The exemple is working on my side... It might have been linked with a connection problem at the time you was testing.

jailln commented 9 months ago

Indeed it's working now. The error could be more explicit though, we could add a try/catch or a promise reject when the source is not available