GeoTIFF / georaster-layer-for-leaflet-example

Simple Example of GeoRasterLayer for Leaflet
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
85 stars 26 forks source link

Example is not working proj4 error #3

Closed zaakzaku closed 4 years ago

zaakzaku commented 4 years ago

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

DanielJDufour commented 4 years ago

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! :-)