Events (Map)
Events
We support almost all leaflet events. The events are divided into three groups: Leaflet events, marker events and path events.
Map Events
Ereignis | Event Object | Description |
---|---|---|
click |
MouseEvent | Is triggered when a click in or a tap on the map is performed. |
dblclick |
MouseEvent | Is triggered when a double-click in or a double-tap on the map is executed. |
mousedown |
MouseEvent | Is triggered as long as the mouse button is held down on the map. |
mouseup |
MouseEvent | Is triggered as soon as the pressed mouse button is released. |
mouseover |
MouseEvent | Is triggered when the mouse pointer enters the area of the map. |
mouseout |
MouseEvent | Is triggered when the mouse pointer leaves the area of the map. |
mousemove |
MouseEvent | Is triggered as long as the mouse pointer is moving on the map. |
contextmenu |
MouseEvent | Is triggered when a click with the right mouse button is triggered or when you hold down the card with your finger for one second. |
focus |
Event | Is triggered as soon as a click, tap or other action brings the map into focus. |
blur |
Event | Is triggered when other elements are used independently of the map on the page. |
preclick |
MouseEvent | Is triggered before the click event if you want to perform an action that should be performed before all other actions. |
load |
Event | Is triggered when the map is initialized (defined by the first setting of center and zoom). |
unload |
Event | Is triggered when the card is removed. This happens when the method remove() is called. |
viewreset |
Event | Is triggered when the map needs to redraw its contents (usually during zoom or load). |
movestart |
Event | Is triggered when a card movement is started. |
move |
Event | Is triggered with every card movement (dragging, panning, zooming). |
moveend |
Event | Is triggered when a card movement is finished. |
dragstart |
Event | Is triggered when the user starts moving the map. |
drag |
Event | Is triggered as long as the user moves the card. |
dragend |
DragEndEvent | Is triggered when the user stops moving the map. |
zoomstart |
Event | Is triggered when the zoom level changes (before the animation). |
zoomend |
Event | Is triggered after the zoom level has changed. |
zoomlevelschange |
Event | Is triggered when the number of zoom levels changes due to the addition or deletion of a layer. |
resize |
ResizeEvent | Is triggered when the card size changes. |
autopanstart |
Event | Is triggered when the map automatically positions itself when a popup is opened. |
layeradd |
LayerEvent | Is triggered when a new map layer is added. |
layerremove |
LayerEvent | Is triggered when a layer is removed from the map. |
baselayerchange |
LayerEvent | Is triggered when the base layer changes with the layer control. |
overlayadd |
LayerEvent | Is triggered when an overlay is selected using the layer control. |
overlayremove |
LayerEvent | Is triggered when an overlay is deselected via the layer control. |
locationfound |
LocationEvent | Is triggered if a geolocation using the locate() method was successful. |
locationerror |
ErrorEvent | Is triggered when a geolocation using the locate() method has failed. |
popupopen |
PopupEvent | Is triggered when a popup opens. |
popupclose |
PopupEvent | Is triggered when a popup is closed. |
Mapping of map events for Google Maps and Bing Maps.
Bing Maps | Google Maps | SmartMaps |
---|---|---|
click |
click |
click |
dblclick |
dblclick |
dblclick |
mapresize |
resize |
resize |
maptypechanged |
baselayerchange |
|
mousedown |
mousedown |
mousedown |
mousemove |
mousemove |
mousemove |
mouseout |
mouseout |
mouseout |
rightclick |
rightclick |
contextmenu |
mouseover |
mouseover |
mouseover |
drag |
move |
|
mouseup |
mouseup |
|
zoom_changed |
zoomend , move , moveend |
|
viechange |
move |
|
viewchangestart |
movestart |
|
idle |
moveend |
|
dragstart |
movestart |
Marker Events
Ereignis | Event Object | Description |
---|---|---|
click |
MouseEvent | Is triggered when a click or tap is performed on the marker. |
dblclick |
MouseEvent | Is triggered when a double-click or double-tap is performed on the marker. |
mousedown |
MouseEvent | Is triggered as long as the mouse button is held down on the marker. |
mouseover |
MouseEvent | Is triggered when the mouse pointer enters the area of the marker. |
mouseout |
MouseEvent | Is triggered when the mouse pointer leaves the marker area. |
contextmenu |
MouseEvent | Is triggered when a click with the right mouse button is triggered or the marker is held down with the finger for one second. |
dragstart |
Event | Is triggered when the user starts moving the marker. |
drag |
Event | Is triggered as long as the user moves the marker. |
dragend |
DragEndEvent | Is triggered when the user releases the marker. |
move |
Event | Is triggered when the marker is moved with setLatLng(). |
add |
Event | Is triggered when the marker is added to the map. |
remove |
Event | Is triggered when the marker is removed from the card. |
popupopen |
PopupEvent | Is triggered when a popup opens. |
popupclose |
PopupEvent | Is triggered when a popup is closed. |
Mapping of marker events for Google Maps and Bing Maps.
Bing Maps | Google Maps | SmartMaps |
---|---|---|
add |
||
remove |
||
click |
click |
click |
dblclick |
dblclick |
dblclick |
dragstart |
dragstart |
dragstart |
drag |
drag |
drag |
dragend |
dragend |
dragend |
mousedown |
mousedown |
mousedown |
mouseout |
mouseout |
mouseout |
mouseover |
mouseover |
mouseover |
mouseup |
mouseup |
mouseup |
Path Events
Ereignis | Event Object | Description |
---|---|---|
click |
MouseEvent | Is triggered when a click or tap is performed on the object. |
dblclick |
MouseEvent | Is triggered when the object is double-clicked or double-tapped. |
mousedown |
MouseEvent | Is triggered as long as the mouse button is held down on the object. |
mouseover |
MouseEvent | Is triggered when the mouse pointer enters the area of the object. |
mouseout |
MouseEvent | Is triggered when the mouse pointer leaves the area of the object. |
contextmenu |
MouseEvent | Is triggered when a click with the right mouse button is triggered or when you hold the object with your finger for one second. |
add |
Event | Is triggered when Path is added to the card. |
remove |
Event | Is triggered when Path is removed from the card. |
popupopen |
PopupEvent | Is triggered when a popup opens. |
popupclose |
PopupEvent | Is triggered when a Path is closed. |