stuartmatthews / leaflet-geotiff

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

require undefined in https://unpkg.com/geotiff@0.4.1/dist/main.js #19

Open kararsi-ayoub opened 6 years ago

kararsi-ayoub commented 6 years ago

Hello , i tried using the plugin with the links provided in the reademe.md file but i get an error : "ReferenceError: require is not defined" .

m-mohr commented 6 years ago

As you can see by the referenced link (https://unpkg.com/geotiff@0.4.1/dist/main.js) it is a problem in geotiff.js and not this library. Please raise your issue in this repository: https://github.com/geotiffjs/geotiff.js That said, we can't fix it.

lstillwe commented 5 years ago

Does any newer version of geotiff work with this plugin, that does not have the "ReferenceError: require is not defined" error? Thanks!

sgofferj commented 5 years ago

Apparently, the require function doesn't exist in browsers, so the geotiffjs only works in Node? Update: I opened an issue as support request with the geotiff.js library.

sgofferj commented 5 years ago

Found the solution: The documentation is faulty. Instead of including dist/main.js, dist/geotiff.browserify.js should be included. @stuartmatthews @m-mohr