Instantiates a Marker object given a geographical point and optionally an options object.
Options
Option
Type
Default
Description
icon
Icon
*
Icon instance to use for rendering the marker. See Icon documentation for details on how to customize the marker icon. If not specified, a common instance of L.Icon.Default is used.
keyboard
Boolean
true
Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.
title
String
‘’
Text for the browser tooltip that appear on marker hover (no tooltip by default).
zIndexOffset
Number
0
By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like 1000 (or high negative value, respectively).
opcity
Number
1.0
The opcity of the marker.
riseOnHover
Boolean
false
if true,the marker will get on top of others when you hover the mouse over it.
riseOffset
Number
250
The z-index offset usedfor the riseOnHover feature.
pane
String
‘MarkerPane’
Map pane where the markers icon will be added.
shadowPane
String
‘ShadowPane’
Map pane where the markers shadow will be added.
bubblingMouseEvents
Boolean
false
When true ,a mouse event on this marker will tigger the same event on the map(unless L.DomEvent.stopPropagation is used).
Draggable marker options
Option
Type
Default
Description
draggable
Boolean
false
Whether the marker is draggable with mouse/touch or not.
autoPan
Boolean
false
Whether the marker is draggable with mouse/touch or not.
autoPanPadding
Point
Point(50, 50)
Distance (in pixels to the left/right and to the top/bottom) of the map edge to start panning the map.