Constructor
new DataCatalogViewWithFilters()
Extends
Members
className :string
The HTML class names for this view element
Type:
- string
filterGroupsContainer :string
The jQuery selector for the FilterGroupsView container
Type:
- string
fixedHeight :Boolean
If true, the view height will be adjusted to fit the height of the window
If false, the view height will be fixed via CSS
Type:
- Boolean
- Inherited From:
- Source:
searchModel :Search
The Search model to use for creating and storing Filters and contructing query strings.
This property is a Search model instead of a Filters collection in
order to be quickly compatible with the superclass/superview, DataCatalogView,
which was created with the (eventually to be deprecated) SearchModel.
A Filters collection is set on the Search model and does most of the work
for creating queries.
Type:
sortOrder :string
The sort order for the Solr query
Type:
- string
tagName :string
The HTML tag name for this view element
Type:
- string
template :Underscore.template
The primary HTML template for this view
Type:
- Underscore.template
- Overrides:
- Source:
Methods
addAll()
Add all items in the **SearchResults** collection
This loads the first 25, then waits for the map to be
fully loaded and then loads the remaining items.
Without this delay, the app waits until all records are processed
- Inherited From:
- Source:
addAnnotationFilter()
addAnnotationFilter - Add the annotation filter to the view
- Inherited From:
- Source:
addMarkers()
Get the details on each marker
And create an infowindow for that marker
- Inherited From:
- Source:
addOne()
Add a single SolrResult item to the list by creating a view for it and appending its element to the DOM.
- Inherited From:
- Source:
addTileInfoWindows()
Get the details on each tile - a list of ids and titles for each dataset contained in that tile
And create an infowindow for that tile
- Inherited From:
- Source:
closeInfoWindows()
Iterate over each infowindow that we have stored in the view and close it.
Pass an infoWindow object to this function to keep that infoWindow open/skip it
Parameters:
Type | Description |
---|---|
infoWindow | An infoWindow to keep open |
- Inherited From:
- Source:
createFilterGroups()
Creates filter groups and renders them in this view
drawTile(options, geohash, label)
With the options and label object given, add a single tile to the map and set its event listeners
Parameters:
Name | Type | Description |
---|---|---|
options |
object | |
geohash |
string | |
label |
string |
- Inherited From:
- Source:
drawTiles()
Create a tile for each geohash facet. A separate tile label is added to the map with the count of the facet.
- Inherited From:
- Source:
getResults(page)
getResults gets all the current search filters from the searchModel, creates a Solr query, and runs that query.
Parameters:
Name | Type | Description |
---|---|---|
page |
number | The page of search results to get results for |
- Overrides:
- Source:
hideClearButton()
Overload this function with an empty function since the Clear button
has been moved to the FilterGroupsView
hideResultOnMap(e)
Hide the marker, infoWindow, and bounding coordinates polygon on
the map when the user stops hovering on the marker icon in the result list
Parameters:
Name | Type | Description |
---|---|---|
e |
Event | The event that brought us to this function |
- Inherited From:
- Source:
removeMarkers()
Iterate over all the markers in the view and remove them from the map and view
- Inherited From:
- Source:
removeTiles()
Remove all the tiles and text from the map
- Inherited From:
- Source:
render()
Override DataCatalogView.render() to render this view with filters
from the Filters collection
renderMap()
Render the map based on the mapModel properties and search results
resetMap()
Reset the map to the defaults
showClearButton()
Overload this function with an empty function since the Clear button
has been moved to the FilterGroupsView
showError(model, response)
When the SearchResults collection has an error getting the results,
show an error message instead of search results
Parameters:
Name | Type | Description |
---|---|---|
model |
SolrResult | |
response |
XMLHttpRequest.response |
- Inherited From:
- Source:
showResultOnMap(e)
Show the marker, infoWindow, and bounding coordinates polygon on
the map when the user hovers on the marker icon in the result list
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
- Inherited From:
- Source:
toggleClearButton()
Overload this function with an empty function since the Clear button
has been moved to the FilterGroupsView
toggleMapFilter()
Toggle the map filter to include or exclude it from the Solr query
toggleMapMode()
Toggle between map and list mode