I need to load a WFS service (points) in my Leaflet map.
I know how to load a WFS service in my map but I've to check dinamically the map current scale / extent because I've to limit the number of features I've to request to the server and to render on my map.
My service has a lot of points and I'd like to limit the visualization of my layer only when we are al level=18 of my basemap (OpenStreetMap).
Is there any way to check dinamically the map current extent / scale and so decide if invoke or not my WFS Service?
Any example?
Thank you very much in advance, any suggestion is appreciate!!!!
Cesare
I solved in this manner
and I've also a function invokeService() where I've ...
It's working now!