leaflet_dynamic_table
A Drupal module that provides a dynamic attachment display for Leaflet Map Views that updates based on the map viewport.
Features
## Description
This module extends the Leaflet Views module by adding a new display type called "Leaflet Dynamic Attachment". When attached to a Leaflet map display, this attachment automatically updates to show only the items currently visible within the map viewport.
As users pan and zoom the map, the attachment table dynamically refreshes via AJAX to display only the entities whose markers are within the visible bounds.
NOTE: This attachment automatically hides the parent view's pager and replaces it with infinite scroll on the attachment table. The parent view's item limit is removed on initial page load so all markers appear on the map. Exposed filter submissions will update both the map markers and the attachment table.
## Features
- Dynamic filtering based on map viewport bounds
- Infinite scroll with configurable batch size (default: 25 items per page)
- Marker-click row highlighting — clicking a map marker highlights and scrolls to the corresponding table row
- Customizable item count message with @showing/@total tokens
- Configurable highlight color, debounce delay, and update triggers (zoom, pan, or both)
- Clean Views UI integration with unnecessary options hidden
- Proper access control and input validation
- Works with any entity type that has geographic coordinates
## Requirements
- Drupal 10.x or 11.x
- Views (Drupal core)
- [Leaflet](https://www.drupal.org/project/leaflet)
- [Leaflet Views](https://www.drupal.org/project/leaflet) (included with Leaflet)