You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the leaflet-tile-filter sample code in my React app, I get the following compile error: ''TypeError: Cannot read property 'classList' of undefined", which occurs in leaflet.tile-filter.js
Here is an image of the full error dump:
Attempted Fix
I commented out the code (lines 9 and 10 in the source code) to avoid the error, and this does allow my app to compile. However, I have a feeling that this breaks other functionality of leaflet.tile-filter, because the 'ndvi' filter is not showing up.
I also tried testing on the index.html file sample code in the node module, but I get a page that doesn't render the map.
Environment:
I'm using the latest version of Chrome on Windows, and I'm using React with Webpack.
I am using vanilla Leaflet, however, not react-leaflet.
As well, I have imported jquery and image-sequencer as dependencies.
Would you have any ideas as to why this error would be occurring, and how I might fix it?
Thank you for your help!
The text was updated successfully, but these errors were encountered:
Hi, thanks for posting the issue! Can you share any of your code so we can see what's going on? Indeed, this extra set of classes helps us track which tiles have been replaced with filtered tiles. So they are necessary. I'm not sure what is causing your tileLayer to be undefined, though! How are you setting this up?
Hi Public Lab team!
Problem
When I use the leaflet-tile-filter sample code in my React app, I get the following compile error: ''TypeError: Cannot read property 'classList' of undefined", which occurs in leaflet.tile-filter.js
Here is an image of the full error dump:
Attempted Fix
I commented out the code (lines 9 and 10 in the source code) to avoid the error, and this does allow my app to compile. However, I have a feeling that this breaks other functionality of leaflet.tile-filter, because the 'ndvi' filter is not showing up.
I also tried testing on the index.html file sample code in the node module, but I get a page that doesn't render the map.
Environment:
I'm using the latest version of Chrome on Windows, and I'm using React with Webpack.
I am using vanilla Leaflet, however, not react-leaflet.
As well, I have imported jquery and image-sequencer as dependencies.
Would you have any ideas as to why this error would be occurring, and how I might fix it?
Thank you for your help!
The text was updated successfully, but these errors were encountered: