new View(layer)
An interface for managing views on layers
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
cartodb.CartoDBLayer.SubLayer | The layer whose view will be managed |
- Source:
Extends
Methods
off(eventName, evtHdlr, hdlrScopeopt)
Remove a previously connected event handler
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to which the handler will be connected | |
evtHdlr |
function | The event handler function | |
hdlrScope |
Object |
<optional> |
The scope in which to invoke the event handler |
- Inherited From:
- Source:
on(eventName, evtHdlr, hdlrScopeopt)
Connect a function to an event
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to which the handler will be connected | |
evtHdlr |
function | The event handler function | |
hdlrScope |
Object |
<optional> |
The scope in which to invoke the event handler |
- Inherited From:
- Source:
one(eventName, evtHdlr, hdlrScopeopt)
Connect a function to an event for a single invocation
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to which the handler will be connected | |
evtHdlr |
function | The event handler function | |
hdlrScope |
Object |
<optional> |
The scope in which to invoke the event handler |
- Inherited From:
- Source:
trigger(eventName, dataopt)
Trigger a named event with event data
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
eventName |
string | The name of the event to trigger | |
data |
Object |
<optional> |
The event data |
- Inherited From:
- Source:
(abstract) update(filterValues, descriptionValues)
Update the view by modifying the data for the layer
Parameters:
| Name | Type | Description |
|---|---|---|
filterValues |
Object.<string, Object.<string, string>> | The values object used to modify the query for this view |
descriptionValues |
Object.<string, string> | The values objects for replacing tokens in the descriptionTemplate |
- Source:
visibility(visible)
Change the visibility of the view's layer
Parameters:
| Name | Type | Description |
|---|---|---|
visible |
boolean |
- Source:
Events
updated
Legend HTML generated after a view modifies the data for its layer
Type:
- string
- Source: