Interface SupportsMapEvents
- All Superinterfaces:
Evented
- All Known Implementing Classes:
LeafletMap
Mixin interface adding default methods to register listeners for map level Leaflet events such as
load, move, zoom and resize on the implementing component.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonLoad(LeafletEventListener<LeafletEvent> listener) Fired when the map is initialized (when its center and zoom are set for the first time).default voidonMove(LeafletEventListener<LeafletEvent> listener) Fired repeatedly during any movement of the map, including pan and fly animations.default voidonMoveEnd(LeafletEventListener<LeafletEvent> listener) Fired when the center of the map stops changing (e.g.default voidonMoveStart(LeafletEventListener<LeafletEvent> listener) Fired when the view of the map starts changing (e.g.default voidonResize(LeafletEventListener<ResizeEvent> listener) Fired when the map is resized.default voidonUnload(LeafletEventListener<LeafletEvent> listener) Fired when the map is destroyed with remove method.default voidonViewReset(LeafletEventListener<LeafletEvent> listener) Fired when the map needs to redraw its content (this usually happens on map zoom or load).default voidonZoom(LeafletEventListener<LeafletEvent> listener) Fired repeatedly during any change in zoom level, including zoom and fly animations.default voidonZoomAnim(LeafletEventListener<ZoomAnimEvent> listener) Fired at least once per zoom animation.default voidonZoomEnd(LeafletEventListener<LeafletEvent> listener) Fired when the map has changed, after any animations.default voidonZoomLevelsChange(LeafletEventListener<LeafletEvent> listener) Fired when the number of zoomlevels on the map is changed due to adding or removing a layer.default voidonZoomStart(LeafletEventListener<LeafletEvent> listener) Fired when the map zoom is about to change (e.g.Methods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.Evented
addEventListener, clearAllEventListeners, hasEventListeners, listens, off, off, on, removeEventListener
-
Method Details
-
onZoomLevelsChange
Fired when the number of zoomlevels on the map is changed due to adding or removing a layer.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onResize
Fired when the map is resized.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onUnload
Fired when the map is destroyed with remove method.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onViewReset
Fired when the map needs to redraw its content (this usually happens on map zoom or load). Very useful for creating custom overlays.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onLoad
Fired when the map is initialized (when its center and zoom are set for the first time).- Parameters:
listener- the listener to call when the event occurs, notnull
-
onZoomStart
Fired when the map zoom is about to change (e.g. before zoom animation).- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMoveStart
Fired when the view of the map starts changing (e.g. user starts dragging the map).- Parameters:
listener- the listener to call when the event occurs, notnull
-
onZoom
Fired repeatedly during any change in zoom level, including zoom and fly animations.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMove
Fired repeatedly during any movement of the map, including pan and fly animations.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onZoomEnd
Fired when the map has changed, after any animations.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMoveEnd
Fired when the center of the map stops changing (e.g. user stopped dragging the map).- Parameters:
listener- the listener to call when the event occurs, notnull
-
onZoomAnim
Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.- Parameters:
listener- the listener to call when the event occurs, notnull
-