@JsType(isNative=true)
public abstract class Path
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
L |
addTo(Map map)
Adds the layer to the map.
|
L |
bindPopup(HTMLElement el,
PopupOptions options)
Binds a popup with a particular HTML content to a click on this path.
|
L |
bindPopup(Popup popup,
PopupOptions options)
Binds a popup with a particular HTML content to a click on this path.
|
L |
bindPopup(java.lang.String html,
PopupOptions options)
Bind popup.
|
L |
bringToBack()
Brings the layer to the bottom of all path layers.
|
L |
bringToFront()
Brings the layer to the top of all path layers.
|
static L |
clearAllEventListeners()
Clear all event listeners.
|
L |
closePopup()
Closes the path's bound popup if it is opened.
|
static L |
fire(java.lang.String type)
Fires an event of the specified type.
|
LatLngBounds |
getBounds()
Returns the LatLngBounds of the path.
|
static L |
off(java.lang.String type,
Function fn)
the listener will only get fired once and then removed.
|
static L |
on(java.lang.String type,
Function fn)
Adds a set of type/listener pairs
|
static L |
once(java.lang.String type,
Function fn)
Once.
|
L |
openPopup(LatLng latlng)
Opens the popup previously bound by the bindPopup method in the given point, or in one of the path's points if not specified.
|
L |
redraw()
Redraws the layer.
|
L |
setStyle(PathOptions object)
Changes the appearance of a Path based on the options in the Path options object.
|
L |
unbindPopup()
Unbind popup.
|
@JsMethod public L addTo(Map map)
map
- the map@JsMethod public L bindPopup(java.lang.String html, PopupOptions options)
html
- the htmloptions
- the options@JsMethod public L bindPopup(HTMLElement el, PopupOptions options)
el
- the elementoptions
- the options@JsMethod public L bindPopup(Popup popup, PopupOptions options)
popup
- the popupoptions
- the options@JsMethod public L unbindPopup()
@JsMethod public L openPopup(LatLng latlng)
latlng
- the latlng@JsMethod public L closePopup()
@JsMethod public L setStyle(PathOptions object)
object
- the object@JsMethod public LatLngBounds getBounds()
@JsMethod public L bringToFront()
@JsMethod public L bringToBack()
@JsMethod public L redraw()
@JsMethod public static L clearAllEventListeners()
@JsMethod public static L on(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L once(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L off(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L fire(java.lang.String type)
type
- the type