@JsType(isNative=true) public class FeatureGroup extends java.lang.Object implements ILayer
Modifier and Type | Method and Description |
---|---|
L |
bindPopup(java.lang.String htmlContent,
PopupOptions options)
Binds a popup with a particular HTML content to a click on any layer from the group that has a bindPopup method.
|
L |
bringToBack()
Brings the layer group to the bottom of all other layers.
|
L |
bringToFront()
Brings the layer group to the top of all other layers.
|
static L |
clearAllEventListeners()
Clear all event listeners.
|
static L |
fire(java.lang.String type)
Fires an event of the specified type.
|
LatLngBounds |
getBounds()
Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).
|
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
|
void |
onAdd(Map map)
Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events.
|
static L |
once(java.lang.String type,
Function fn)
Once.
|
void |
onRemove(Map map)
Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd.
|
L |
setStyle(PathOptions style)
Sets the given path options to each layer of the group that has a setStyle method.
|
@JsMethod public L bindPopup(java.lang.String htmlContent, PopupOptions options)
htmlContent
- the html contentoptions
- the Popup options@JsMethod public LatLngBounds getBounds()
@JsMethod public L setStyle(PathOptions style)
style
- the style@JsMethod public L bringToFront()
@JsMethod public L bringToBack()
@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 typepublic void onAdd(Map map)
ILayer