-
Notifications
You must be signed in to change notification settings - Fork 6
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
Question: How do I use GeoTIFFTileSource for a TIFF Web Viewer in React? #6
Comments
Right now the library is set up to be used mainly by adding it via a |
For what it's worth, I've looked PR #5 and it seems to work exactly as advertised, quite well for React. I suggest merging that PR and pushing a package to npm. |
@swamidass glad it's helped! |
Also @usagibear , keep in mind that OpenSeadragon (and GeoTIFFTileSource) are client only javascript, that assume there is a window object and other annoying (and frankly unnecessary) issues. That's the fault of OpenSeadragon, and is not likely to be changed anytime soon. But it means if you are using any sort of server-side rendering or references to these packages, then your react app will fail. You have to make sure OpenSeadragon and GeoTIFFTileSource are bundled and loaded client only. That's usually acheivable in any framework, but they all have different ways of doing it. And it also means you'll need to make a custom component to sit in the react tree to which openseadragon can be bound. |
I am new to web development and want to understand how to use this plugin to display TIFF files in my frontend react project.
I know I can support OpenSeadragon in React but do not understand how to integrate this plugin specifically to support the viewer. Other OpenSeadragon packages come as npm modules which I install and include in my project.
Based on the demo, it looks like I would be able to create a react component with just GeoTiffTileSource.js after downloading the inital release but I get many errors related to webpack and issues with my OpenSeadragon and GeoTiff.js packages.
Do you have any suggestions or other documentation? Thanks!
The text was updated successfully, but these errors were encountered: