I have created a React application to display a Leaflet map, with a series of polygons over the top. The data source for the polygons is a GeoJSON file.
As part of the app, I am giving the user the ability to change the background colour of the polygons (by changing the feature's 'fillColor' property).
To enable this, I have converted the GeoJSON file to a Shapefile using QGIS, and loaded it into a 'spatial' table in MySQL. This now provides the ability to alter the fillColor property for each feature by its ID, via an API put request.
The issue I've got is that I want to render the map (including any fillColor changes) on the front end, but I'm struggling to work out (or find information on) how to do this.
Is there a way of using the MySQL table as the Leaflet map data source instead of using the GeoJSON file?