How to properly change a loaded KML in react-leaflet-kml

59 views Asked by At

I am using react-leaflet-kml and the functionality I am trying to make is a list of buttons corresponding to a KML file, which will make the map load/render that KML.

Currently, the buttons simply change a useState containing the kml file which is used in <ReactLeafletKml kml={kml} />

This works the first time, when there wasn't a loaded KML file before, but not when I want to switch to another.

How would I make this work?

0

There are 0 answers