@JsType(isNative=true) public class LayerGroup extends Object implements Layer, Evented
| Constructor and Description |
|---|
LayerGroup() |
| Modifier and Type | Method and Description |
|---|---|
L |
addEventParent(Evented obj)
Adds an event parent - an Evented that will receive propagated events
|
L |
addLayer(Layer layer)
Adds a given layer to the group.
|
L |
addTo(Map map)
Adds the tooltip to the given map
|
L |
bindPopup(elemental2.dom.HTMLElement content,
PopupOptions options)
Binds a popup to the layer with the passed content and sets up the neccessary event listeners.
|
L |
bindPopup(String id,
PopupOptions options)
Binds a popup to the layer with the passed content and sets up the neccessary event listeners.
|
L |
bindTooltip(elemental2.dom.HTMLElement content,
TooltipOptions options)
Binds a tooltip to the layer with the passed *content and sets up the neccessary event listeners.
|
L |
bindTooltip(String content,
TooltipOptions options)
Binds a tooltip to the layer with the passed *content and sets up the neccessary event listeners.
|
L |
bindTooltip(Tooltip content,
TooltipOptions options)
Binds a tooltip to the layer with the passed content and sets up the neccessary event listeners.
|
L |
clearAllEventListeners()
Clear all event listeners.
|
L |
clearLayers()
Removes all the layers from the group.
|
L |
closePopup()
Closes the popup bound to this layer if it is open.
|
L |
closeTooltip()
Closes the tooltip bound to this layer if it is open.
|
L |
eachLayer(elemental2.core.Function fn,
com.google.gwt.core.client.JavaScriptObject context)
Iterates over the layers of the group, optionally specifying context of the iterator function.
|
L |
fire(String type)
Fires an event of the specified type.
|
Boolean |
getLayer(String id)
Returns the layer with the given id.
|
double |
getLayerId(Layer layer)
Returns the internal ID for a layer.
|
Layer[] |
getLayers()
Returns an array of all the layers added to the group.
|
elemental2.dom.HTMLElement |
getPane(String name)
Returns the HTMLElement representing the named pane on the map.
|
Popup |
getPopup()
Returns the popup bound to this layer.
|
Tooltip |
getTooltip()
Returns the tooltip bound to this layer.
|
Boolean |
hasLayer(Layer layer)
Returns true if the given layer is currently added to the group.
|
L |
invoke(String methodName)
Calls methodName on every layer contained in this group, passing any additional parameters.
|
boolean |
isPopupOpen()
Returns true if the popup bound to this layer is currently open.
|
boolean |
isTooltipOpen()
Returns true if the tooltip bound to this layer is currently open.
|
Boolean |
listens(String type)
Returns true if a particular event type has any listeners attached to it.
|
L |
off()
Removes all listener
|
L |
off(String type)
Removes a listener
|
L |
off(String[] type)
Removes a set of listener
|
L |
on(String type,
EventCallback fn)
Adds a set of type/listener pairs.
|
L |
once(String type,
EventCallback fn)
the listener will only get fired once and then removed.
|
L |
openPopup(LatLng latlng)
Opens the bound popup at the specificed latlng or at the default popup anchor if no latlng is passed.
|
L |
openTooltip(LatLng latlng)
Opens the bound tooltip at the specificed latlng or at the default tooltip anchor if no latlng is passed.
|
L |
remove()
Removes the tooltip from the map it is currently active on.
|
L |
removeEventParent(Evented obj)
Removes an event parent, so it will stop receiving propagated events
|
L |
removeFrom(Map map)
Removes the tooltip from the given map
|
L |
removeLayer(Layer layer)
Removes a given layer from the group.
|
L |
removeLayer(String id)
Removes a given layer from the group.
|
L |
setPopupContent(elemental2.dom.HTMLElement content)
Sets the content of the popup bound to this layer.
|
L |
setPopupContent(Popup content)
Sets the content of the popup bound to this layer.
|
L |
setPopupContent(String content)
Sets the content of the popup bound to this layer.
|
L |
setTooltipContent(elemental2.dom.HTMLElement content)
Sets the content of the tooltip bound to this layer.
|
L |
setTooltipContent(String content)
Sets the content of the tooltip bound to this layer.
|
L |
setTooltipContent(Tooltip content)
Sets the content of the tooltip bound to this layer.
|
L |
setZIndex(double zIndex)
Calls setZIndex on every layer contained in this group, passing the z-index.
|
com.google.gwt.core.client.JavaScriptObject |
toGeoJSON()
Returns a GeoJSON representation of the layer group (GeoJSON FeatureCollection).
|
L |
togglePopup()
Opens or closes the popup bound to this layer depending on its current state.
|
L |
toggleTooltip()
Opens or closes the tooltip bound to this layer depending on its current state.
|
L |
unbindPopup()
Removes the popup previously bound with bindPopup.
|
L |
unbindTooltip()
Removes the tooltip previously bound with *bindTooltip.
|
@JsMethod public L addLayer(Layer layer)
layer - the layer@JsMethod public L removeLayer(Layer layer)
layer - the layer@JsMethod public L removeLayer(String id)
id - the id@JsMethod public Boolean hasLayer(Layer layer)
layer - the layer@JsMethod public Boolean getLayer(String id)
id - the id@JsMethod public Layer[] getLayers()
@JsMethod public L clearLayers()
@JsMethod public L eachLayer(elemental2.core.Function fn, com.google.gwt.core.client.JavaScriptObject context)
fn - the action functioncontext - the context@JsMethod public com.google.gwt.core.client.JavaScriptObject toGeoJSON()
@JsMethod public L setZIndex(double zIndex)
zIndex - the z index@JsMethod public double getLayerId(Layer layer)
layer - the layer@JsMethod public L invoke(String methodName)
methodName - the method name@JsMethod public L bindPopup(elemental2.dom.HTMLElement content, PopupOptions options)
Layer@JsMethod public L bindPopup(String id, PopupOptions options)
Layer@JsMethod public L unbindPopup()
LayerunbindPopup in interface Layer@JsMethod public L openPopup(LatLng latlng)
Layer@JsMethod public L closePopup()
LayerclosePopup in interface Layer@JsMethod public L togglePopup()
LayertogglePopup in interface Layer@JsMethod public boolean isPopupOpen()
LayerisPopupOpen in interface Layer@JsMethod public L setPopupContent(String content)
LayersetPopupContent in interface Layer@JsMethod public L setPopupContent(elemental2.dom.HTMLElement content)
LayersetPopupContent in interface Layer@JsMethod public L setPopupContent(Popup content)
LayersetPopupContent in interface Layer@JsMethod public Popup getPopup()
Layerpublic L bindTooltip(String content, TooltipOptions options)
LayerbindTooltip in interface Layerpublic L bindTooltip(elemental2.dom.HTMLElement content, TooltipOptions options)
LayerbindTooltip in interface Layerpublic L bindTooltip(Tooltip content, TooltipOptions options)
LayerbindTooltip in interface Layerpublic L unbindTooltip()
LayerunbindTooltip in interface Layerpublic L openTooltip(LatLng latlng)
LayeropenTooltip in interface Layerpublic L closeTooltip()
LayercloseTooltip in interface Layerpublic L toggleTooltip()
LayertoggleTooltip in interface Layerpublic boolean isTooltipOpen()
LayerisTooltipOpen in interface Layerpublic L setTooltipContent(String content)
LayersetTooltipContent in interface Layerpublic L setTooltipContent(elemental2.dom.HTMLElement content)
LayersetTooltipContent in interface Layerpublic L setTooltipContent(Tooltip content)
LayersetTooltipContent in interface Layerpublic Tooltip getTooltip()
LayergetTooltip in interface Layerpublic L addTo(Map map)
Layerpublic L remove()
Layerpublic L removeFrom(Map map)
LayerremoveFrom in interface Layerpublic elemental2.dom.HTMLElement getPane(String name)
Layerpublic L clearAllEventListeners()
EventedclearAllEventListeners in interface Eventedpublic L on(String type, EventCallback fn)
Eventedpublic L once(String type, EventCallback fn)
Eventedpublic L off(String[] type)
Eventedpublic L fire(String type)
Eventedpublic Boolean listens(String type)
Eventedpublic L addEventParent(Evented obj)
EventedaddEventParent in interface Eventedpublic L removeEventParent(Evented obj)
EventedremoveEventParent in interface EventedCopyright © 2018 G-Widgets. All rights reserved.