How do you update a WMS in a LeafletJS Map?
Using a simple text box and submit button, as well as a variable to hold a CQL filter (SQL query text) I've been able to update the CQL filter value on the WMS layer but cannot figure out how to refresh the WMS image.
The text box simply takes a number, and appends it to a text value to create a simple CQL filter (ex: schnum = 450)
The CQL filter works in the Geoserver Openlayers preview, and serveral methods to test have shown it to work as well.
The problem is one of two things happens depending on the methods I've tried:
- a new point is added but the old one is not removed
- the basemap disappears
I've created a JSFiddle* to hopefully demonstrate this simple example: https://jsfiddle.net/dpsspatial/fqa4y1cd/1/
*NOTE: for some reason the script to update the SQL filter - set_sql() - doesn't seem to be recognized in the JSFiddle though it works locally.