-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use Loam in React #120
Comments
Hmm, I think you might be loading the WASM files incorrectly, based on the NetworkError. If you look in the Network inspector, you should see requests for
And all requests should receive a Are you using Create React App? If so, could you try following the instructions here: https://github.com/azavea/loam#create-react-app ? |
Hmm, can you try specifying Loam |
hey hi thanks for replaying , i have read your documentation i don't understand those instruction you mentioned [create-react-app] (https://github.com/azavea/loam#create-react-app) , if possible can you elaborate ,we are using react functional component and
|
Sure! You are correct, all those files are available in The reason they are not accessible in |
that was really helpful ,but what should copy in public file and how should i copy ,i know this kind of spoon feeding but i don't have much knowledge in this sort of thing ,i you could explain step by step may be or any documentation that would be great Thanks ! |
Here is a link to the Create-React-App documentation for the public folder: https://create-react-app.dev/docs/using-the-public-folder/#adding-assets-outside-of-the-module-system Maybe you could start by testing it with just an image. Try putting an image in the |
That error got resolved thanks, but i was not able to get proper GDALDataset i was referring this code he is using |
Yep, you're exactly right -- the interface was changed between the alpha version and 1.0. Now you can simply use |
Hmm, I'm not sure -- I would use version 1.1.2 or 1.2.0 and see if that helps. |
yep i guess 1.1.2 is better, and it worked for me ,and thanks for all the help and suggestion you had given to us, loam is such a great package gives a vast insight about how to work on geospatial data well done guys .! |
Great, glad you got it working! Is it all right if I close this issue? |
yeh sure ! |
Hey hi, i just i want to know that does loam compromise the image quality,
The out put of this above method will return imageUrl,Bounds,ImageBounds and Center so here image url is being overlayed on react-leaflet map for further implement, but the image is being generated by loam will have poor quality then its original (original image size can be around 200mb to 600mb .tif file) my question is there any way that loam can persist image original size as it is,do we have any work arounds here I have tried this below code to improve the image quality but no use ! |
Hi @syncthreads-sammith ! Could you open a new issue for this? But anyway, I think the issue may be that you are downscaling the image before reprojecting the thumbnail. Instead, try warping and generating the thumbnail at the same time by using the const newDataset = await dataset.warp([
... // Same as above
'-ts', '1000', '0',
]); |
Hello hi
i have react app i need to load .tif file in it that was my requirement after goggling i got loam npm package ,and i got working example in typescript here is linkand repo link i tried to clone same code logic in react, facing loam library error
import loam from "loam"
`function App() {
require('loam/lib/loam-worker.js');
require('gdal-js/gdal.js');
require('gdal-js/gdal.wasm');
require('gdal-js/gdal.data');
useEffect(()=>{
loam.initialize("/")
},[])
const ReadFile = (e) => {
const files = e.target.files
loam.open(files).then((dataset)=>{
console.log(dataset,"d")
}).catch((er)=>{
console.log(er,"er")
})
}
return `
above the simple code i have tried and throws error i have added screenshot this is about gdal i guess
and second error is about loam.open
where did i went wrong can you please tell how can i integrate loam in my project
i have
react v17+
"loam": "^1.2.0",
"gdal-js": "^2.2.0",
The text was updated successfully, but these errors were encountered: