stuartmatthews / leaflet-geotiff

Leaflet plugin for displaying geoTIFF raster data
MIT License
174 stars 76 forks source link

Loading from unpkg main.js raises Uncaught ReferenceError: rquire is not defined. #34

Closed HughKelley closed 3 years ago

HughKelley commented 3 years ago

Loading the geotiff dependency per part 1 of the instructions

My understanding is that this error generally means a node.js file is being run in the browser.

I looked at the docs for geotiff, they recommend loading from a different cdn,

    <script  src="https://cdn.jsdelivr.net/npm/geotiff"></script>
    <script>
     console.log(GeoTIFF);
     // Note: GeoTIFF.Pool will not work
    </script>

That does not return an error, which makes me think that it may be a more reliable way to load the dependency.

Wanted to log in case it might help someone else or in case I'm misunderstanding something.

I think you can just close this.

thanks for working on this package!