diff --git a/reference-1.7.1.html b/reference-1.7.1.html index 85d2f43..a8df606 100644 --- a/reference-1.7.1.html +++ b/reference-1.7.1.html @@ -3676,7 +3676,7 @@
attributionStringnullsourceTargetObjecttarget相同。target 相同。propagatedFromlayerObjectpropagatedFrom相同。propagatedFrom 相同。| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将
+ 与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将
+ 与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将
+ 与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将
+ 与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Property | -Type | -Description | +类型 | +说明 |
|---|---|---|---|---|
type |
String |
- The event type (e.g. 'click'). |
+ 事件类型(例如,'click')。 |
|
target |
Object |
- The object that fired the event. For propagated events, the last object in -the propagation chain that fired the event. | +触发事件的对象。对于传播事件,传播链中触发事件的最后一个对象。 | |
sourceTarget |
Object |
- The object that originally fired the event. For non-propagated events, this will
-be the same as the target. |
+ 最初触发该事件的对象。对于非传播的事件,这将与 target 相同。 |
|
propagatedFrom |
Object |
- For propagated events, the last object that propagated the event to its -event parent. | +对于传播的事件,将事件传播到其事件父级的最后一个对象。 | |
layer |
Object |
- Deprecated. The same as propagatedFrom. |
+ 已弃用。 与 propagatedFrom 相同。 |
| Option | -Type | -Default | -Description | +选项 | +类型 | +默认 | +描述 |
|---|---|---|---|---|---|---|---|
attribution |
String |
null |
- String to be shown in the attribution control, e.g. "© OpenStreetMap contributors". It describes the layer data and is often a legal obligation towards copyright holders and tile providers. | +在属性控件中显示的字符串,例如:"© OpenStreetMap contributors"。它描述了图层数据,并且通常是对版权所有者和瓦片提供商的法律义务。 |
| Event | -Data | -Description | +事件 | +数据 | +说明 |
|---|---|---|---|---|---|
add |
Event |
- Fired after the layer is added to a map | +在图层添加到地图后触发 | ||
remove |
Event |
- Fired after the layer is removed from a map | +从地图中移除图层后触发 |
| Event | -Data | -Description | +事件 | +数据 | +说明 |
|---|---|---|---|---|---|
popupopen |
PopupEvent |
- Fired when a popup bound to this layer is opened | +当绑定到该层的弹出窗口(popup)打开时触发 | ||
popupclose |
PopupEvent |
- Fired when a popup bound to this layer is closed | +当绑定到该层的弹出窗口(popup)关闭时触发 |
| Event | -Data | -Description | +事件 | +数据 | +说明 |
|---|---|---|---|---|---|
tooltipopen |
TooltipEvent |
- Fired when a tooltip bound to this layer is opened. | +当绑定到该层的工具提示(tooltip)打开时触发。 | ||
tooltipclose |
TooltipEvent |
- Fired when a tooltip bound to this layer is closed. | +当绑定到该层的工具提示(tooltip)关闭时触发。 |
| Method | -Returns | -Description | +方法 | +返回值 | +说明 |
|---|---|---|---|---|---|
addTo( |
this |
- Adds the layer to the given map or layer group. + | 将图层添加到指定的地图或图层组(LayerGroup)。 |
||
remove() |
this |
- Removes the layer from the map it is currently active on. + | 从当前处于活动状态的地图中删除图层。 |
||
removeFrom( |
this |
- Removes the layer from the given map + | 从指定的地图中删除图层 |
||
removeFrom( |
this |
- Removes the layer from the given | 从指定的 |
||
getPane( |
HTMLElement |
- Returns the | 返回代表地图上指定窗格的 |
||
getAttribution() |
String |
- Used by the | 由 |
| Method | -Returns | -Description | +方法 | +返回值 | +说明 |
|---|---|---|---|---|---|
bindPopup( |
this |
- Binds a popup to the layer with the passed | 将一个弹出式窗口与传入的 |
||
unbindPopup() |
this |
- Removes the popup previously bound with | 移除之前用 bindPopup 绑定的弹出窗口。
|
||
openPopup( |
this |
- Opens the bound popup at the specified | 在指定的 |
||
closePopup() |
this |
- Closes the popup bound to this layer if it is open. + | 如果与当前图层绑定的弹窗(popup)时打开的,则关闭当前弹窗。 |
||
togglePopup() |
this |
- Opens or closes the popup bound to this layer depending on its current state. + | 根据当前状态,打开或关闭与该层绑定的弹出窗口。 |
||
isPopupOpen() |
boolean |
- Returns | 如果与该层绑定的弹出窗口当前已打开,则返回 |
||
setPopupContent( |
this |
- Sets the content of the popup bound to this layer. + | 设置绑定到该图层的弹出窗口的内容。 |
||
getPopup() |
Popup |
- Returns the popup bound to this layer. + | 返回绑定到该图层的弹出窗口。 |
| Method | -Returns | -Description | +方法 | +返回值 | +描述 |
|---|---|---|---|---|---|
bindTooltip( |
this |
- Binds a tooltip to the layer with the passed | 将工具提示(tooltip)绑定到传入的图层 |
||
unbindTooltip() |
this |
- Removes the tooltip previously bound with | 移除之前用 |
||
openTooltip( |
this |
- Opens the bound tooltip at the specified | 在指定的 |
||
closeTooltip() |
this |
- Closes the tooltip bound to this layer if it is open. + | 如果该图层处于打开状态,则关闭绑定到该图层的工具提示。 |
||
toggleTooltip() |
this |
- Opens or closes the tooltip bound to this layer depending on its current state. + | 根据当前状态打开或关闭绑定到该图层的工具提示。 |
||
isTooltipOpen() |
boolean |
- Returns | 如果该层绑定的工具提示当前已打开,则返回 |
||
setTooltipContent( |
this |
- Sets the content of the tooltip bound to this layer. + | 设置绑定到该层的工具提示的内容。 |
||
getTooltip() |
Tooltip |
- Returns the tooltip bound to this layer. + | 返回绑定到该层的工具提示。 |
| Method | -Returns | -Description | +方法 | +返回值 | +说明 |
|---|---|---|---|---|---|
on( |
this |
- Adds a listener function ( | 为对象的特定事件类型添加一个监听函数( |
||
on( |
this |
- Adds a set of type/listener pairs, e.g. | 添加一组类型/侦听器对,例如 |
||
off( |
this |
- Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to | 移除一个先前添加的监听器函数。如果没有指定函数,它将从对象中删除该特定事件的所有监听器。请注意,如果您向 |
||
off( |
this |
- Removes a set of type/listener pairs. + | 删除一组类型/侦听器 |
||
off() |
this |
- Removes all listeners to all events on the object. This includes implicitly attached events. + | 移除该对象上所有事件的所有监听器。这包括隐含的附加事件。 |
||
fire( |
this |
- Fires an event of the specified type. You can optionally provide an data -object — the first argument of the listener function will contain its -properties. The event can optionally be propagated to event parents. + | 触发指定类型的事件。您可以选择提供一个数据对象——侦听器函数的第一个参数将包含其属性,事件可以选择性地传播到事件父级。 |
||
listens( |
Boolean |
- Returns | 如果一个特定的事件类型有任何监听器连接到它,则返回 |
||
once(…) |
this |
- Behaves as | 与 |
||
addEventParent( |
this |
- Adds an event parent - an | 向父级 |
||
removeEventParent( |
this |
- Removes an event parent, so it will stop receiving propagated events + | 删除之前向父级 |
||
addEventListener(…) |
this |
- Alias to | 同 |
||
removeEventListener(…) |
this |
- Alias to | 同 |
||
clearAllEventListeners(…) |
this |
- Alias to | 同 |
||
addOneTimeEventListener(…) |
this |
- Alias to | 同 |
||
fireEvent(…) |
this |
- Alias to | 同 |
||
hasEventListeners(…) |
Boolean |
- Alias to |