Closed tbroyer closed 8 years ago
One solution could be to use url.resolve(from, to)
from the url npm package in order to allow the computation of absolute urls relative to the metadata json url. Is that the correct way to proceed ?
SGTM
Looks like a blocker for release. @mbredif can you implement your solution ?
@tbroyer, could you please rebundle the itowns.js to check that http://itowns.github.io/v1demo.html now works with the fix I have just pushed? thanks
Done, and it indeed fixes it :raised_hands:
Also added a script to make it easy for anyone to do it (8c16c0b25ebaa668c300f7da043cab95f1b1c90e) and updated the website to use v1demo.html back.
This breaks the demo at http://itowns.github.io/v1demo.html which tries to load all images from
http://itowns.github.io/images/...
instead ofhttp://itowns.github.io/itowns-sample-data/images/...
(orhttp://itowns.github.io/itowns-sample-data-small/images/...
).Hopefully this is just an issue with the demo's configuration, but I suspect a bug (or actually some expectations) in the code.
For now, http://itowns.github.io/ links to the demo at https://itowns.github.io/itowns-sample-data/ to workaround the problem (where relative links work)