leaflet ยท console.warn
the Leaflet module needs the Lattice core; l...
Printed by leaflet, prefixed [lattice], since 1.92.0.
Warnings reference › leaflet:requires-core
- Identifier
leaflet:requires-core- Raised by
- leaflet
- Since
- 1.92.0
What happened
The Leaflet module's script-tag (UMD) build was loaded on a page whose LatticeGrid global is missing, so the core's own script build was not loaded first. The binding no longer inlines the pushdown planner, so with no core there is no grid to pass to bindLeaflet; the API this load publishes cannot be used until the core is loaded. The warning is raised once and the load proceeds.
The fix
Load the core's script build (e.g. lattice-grid.min.js) before modules/leaflet.min.js, so LatticeGrid.createGrid exists before bindLeaflet is called.
The smallest fix
<script src="lattice-grid.min.js"></script>
<script src="modules/leaflet.min.js"></script>
Reference
Covered in full at the API reference.