anoved/gpxtruder

iOS 8 display error

Closed this issue · 4 comments

Preview display error in Mobile Safari (iOS 8). Note NaN values in SCAD code view too.

The error is occuring in the Vector3D constructor. The bigger picture is that the problem occurs in the openjscad .setJsCad() method. Basemap display works. Remix code is being inserted successfully.

Actually, since elevation Z coordinates appear as NaN in the remix code, the Vector3D constructor is probably choking on those non-numeric values. The root problem must occur earlier, in my code.

22b2091 confirms getElementsByTagName('ele')[0].innerHTML is returning undefined for pt elevation. (parseFloat(undefined) is NaN)

Fixed as of c04f0ff; Mobile Safari seems to have an issue using .innerHTML to get XML node values. Using .textContent instead.