bug: Detail page map div renders without Leaflet JS #57

Closed
opened 2026-06-28 15:36:18 +00:00 by jmiller · 2 comments
Owner

Summary

The location detail page (tmpl/location/default.php) renders a <div id="map"> element but does not include the Leaflet JS/CSS assets needed to initialize the map. The map div is empty on the detail view.

Expected Behavior

Location detail page should show an interactive Leaflet map centered on the location's coordinates.

Current Behavior

An empty map div is rendered. Leaflet library is only loaded via the map module, not on the detail page.

Fix

Either:

  1. Load Leaflet JS/CSS in the detail view template and initialize the map with the location's lat/lng
  2. Or embed the map module in the detail view layout

Priority

P2 — visible UI gap on a core page.

## Summary The location detail page (`tmpl/location/default.php`) renders a `<div id="map">` element but does not include the Leaflet JS/CSS assets needed to initialize the map. The map div is empty on the detail view. ## Expected Behavior Location detail page should show an interactive Leaflet map centered on the location's coordinates. ## Current Behavior An empty map div is rendered. Leaflet library is only loaded via the map module, not on the detail page. ## Fix Either: 1. Load Leaflet JS/CSS in the detail view template and initialize the map with the location's lat/lng 2. Or embed the map module in the detail view layout ## Priority P2 — visible UI gap on a core page.
Author
Owner

Branch created: feature/57-bug-detail-page-map-div-renders-without-

git fetch origin
git checkout feature/57-bug-detail-page-map-div-renders-without-
Branch created: [`feature/57-bug-detail-page-map-div-renders-without-`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteStoreLocator/src/branch/feature/57-bug-detail-page-map-div-renders-without-) ```bash git fetch origin git checkout feature/57-bug-detail-page-map-div-renders-without- ```
Author
Owner

Fixed in site/tmpl/location/default.php:

  • Leaflet CSS/JS loaded via WebAssetManager when location has coordinates
  • Map initialized at zoom 15 centered on location with marker + popup
  • Inline script uses $wa->addInlineScript() for CSP nonce compatibility
Fixed in `site/tmpl/location/default.php`: - Leaflet CSS/JS loaded via WebAssetManager when location has coordinates - Map initialized at zoom 15 centered on location with marker + popup - Inline script uses `$wa->addInlineScript()` for CSP nonce compatibility
Sign in to join this conversation.