|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--MMWidget
|
+--MMLocalInfoWidget
Defined in MultimapAPI
| Constructor Summary | |
MMLocalInfoWidget
( <String> data_sources, <String> header, <MMBox> position, <String> className )
Local Info Widget - performs a search using the MMSearch API within the current viewer and displays a count of results with the ability to display the results in the viewer. |
|
| Method Summary | |
void
|
addDataSource( <String> data_source, <Object> options )
Adds a data source to be used. |
integer
|
getMaxResults( )
Gets the maximum number of results that we will display on a map. |
boolean
|
isSelected( <String> data_source )
Query the "selected" value of a data source. |
void
|
refreshData()
Instructs the viewer to reload counts, can be used if new data sources have been added. |
void
|
setAllSelected( <boolean> bool )
Sets the "selected" value of all data sources to the value passed in. |
void
|
setMaxResults( <integer> max_results )
Sets the maximum number of results that we will display on a map. |
void
|
setSelected( <String> data_source, <boolean> bool )
Used to programmatically turn on or off a data set. |
void
|
start()
Starts the local info widget so that it will go looking for results. |
void
|
stop()
Stops the local info tool so that it will no longer update. |
Object
|
toggleMinimized( <boolean> bool )
Toggles the minimized state of the widget. |
| Methods inherited from class MMWidget |
processHTML, addEventHandlers, setContainer, getContainer, getCalculatedDrawContainer, setPosition, _hasCssClass, _getElementsByTagNameClass
|
| Constructor Detail |
MMLocalInfoWidget( <String> data_sources, <String> header, <MMBox> position, <String> className )
| Event type | Event target | 3rd argument | 4th argument | |
| localinfoDataUpdate | local info widget | data source | results | |
| localinfoCountUpdate | local info widget | data source | count | |
| localinfoStatusUpdate | local info widget | data source | ||
| localinfoCreateMarker | local info widget | data source | marker | properties |
| localinfoTotalUpdate | local info widget | total |
data_sources - (optional) The data sources that you want to show in the widget.
header - (optional) A string of text to place in a header.
position - (optional) Position at which to place the widget within the mapviewer.
className - (optional) CSS Class name to give the widget.
| Method Detail |
void addDataSource( <String> data_source, <Object> options )
| Name | Type | Default Value | Description |
|---|---|---|---|
| title | String | Either a title set by the server, or the data source name | The title that you would like to be displayed next to the checkbox. |
| icon | MMIcon | The icon that you would like used for markers created as a result of this search. | |
| bounds | MMBounds | To reduce empty requests you can pass a set of bounds in. If the viewer is outside these bounds then this search will not be performed. | |
| min_zoom/max_zoom | Integer | min_zoom=13 | To reduce circumstances when too many markers are returned, or when markers would not be relevant, you may pass in a minimum and maximum zoom value. If no values are given, the search will be performed at all zoom factors. |
| identifier | String | The field in the results which identifies individual results. | |
| className | String | Allows you to style individual entries in the local info widget differently. | |
| widget_icon | MMIcon | A generic image. | A standard MMIcon with "image", "printImage" and "iconSize" properties set, to appear next to the title. |
data_source - The data source that you would like results to be retrieved from.
options - (optional) A set of options, see the description for more details.
integer getMaxResults( )
boolean isSelected( <String> data_source )
data_source - The name of the data source to query.
void refreshData()
void setAllSelected( <boolean> bool )
bool - True to set all data sources as selected, false to set all data sources as not selected.
void setMaxResults( <integer> max_results )
max_results - Maximum number of results to display.
void setSelected( <String> data_source, <boolean> bool )
data_source - The data source.
bool - If true, turns the data set on, false turns it off.
void start()
void stop()
Object toggleMinimized( <boolean> bool )
bool - (optional) Set the minimized state to a specific value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||