mapview ยท console.warn
createMapView: "{name}" is not an event a ma...
Printed by mapview, prefixed [lattice], since 1.85.0.
Warnings reference › mapview:event:*
- Identifier
mapview:event:*- Raised by
- mapview
- Since
- 1.85.0
What happened
on(name, fn) was given a name the map view never emits, so the listener would never run. It was not added.
The fix
Listen for one of the map view's events: feature:click, feature:hover, draw, load or close.
The smallest fix
map.on('feature:click', (e) => console.log(e.key));
Reference
Covered in full at the API reference.