I've got a Tomcat server that is already successfully running Three.js and I'm currently trying to set up geotiff.js 3.0.5 on it the same way as I did Three.js:
In the test.html:
<script type="importmap">
{
"imports": {
"three": "https://...serverurl.../three/build/three.module.js",
"three/addons/": "https://...serverurl.../three/examples/jsm/",
"geotiff": "http://...serverurl.../geotiff/dist-browser/geotiff.js"
}
}
</script>
Import in the regular test.js:
import * as GEOTIFF from 'geotiff';
But when I do this:
const tiff = await GEOTIFF.fromURL(url)
Then there's an error:
Uncaught SyntaxError: The requested module 'http://...serverurl.../geotiff/dist-browser/geotiff.js' doesn't provide an export named: 'fromUrl'
With the suggested import found in the docs I'm getting the same error for this line:
import { fromUrl, fromArrayBuffer, fromBlob } from "geotiff";
The "dist-browser" folder contains two files: geotiff.js and geotiff.js.map. The latter mentions fromURL but the former is scrambled, so it's hard to see what's going on.
There are 4 folders in the .tgz file that I downloaded: dist-browser, dist-module, dist-node, src. I also tried to use the geotiff.js in "dist-module", which threw a new error ("Uncaught TypeError" for "@petamoriken/float16" in "dataview64.js", line 1 - which I didn't import, so no idea where that's coming from).
What version exactly do I have to use if I can't use Node.js to install geotiff.js and how do I correctly import it?
I've got a Tomcat server that is already successfully running Three.js and I'm currently trying to set up geotiff.js 3.0.5 on it the same way as I did Three.js:
In the
test.html:Import in the regular
test.js:But when I do this:
Then there's an error:
With the suggested import found in the docs I'm getting the same error for this line:
The "dist-browser" folder contains two files:
geotiff.jsandgeotiff.js.map. The latter mentionsfromURLbut the former is scrambled, so it's hard to see what's going on.There are 4 folders in the .tgz file that I downloaded: dist-browser, dist-module, dist-node, src. I also tried to use the
geotiff.jsin "dist-module", which threw a new error ("Uncaught TypeError" for "@petamoriken/float16" in "dataview64.js", line 1 - which I didn't import, so no idea where that's coming from).What version exactly do I have to use if I can't use Node.js to install geotiff.js and how do I correctly import it?