@JsType(isNative=true)
public class Marker
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
L |
addTo(Map map)
Adds the marker to the map.
|
L |
bindPopup(HTMLElement el,
PopupOptions options)
Binds a popup with a particular HTML content to a click on this marker.
|
L |
bindPopup(Popup popup,
PopupOptions options)
Binds a popup with a particular HTML content to a click on this marker.
|
L |
bindPopup(java.lang.String html,
PopupOptions options)
Binds a popup with a particular HTML content to a click on this marker.
|
static L |
clearAllEventListeners()
Clear all event listeners.
|
L |
closePopup()
Closes the bound popup of the marker if it's opened.
|
static L |
fire(java.lang.String type)
Fires an event of the specified type.
|
LatLng |
getLatLng()
Returns the current geographical position of the marker.
|
Popup |
getPopup()
Returns the popup previously bound by the bindPopup method.
|
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()
Opens the popup previously bound by the bindPopup method.
|
L |
setIcon(Icon icon)
Changes the marker icon.
|
L |
setLatLng(LatLng latlng)
Changes the marker position to the given point.
|
L |
setOpacity(java.lang.Number opacity)
Changes the zIndex offset of the marker.
|
L |
setPopupContent(HTMLElement el,
PopupOptions options)
Sets an HTML content of the popup of this marker.
|
L |
setPopupContent(java.lang.String html,
PopupOptions options)
Sets an HTML content of the popup of this marker.
|
L |
setZIndexOffset(java.lang.Number offset)
Sets the Z index offset.
|
com.google.gwt.core.client.JavaScriptObject |
toGeoJSON()
To geo JSON.
|
L |
togglePopup()
Toggles the popup previously bound by the bindPopup method.
|
L |
unbindPopup()
Unbinds the popup previously bound to the marker with bindPopup.
|
L |
update()
Updates the marker position, useful if coordinates of its latLng object were changed directly.
|
@JsMethod public L addTo(Map map)
map
- the map@JsMethod public LatLng getLatLng()
@JsMethod public L setLatLng(LatLng latlng)
latlng
- the latlng@JsMethod public L setIcon(Icon icon)
icon
- the icon@JsMethod public L setZIndexOffset(java.lang.Number offset)
offset
- the offset@JsMethod public L setOpacity(java.lang.Number opacity)
opacity
- the opacity@JsMethod public L update()
@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 eloptions
- the options@JsMethod public L bindPopup(Popup popup, PopupOptions options)
popup
- the popupoptions
- the options@JsMethod public L unbindPopup()
@JsMethod public L openPopup()
@JsMethod public Popup getPopup()
@JsMethod public L closePopup()
@JsMethod public L togglePopup()
@JsMethod public L setPopupContent(java.lang.String html, PopupOptions options)
html
- the htmloptions
- the options@JsMethod public L setPopupContent(HTMLElement el, PopupOptions options)
el
- the elementoptions
- the options@JsMethod public com.google.gwt.core.client.JavaScriptObject toGeoJSON()
@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