Closed apal21 closed 5 years ago
You must set a unique key value on your vector layer. This is not documented on react-leaflet-vectorgrid
but it is on react-leaflet.
As example, in my case I managed it like this:
const provinceKey = 'province_' + regionFilter + provinceFilter + departmentFilter;
const departmentkey = 'department_' + regionFilter + provinceFilter + departmentFilter;
...
return(
<VectorGrid key={provinceKey} {...provincesOptions} />
<VectorGrid key={departmentkey} {...departementsOptions} />
)
Thank you for the response. I'll try this and let you know in this thread.
Thank you @mecmartini. It is working properly. Closing this issue.
I'm using this library to load a GeoJSON file but I'm changing the opacity using redux. For the first time, it is loading the proper opacity but not updating it after dispatching the actions to update props.
Currently, to make this thing work, I added this code but it is a bit laggy.
I think there should be a way to make this work properly.