GeoTIFF/georaster-layer-for-leaflet-example

Example is not working proj4 error

zaakzaku opened this issue · 1 comments

initializing GeoTIFFLayer TypeError: proj4 is not a function
i'm using reactJS

Hello, @zaakzaku . Thank you for catching this! We should create a simple ReactJS example of using this library.

Would you happen to be able to provide some of your code?

Basically, the issue seems to be that proj4 cannot be found in the global scope. I believe if you run something like this, it should work.

const proj4 = require("proj4");

class SomeComponent extends React.Component {

Thanks for catching this and let me know if this solution doesn't work! :-)