I have a leaflet map as a view and I'd like to have a popup appear when the map is filtered. This would involve over-riding/adding to the default 'onclick' behaviour of leafletmap popups in Drupal. I am using your module code as a starting point but am relatively new to this and would be grateful of any pointers the community could give.

Typically between 1 and 15 map-points remain after the map-view is filtered.

I'm guessing that I could have a function like
"automatically deploy pop-up on map when number of map-points is less than 15"
or.
"Automatically deploy the pop-up when the number of map-points changes"

Any further hints appreciated.