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] GPX to 3D objects broken #2206

Closed jailln closed 9 months ago

jailln commented 9 months ago

The example source_file_gpx_3d.html is broken.

Your Environment

Context

The example source_file_gpx_3d.html is broken: the GPX are not displayed and the following error is thrown:

View.js:10 Uncaught ReferenceError: style is not defined
    at GlobeView.<anonymous> (source_file_gpx_3d.html:86:56)
    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

Style.js:160 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'pattern')
    at Object.get [as pattern] (Style.js:160:1)
    at new Style (Style.js:522:1)
    at new Feature (Feature.js:292:1)
    at FeatureCollection.requestFeature (Feature.js:562:1)
    at FeatureCollection.requestFeatureByType (Feature.js:578:1)
    at jsonFeatureToFeature (GeoJsonParser.js:168:1)
    at jsonFeaturesToFeatures (GeoJsonParser.js:197:1)
    at Object.parse (GeoJsonParser.js:244:1)
    at Object.parse (GpxParser.js:25:25)
    at source_file_gpx_3d.html:68:51
ftoromanoff commented 9 months ago

If I'm not mistaken, this Issue was already raised (issue #2188) and closed as it has been solved with PR #2187. I tested the exemple on the current master and it is working but the bug is present on itowns-project (the last release).

jailln commented 9 months ago

ok my bad, well observed