This project is not covered by Drupal’s security advisory policy.
Leaflet Zoom Link provides a Geofield field formatter that renders a "View on Map" link targeting a Leaflet map elsewhere on your site.
When the target map is already on the same page, clicking the link scrolls to the map container, zooms to the field's coordinates, and opens any matching marker popup — without a full page reload. The browser history is updated so the zoomed state is bookmarkable and the back button works correctly.
When the map lives on a different page, the link navigates naturally. The module appends lat and lon query parameters to the URL and sets the map element ID as the URL fragment. On arrival, JavaScript auto-zooms the map once the Leaflet instance is ready.
Features
- Works across pages or in-place on the same page
- Auto-opens marker popups at the target coordinates
- Bookmarkable URLs with
lat/lonquery parameters - Configurable map page URL (route name or internal path), map element ID, and link text
- Themeable via
leaflet-zoom-link.html.twig
Requirements
Project information
- Project categories: Content display
- Ecosystem: Leaflet
- Created by jnettik on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
