From 5ff9282dec5586281c7b8d5166990e6deecf9b49 Mon Sep 17 00:00:00 2001 From: Robyn Thiessen-Bock Date: Thu, 29 Jun 2023 13:47:43 -0400 Subject: [PATCH] Update version to 2.25.0 and rebuild docs --- README.md | 2 +- docs/_config.yml | 2 +- docs/docs/AccessPolicy.html | 2 +- docs/docs/AccessPolicyView.html | 2 +- docs/docs/AccessRule.html | 2 +- docs/docs/AccessRuleView.html | 2 +- docs/docs/AccountSelectView.html | 2 +- docs/docs/Analytics.html | 1780 +++++ docs/docs/AnnotationFilter.html | 2 +- docs/docs/AnnotationView.html | 2 +- docs/docs/AnnotatorView.html | 2 +- docs/docs/AppConfig.html | 446 +- docs/docs/AppModel.html | 208 +- docs/docs/AppView.html | 239 +- docs/docs/AssetColor.html | 61 +- docs/docs/AssetColorPalette.html | 665 +- docs/docs/AssetColors.html | 268 +- docs/docs/BooleanFilter.html | 2 +- docs/docs/BooleanFilterView.html | 100 +- docs/docs/CatalogSearchView.html | 2653 +++++++- docs/docs/Cesium3DTileset.html | 1146 +++- docs/docs/CesiumGeohash.html | 4896 +++++++++++++- docs/docs/CesiumImagery.html | 572 +- docs/docs/CesiumTerrain.html | 564 +- docs/docs/CesiumVectorData.html | 3613 ++++++++++- docs/docs/CesiumWidgetView.html | 622 +- docs/docs/ChoiceFilter.html | 2 +- docs/docs/ChoiceFilterView.html | 546 +- docs/docs/CitationHeaderView.html | 2 +- docs/docs/CitationListView.html | 2 +- docs/docs/CitationModalView.html | 2 +- docs/docs/CitationModel.html | 2 +- docs/docs/CitationView.html | 2 +- docs/docs/Citations.html | 2 +- docs/docs/CollectionModel.html | 70 +- docs/docs/ColorPaletteView.html | 2 +- docs/docs/DataCatalogViewWithFilters.html | 102 +- docs/docs/DataItemView.html | 2 +- docs/docs/DataONEObject.html | 70 +- docs/docs/DataPackage.html | 20 +- docs/docs/DataPackageView.html | 2 +- docs/docs/DateFilter.html | 2 +- docs/docs/DateFilterView.html | 611 +- docs/docs/DraftsView.html | 2 +- docs/docs/EML211.html | 82 +- docs/docs/EML211EditorView.html | 2 +- docs/docs/EMLAnnotation.html | 2 +- docs/docs/EMLAnnotations.html | 2 +- docs/docs/EMLAttribute.html | 2 +- docs/docs/EMLAttributeView.html | 2 +- docs/docs/EMLDataTable.html | 2 +- docs/docs/EMLEntity.html | 2 +- docs/docs/EMLEntityView.html | 2 +- docs/docs/EMLGeoCoverage.html | 2 +- docs/docs/EMLMeasurementScale.html | 2 +- docs/docs/EMLMeasurementScaleView.html | 2 +- docs/docs/EMLMeasurementTypeView.html | 2 +- docs/docs/EMLMethodStep.html | 2 +- docs/docs/EMLMethods.html | 2 +- docs/docs/EMLMethodsView.html | 2 +- docs/docs/EMLNonNumericDomain.html | 2 +- docs/docs/EMLNumericDomain.html | 2 +- docs/docs/EMLOtherEntity.html | 2 +- docs/docs/EMLOtherEntityView.html | 2 +- docs/docs/EMLParty.html | 2 +- docs/docs/EMLPartyView.html | 2 +- docs/docs/EMLSpecializedText.html | 2 +- docs/docs/EMLTempCoverageView.html | 2 +- docs/docs/EMLTemporalCoverage.html | 2 +- docs/docs/EMLText.html | 2 +- docs/docs/EMLText211.html | 2 +- docs/docs/EMLUnit.html | 2 +- docs/docs/EMLView.html | 2 +- docs/docs/EMlGeoCoverageView_.html | 2 +- docs/docs/EditCollectionView.html | 2 +- docs/docs/EditorView.html | 2 +- docs/docs/ExternalView.html | 2 +- docs/docs/Feature.html | 2 +- docs/docs/FeatureInfoView.html | 2 +- docs/docs/Features.html | 183 +- docs/docs/Filter.html | 2 +- docs/docs/FilterEditorView.html | 2 +- docs/docs/FilterGroup.html | 2 +- docs/docs/FilterGroupView.html | 93 +- docs/docs/FilterGroupsView.html | 343 +- docs/docs/FilterView.html | 527 +- docs/docs/Filters.html | 532 +- docs/docs/FiltersMapConnector.html | 1856 ++++++ docs/docs/FiltersSearchConnector.html | 293 +- docs/docs/FooterView.html | 2 +- docs/docs/Geohash.html | 3748 +++++++---- docs/docs/Geohashes.html | 5773 +++++++++++++++++ docs/docs/GoogleAnalytics.html | 1841 ++++++ docs/docs/GroupListView.html | 2 +- docs/docs/ImageUploaderView.html | 2 +- docs/docs/LayerDetailView.html | 2 +- docs/docs/LayerDetailsView.html | 2 +- docs/docs/LayerInfoView.html | 2 +- docs/docs/LayerItemView.html | 2 +- docs/docs/LayerListView.html | 18 +- docs/docs/LayerNavigationView.html | 2 +- docs/docs/LayerOpacityView.html | 2 +- docs/docs/LegendView.html | 10 +- docs/docs/LogsSearch.html | 2 +- docs/docs/LookupModel.html | 2 +- docs/docs/Map.html | 2 +- docs/docs/MapAsset.html | 633 +- docs/docs/MapAssets.html | 607 +- docs/docs/MapConfig.html | 226 +- docs/docs/MapModel.html | 804 ++- docs/docs/MapSearchConnector.html | 2601 ++++++++ docs/docs/MapSearchFiltersConnector.html | 2735 ++++++++ docs/docs/MapView.html | 12 +- docs/docs/MarkdownEditorView.html | 2 +- docs/docs/MarkdownView.html | 2 +- docs/docs/MdqRunView.html | 2 +- docs/docs/MetacatUI.html | 8 +- docs/docs/MetadataView.html | 2 +- docs/docs/MetricModalView.html | 2 +- docs/docs/MetricView.html | 8 +- docs/docs/Metrics.html | 2 +- docs/docs/MetricsChartView.html | 2 +- docs/docs/NavbarView.html | 2 +- docs/docs/NodeSelect.html | 2 +- docs/docs/NumericFilter.html | 2 +- docs/docs/NumericFilterView.html | 552 +- docs/docs/ObjectFormat.html | 2 +- docs/docs/ObjectFormatSelect.html | 2 +- docs/docs/ObjectFormats.html | 2 +- docs/docs/PortEditorDataView.html | 2 +- docs/docs/PortEditorImageView.html | 2 +- docs/docs/PortEditorLogosView.html | 2 +- docs/docs/PortEditorMdSectionView.html | 2 +- docs/docs/PortEditorSectionView.html | 2 +- docs/docs/PortEditorSectionsView.html | 2 +- docs/docs/PortEditorSettingsView.html | 2 +- docs/docs/PortalDataView.html | 2 +- docs/docs/PortalEditorView.html | 2 +- docs/docs/PortalHeaderView.html | 2 +- docs/docs/PortalImage.html | 2 +- docs/docs/PortalListView.html | 2 +- docs/docs/PortalLogosView.html | 2 +- docs/docs/PortalMembersView.html | 2 +- docs/docs/PortalModel.html | 66 +- docs/docs/PortalSectionModel.html | 2 +- docs/docs/PortalSectionView.html | 2 +- docs/docs/PortalUsagesView.html | 2 +- docs/docs/PortalView.html | 38 +- docs/docs/PortalVisualizationsView.html | 2 +- docs/docs/PortalsSearchView.html | 2 +- docs/docs/Project.html | 2 +- docs/docs/ProjectList.html | 2 +- docs/docs/ProjectView.html | 2 +- docs/docs/QualityCheck.html | 2 +- docs/docs/QualityReport.html | 2 +- docs/docs/QueryBuilderView.html | 2 +- docs/docs/QueryField.html | 2 +- docs/docs/QueryFieldSelectView.html | 2 +- docs/docs/QueryFields.html | 2 +- docs/docs/QueryRuleView.html | 2 +- docs/docs/Quota.html | 2 +- docs/docs/Quotas.html | 2 +- docs/docs/RegisterCitationView.html | 2 +- docs/docs/ScaleBarView.html | 2 +- docs/docs/ScienceMetadata.html | 70 +- docs/docs/ScienceMetadataView.html | 2 +- docs/docs/Search.html | 2 +- docs/docs/SearchResultView.html | 1877 ++++++ docs/docs/SearchResultsPagerView.html | 851 ++- docs/docs/SearchResultsView.html | 859 ++- docs/docs/SearchableSelectView.html | 2 +- docs/docs/SemanticFilterView.html | 550 +- docs/docs/SignInView.html | 2 +- docs/docs/SolrResult.html | 6 +- docs/docs/SolrResults.html | 235 +- docs/docs/SorterView.html | 553 +- docs/docs/SpatialFilter.html | 2359 +++++-- docs/docs/Stats.html | 2 +- docs/docs/Subscription.html | 2 +- docs/docs/TOCView.html | 2 +- docs/docs/TableEditorView.html | 2 +- docs/docs/ToggleFilter.html | 2 +- docs/docs/ToggleFilterView.html | 556 +- docs/docs/ToolbarView.html | 42 +- docs/docs/UIRouter.html | 8 +- docs/docs/Units.html | 2 +- docs/docs/Usage.html | 2 +- docs/docs/Usages.html | 2 +- docs/docs/UserGroup.html | 2 +- docs/docs/UserGroupView.html | 2 +- docs/docs/UserView.html | 2 +- docs/docs/Utilities.html | 2 +- docs/docs/VectorFilter.html | 2 +- docs/docs/VectorFilters.html | 2 +- docs/docs/docs_other_addtlDocs.jsdoc.html | 2 +- docs/docs/global.html | 20 +- docs/docs/index.html | 2 +- docs/docs/src_js_app.js.html | 9 +- .../src_js_collections_AccessPolicy.js.html | 2 +- .../docs/src_js_collections_Citations.js.html | 2 +- .../src_js_collections_DataPackage.js.html | 18 +- docs/docs/src_js_collections_Filters.js.html | 1140 ++-- .../src_js_collections_ObjectFormats.js.html | 2 +- .../src_js_collections_ProjectList.js.html | 2 +- .../src_js_collections_QualityReport.js.html | 2 +- .../src_js_collections_SolrResults.js.html | 28 +- docs/docs/src_js_collections_Units.js.html | 2 +- .../docs/src_js_collections_UserGroup.js.html | 2 +- ...c_js_collections_bookkeeper_Quotas.js.html | 2 +- ...c_js_collections_bookkeeper_Usages.js.html | 2 +- ...rc_js_collections_maps_AssetColors.js.html | 33 +- .../src_js_collections_maps_Features.js.html | 24 +- .../src_js_collections_maps_Geohashes.js.html | 862 +++ .../src_js_collections_maps_MapAssets.js.html | 418 +- ..._js_collections_maps_VectorFilters.js.html | 2 +- ...ctions_metadata_eml_EMLAnnotations.js.html | 2 +- ...ollections_queryFields_QueryFields.js.html | 2 +- docs/docs/src_js_common_Utilities.js.html | 2 +- docs/docs/src_js_models_AccessRule.js.html | 2 +- docs/docs/src_js_models_AppModel.js.html | 72 +- docs/docs/src_js_models_CitationModel.js.html | 2 +- .../src_js_models_CollectionModel.js.html | 2 +- docs/docs/src_js_models_DataONEObject.js.html | 46 +- docs/docs/src_js_models_LogsSearch.js.html | 2 +- docs/docs/src_js_models_LookupModel.js.html | 2 +- docs/docs/src_js_models_Map.js.html | 2 +- docs/docs/src_js_models_MetricsModel.js.html | 2 +- docs/docs/src_js_models_PackageModel.js.html | 30 +- .../src_js_models_QualityCheckModel.js.html | 2 +- docs/docs/src_js_models_Search.js.html | 54 +- docs/docs/src_js_models_SolrResult.js.html | 26 +- docs/docs/src_js_models_Stats.js.html | 2 +- docs/docs/src_js_models_UserModel.js.html | 2 +- .../src_js_models_analytics_Analytics.js.html | 194 + ...s_models_analytics_GoogleAnalytics.js.html | 181 + .../src_js_models_bookkeeper_Quota.js.html | 2 +- ..._js_models_bookkeeper_Subscription.js.html | 2 +- .../src_js_models_bookkeeper_Usage.js.html | 2 +- ...c_js_models_connectors_Filters-Map.js.html | 300 + ...s_models_connectors_Filters-Search.js.html | 216 +- ...dels_connectors_Map-Search-Filters.js.html | 392 ++ ...rc_js_models_connectors_Map-Search.js.html | 394 ++ ...rc_js_models_filters_BooleanFilter.js.html | 2 +- ...src_js_models_filters_ChoiceFilter.js.html | 2 +- .../src_js_models_filters_DateFilter.js.html | 2 +- .../docs/src_js_models_filters_Filter.js.html | 6 +- .../src_js_models_filters_FilterGroup.js.html | 2 +- ...rc_js_models_filters_NumericFilter.js.html | 2 +- ...rc_js_models_filters_SpatialFilter.js.html | 518 +- ...src_js_models_filters_ToggleFilter.js.html | 2 +- ...src_js_models_formats_ObjectFormat.js.html | 2 +- .../src_js_models_maps_AssetColor.js.html | 114 +- ...c_js_models_maps_AssetColorPalette.js.html | 607 +- docs/docs/src_js_models_maps_Feature.js.html | 2 +- docs/docs/src_js_models_maps_Geohash.js.html | 433 ++ docs/docs/src_js_models_maps_Map.js.html | 633 +- .../src_js_models_maps_VectorFilter.js.html | 2 +- ...models_maps_assets_Cesium3DTileset.js.html | 62 +- ...s_models_maps_assets_CesiumGeohash.js.html | 517 +- ...s_models_maps_assets_CesiumImagery.js.html | 4 +- ...s_models_maps_assets_CesiumTerrain.js.html | 2 +- ...odels_maps_assets_CesiumVectorData.js.html | 447 +- ...src_js_models_maps_assets_MapAsset.js.html | 88 +- ...js_models_metadata_ScienceMetadata.js.html | 2 +- ...c_js_models_metadata_eml211_EML211.js.html | 16 +- ...dels_metadata_eml211_EMLAnnotation.js.html | 2 +- ...odels_metadata_eml211_EMLAttribute.js.html | 2 +- ...odels_metadata_eml211_EMLDataTable.js.html | 2 +- ...s_models_metadata_eml211_EMLEntity.js.html | 2 +- ...els_metadata_eml211_EMLGeoCoverage.js.html | 2 +- ...etadata_eml211_EMLMeasurementScale.js.html | 2 +- ..._models_metadata_eml211_EMLMethods.js.html | 2 +- ...etadata_eml211_EMLNonNumericDomain.js.html | 2 +- ...s_metadata_eml211_EMLNumericDomain.js.html | 2 +- ...els_metadata_eml211_EMLOtherEntity.js.html | 2 +- ...js_models_metadata_eml211_EMLParty.js.html | 2 +- ...s_metadata_eml211_EMLTaxonCoverage.js.html | 2 +- ...etadata_eml211_EMLTemporalCoverage.js.html | 2 +- ..._js_models_metadata_eml211_EMLText.js.html | 2 +- ..._js_models_metadata_eml211_EMLUnit.js.html | 2 +- ..._js_models_metadata_eml220_EMLText.js.html | 2 +- ..._models_metadata_eml_EMLMethodStep.js.html | 2 +- ...ls_metadata_eml_EMLSpecializedText.js.html | 2 +- .../src_js_models_portals_PortalImage.js.html | 2 +- .../src_js_models_portals_PortalModel.js.html | 2 +- ..._models_portals_PortalSectionModel.js.html | 2 +- ...dels_portals_PortalVizSectionModel.js.html | 2 +- .../src_js_models_projects_Project.js.html | 2 +- ...c_js_models_queryFields_QueryField.js.html | 2 +- docs/docs/src_js_routers_router.js.html | 55 +- .../src_js_views_AccessPolicyView.js.html | 2 +- docs/docs/src_js_views_AccessRuleView.js.html | 2 +- docs/docs/src_js_views_AnnotationView.js.html | 2 +- docs/docs/src_js_views_AppView.js.html | 38 +- .../src_js_views_CitationHeaderView.js.html | 2 +- .../src_js_views_CitationListView.js.html | 2 +- docs/docs/src_js_views_CitationView.js.html | 2 +- .../src_js_views_ColorPaletteView.js.html | 2 +- .../docs/src_js_views_DataCatalogView.js.html | 94 +- ...s_views_DataCatalogViewWithFilters.js.html | 1363 ++-- docs/docs/src_js_views_DataItemView.js.html | 2 +- .../docs/src_js_views_DataPackageView.js.html | 2 +- docs/docs/src_js_views_DraftsView.js.html | 2 +- .../src_js_views_EditCollectionView.js.html | 2 +- docs/docs/src_js_views_EditorView.js.html | 2 +- docs/docs/src_js_views_FooterView.js.html | 2 +- docs/docs/src_js_views_GroupListView.js.html | 2 +- .../src_js_views_ImageUploaderView.js.html | 2 +- .../src_js_views_MarkdownEditorView.js.html | 2 +- docs/docs/src_js_views_MarkdownView.js.html | 2 +- docs/docs/src_js_views_MdqRunView.js.html | 2 +- docs/docs/src_js_views_MetadataView.js.html | 4 +- .../docs/src_js_views_MetricModalView.js.html | 2 +- docs/docs/src_js_views_MetricView.js.html | 8 +- .../src_js_views_MetricsChartView.js.html | 2 +- docs/docs/src_js_views_NavbarView.js.html | 2 +- .../src_js_views_RegisterCitationView.js.html | 2 +- docs/docs/src_js_views_SignInView.js.html | 2 +- docs/docs/src_js_views_StatsView.js.html | 2 +- docs/docs/src_js_views_TOCView.js.html | 2 +- .../docs/src_js_views_TableEditorView.js.html | 2 +- docs/docs/src_js_views_UserGroupView.js.html | 2 +- docs/docs/src_js_views_UserView.js.html | 2 +- ..._views_citations_CitationModalView.js.html | 2 +- ...js_views_filters_BooleanFilterView.js.html | 145 +- ..._js_views_filters_ChoiceFilterView.js.html | 2 +- ...rc_js_views_filters_DateFilterView.js.html | 19 +- ..._js_views_filters_FilterEditorView.js.html | 2 +- ...c_js_views_filters_FilterGroupView.js.html | 22 +- ..._js_views_filters_FilterGroupsView.js.html | 45 +- .../src_js_views_filters_FilterView.js.html | 94 +- ...js_views_filters_NumericFilterView.js.html | 8 +- ...s_views_filters_SemanticFilterView.js.html | 2 +- ..._js_views_filters_ToggleFilterView.js.html | 13 +- ...src_js_views_maps_CesiumWidgetView.js.html | 410 +- .../src_js_views_maps_FeatureInfoView.js.html | 2 +- .../src_js_views_maps_LayerDetailView.js.html | 2 +- ...src_js_views_maps_LayerDetailsView.js.html | 2 +- .../src_js_views_maps_LayerInfoView.js.html | 2 +- .../src_js_views_maps_LayerItemView.js.html | 2 +- .../src_js_views_maps_LayerListView.js.html | 4 +- ..._js_views_maps_LayerNavigationView.js.html | 2 +- ...src_js_views_maps_LayerOpacityView.js.html | 2 +- .../docs/src_js_views_maps_LegendView.js.html | 6 +- docs/docs/src_js_views_maps_MapView.js.html | 7 +- .../src_js_views_maps_ScaleBarView.js.html | 2 +- .../src_js_views_maps_ToolbarView.js.html | 19 +- ...js_views_metadata_EML211EditorView.js.html | 2 +- .../src_js_views_metadata_EML211View.js.html | 2 +- ...js_views_metadata_EMLAttributeView.js.html | 2 +- ...rc_js_views_metadata_EMLEntityView.js.html | 2 +- ..._views_metadata_EMLGeoCoverageView.js.html | 2 +- ...s_metadata_EMLMeasurementScaleView.js.html | 2 +- ...ws_metadata_EMLMeasurementTypeView.js.html | 2 +- ...c_js_views_metadata_EMLMethodsView.js.html | 2 +- ..._views_metadata_EMLOtherEntityView.js.html | 2 +- ...src_js_views_metadata_EMLPartyView.js.html | 2 +- ...views_metadata_EMLTempCoverageView.js.html | 2 +- ...views_metadata_ScienceMetadataView.js.html | 2 +- ...rc_js_views_portals_PortalDataView.js.html | 2 +- ..._js_views_portals_PortalHeaderView.js.html | 2 +- ...rc_js_views_portals_PortalListView.js.html | 2 +- ...c_js_views_portals_PortalLogosView.js.html | 2 +- ...js_views_portals_PortalMembersView.js.html | 2 +- ...js_views_portals_PortalMetricsView.js.html | 16 +- ...js_views_portals_PortalSectionView.js.html | 2 +- ..._js_views_portals_PortalUsagesView.js.html | 2 +- .../src_js_views_portals_PortalView.js.html | 13 +- ...s_portals_PortalVisualizationsView.js.html | 2 +- ...js_views_portals_PortalsSearchView.js.html | 2 +- ..._portals_editor_PortEditorDataView.js.html | 2 +- ...portals_editor_PortEditorImageView.js.html | 2 +- ...portals_editor_PortEditorLogosView.js.html | 2 +- ...als_editor_PortEditorMdSectionView.js.html | 2 +- ...rtals_editor_PortEditorSectionView.js.html | 2 +- ...tals_editor_PortEditorSectionsView.js.html | 2 +- ...tals_editor_PortEditorSettingsView.js.html | 2 +- ...ws_portals_editor_PortalEditorView.js.html | 2 +- .../src_js_views_projects_ProjectView.js.html | 2 +- ...iews_queryBuilder_QueryBuilderView.js.html | 2 +- ...s_views_queryBuilder_QueryRuleView.js.html | 2 +- ...ews_searchSelect_AccountSelectView.js.html | 2 +- ..._searchSelect_AnnotationFilterView.js.html | 2 +- ..._views_searchSelect_NodeSelectView.js.html | 2 +- ...earchSelect_ObjectFormatSelectView.js.html | 2 +- ..._searchSelect_QueryFieldSelectView.js.html | 2 +- ..._searchSelect_SearchableSelectView.js.html | 2 +- ..._js_views_search_CatalogSearchView.js.html | 1282 ++-- ...c_js_views_search_SearchResultView.js.html | 621 ++ ...iews_search_SearchResultsPagerView.js.html | 456 +- ..._js_views_search_SearchResultsView.js.html | 448 +- .../src_js_views_search_SorterView.js.html | 84 +- docs/docs/src_loader.js.html | 2 +- package-lock.json | 4 +- package.json | 2 +- src/index.html | 2 +- src/js/collections/Filters.js | 2 +- src/js/collections/SolrResults.js | 4 +- src/js/collections/maps/AssetColors.js | 4 +- src/js/collections/maps/Features.js | 2 +- src/js/collections/maps/Geohashes.js | 2 +- src/js/collections/maps/MapAssets.js | 6 +- src/js/models/AppModel.js | 6 +- src/js/models/analytics/Analytics.js | 2 +- src/js/models/analytics/GoogleAnalytics.js | 2 +- src/js/models/connectors/Filters-Map.js | 6 +- src/js/models/connectors/Filters-Search.js | 4 +- .../models/connectors/Map-Search-Filters.js | 2 +- src/js/models/connectors/Map-Search.js | 2 +- src/js/models/filters/SpatialFilter.js | 20 +- src/js/models/maps/AssetColor.js | 2 +- src/js/models/maps/Geohash.js | 2 +- src/js/models/maps/Map.js | 8 +- src/js/models/maps/assets/Cesium3DTileset.js | 6 +- src/js/models/maps/assets/CesiumGeohash.js | 20 +- src/js/models/maps/assets/CesiumVectorData.js | 26 +- src/js/models/maps/assets/MapAsset.js | 4 +- src/js/views/AppView.js | 2 +- src/js/views/filters/FilterGroupView.js | 2 +- src/js/views/filters/FilterGroupsView.js | 4 +- src/js/views/filters/FilterView.js | 10 +- src/js/views/search/CatalogSearchView.js | 34 +- src/js/views/search/SearchResultsPagerView.js | 4 +- src/js/views/search/SearchResultsView.js | 6 +- src/js/views/search/SorterView.js | 6 +- 425 files changed, 56206 insertions(+), 8541 deletions(-) create mode 100644 docs/docs/Analytics.html create mode 100644 docs/docs/FiltersMapConnector.html create mode 100644 docs/docs/Geohashes.html create mode 100644 docs/docs/GoogleAnalytics.html create mode 100644 docs/docs/MapSearchConnector.html create mode 100644 docs/docs/MapSearchFiltersConnector.html create mode 100644 docs/docs/SearchResultView.html create mode 100644 docs/docs/src_js_collections_maps_Geohashes.js.html create mode 100644 docs/docs/src_js_models_analytics_Analytics.js.html create mode 100644 docs/docs/src_js_models_analytics_GoogleAnalytics.js.html create mode 100644 docs/docs/src_js_models_connectors_Filters-Map.js.html create mode 100644 docs/docs/src_js_models_connectors_Map-Search-Filters.js.html create mode 100644 docs/docs/src_js_models_connectors_Map-Search.js.html create mode 100644 docs/docs/src_js_models_maps_Geohash.js.html create mode 100644 docs/docs/src_js_views_search_SearchResultView.js.html diff --git a/README.md b/README.md index 4bd307ab9..6c3c31166 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ MetacatUI is an open source, community project. We [welcome contributions](http Cite this software as: -> Matthew B. Jones, Chris Jones, Lauren Walker, Robyn Thiessen-Bock, Ben Leinfelder, Peter Slaughter, Bryce Mecum, Rushiraj Nenuji, Hesham Elbashandy, Val Hendrix. 2022. MetacatUI: A client-side web interface for DataONE data repositories (version 2.24.0). Arctic Data Center. [doi:10.18739/A25M6282K](https://doi.org/10.18739/A25M6282K) +> Matthew B. Jones, Chris Jones, Lauren Walker, Robyn Thiessen-Bock, Ben Leinfelder, Peter Slaughter, Bryce Mecum, Rushiraj Nenuji, Hesham Elbashandy, Val Hendrix. 2022. MetacatUI: A client-side web interface for DataONE data repositories (version 2.25.0). Arctic Data Center. [doi:10.18739/A25M6282K](https://doi.org/10.18739/A25M6282K) ## Screenshots diff --git a/docs/_config.yml b/docs/_config.yml index c3a6c8222..9cf11ae10 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,3 +1,3 @@ url: "/metacatui" highlighter: "rouge" -version: "2.24.0" +version: "2.25.0" diff --git a/docs/docs/AccessPolicy.html b/docs/docs/AccessPolicy.html index 5d601cb71..851fe24c8 100644 --- a/docs/docs/AccessPolicy.html +++ b/docs/docs/AccessPolicy.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AccessPolicyView.html b/docs/docs/AccessPolicyView.html index a3eab8f07..1c0919e8f 100644 --- a/docs/docs/AccessPolicyView.html +++ b/docs/docs/AccessPolicyView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AccessRule.html b/docs/docs/AccessRule.html index 77cf53803..f398309f1 100644 --- a/docs/docs/AccessRule.html +++ b/docs/docs/AccessRule.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AccessRuleView.html b/docs/docs/AccessRuleView.html index e19c72196..ab4edad91 100644 --- a/docs/docs/AccessRuleView.html +++ b/docs/docs/AccessRuleView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AccountSelectView.html b/docs/docs/AccountSelectView.html index 5fe1fabf2..75cdad53f 100644 --- a/docs/docs/AccountSelectView.html +++ b/docs/docs/AccountSelectView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Analytics.html b/docs/docs/Analytics.html new file mode 100644 index 000000000..84a94bdfe --- /dev/null +++ b/docs/docs/Analytics.html @@ -0,0 +1,1780 @@ + + + + + MetacatUI Dev Docs: Class: Analytics + + + + + + + + + + + + + + +
+ +

Class: Analytics

+ + + + + + +
+ +
+ +

Analytics()

+ +
A model that connects with an analytics service to record user +interactions with the app. This is a generic model that is meant to be +extended for a specific analytics service.
+ + + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new Analytics() +

+ + + + + + + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + +
    +
  • Backbone.Model
  • +
+ + + + + + + + + + + + + + + +

Members

+ + + +

+ + + + + track :function +

+ + + + +
+ The main function for sending analytics events to the service. +
+ + + +
Type:
+
    +
  • + +function + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + type :string +

+ + + + +
+ The name of this Model +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + createExceptionDescription(message, id) → {string} +

+ + + + + + +
+ Given a message and an optional ID, create a description of an +exception event that can be sent to an analytics service. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + +string + + + + A description of the exception
id + + +string + + + + The ID for the associated package or object
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ A description of the exception event +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + defaults() → {object} +

+ + + + + + +
+ Default attributes for this model +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getKey() → {string} +

+ + + + + + +
+ Get the key for the analytics service. This is the ID that is used to +initialize the analytics service. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The key for the analytics service +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getVersion() → {string} +

+ + + + + + +
+ Get the version number of the MetacatUI app. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The version number of the MetacatUI app +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize() +

+ + + + + + +
+ Creates a new Analytics model +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + ready() → {boolean} +

+ + + + + + +
+ Check if analytics service is enabled and ready to use. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ True if the service is enabled in the app and the +track method is available. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + setupAnalytics() +

+ + + + + + +
+ Set up the analytics service. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + trackEvent(category, action, label, value) +

+ + + + + + +
+ Send the details of an event to an analytics service. The function will +do nothing if an analytics service is not enabled. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
category + + +string + + + + The category of the event
action + + +string + + + + The action of the event
label + + +string + + + + The label of the event
value + + +string + + + + The value of the event
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + trackException(message, id, fatal) +

+ + + + + + +
+ Send the details of an exception event to an analytics service. This +will automatically include the MetacatUI version number in the event +details. The function will do nothing if an analytics service is not +enabled. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + +string + + + + A description of the exception
id + + +string + + + + The ID for the associated package or object
fatal + + +boolean + + + + Whether the exception was fatal
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + trackPageView(path, title) +

+ + + + + + +
+ Send the details of a page view to an analytics service. The function +will do nothing if an analytics service is not enabled. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
path + + +string + + + + The path of the page
title + + +string + + + + The title of the page
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/AnnotationFilter.html b/docs/docs/AnnotationFilter.html index d7bf7e305..74cd4d0c0 100644 --- a/docs/docs/AnnotationFilter.html +++ b/docs/docs/AnnotationFilter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AnnotationView.html b/docs/docs/AnnotationView.html index 7db5fcc34..925ed6628 100644 --- a/docs/docs/AnnotationView.html +++ b/docs/docs/AnnotationView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AnnotatorView.html b/docs/docs/AnnotatorView.html index 7153ede8a..cd0f04360 100644 --- a/docs/docs/AnnotatorView.html +++ b/docs/docs/AnnotatorView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/AppConfig.html b/docs/docs/AppConfig.html index d47a28af5..c0a6218ce 100644 --- a/docs/docs/AppConfig.html +++ b/docs/docs/AppConfig.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -196,7 +196,7 @@
Type:
Source:
@@ -371,7 +371,7 @@
Properties:
Source:
@@ -564,7 +564,7 @@
Properties:
Source:
@@ -655,7 +655,7 @@
Type:
Source:
@@ -735,7 +735,7 @@
Type:
Source:
@@ -818,7 +818,7 @@
Type:
Source:
@@ -911,7 +911,7 @@
Type:
Source:
@@ -997,7 +997,7 @@
Type:
Source:
@@ -1085,7 +1085,7 @@
Type:
Source:
@@ -1171,7 +1171,7 @@
Type:
Source:
@@ -1259,7 +1259,7 @@
Type:
Source:
@@ -1345,7 +1345,7 @@
Type:
Source:
@@ -1429,7 +1429,7 @@
Type:
Source:
@@ -1522,7 +1522,7 @@
Type:
Source:
@@ -1602,7 +1602,7 @@
Type:
Source:
@@ -1688,7 +1688,7 @@
Type:
Source:
@@ -1771,7 +1771,7 @@
Type:
Source:
@@ -1856,7 +1856,7 @@
Type:
Source:
@@ -1934,7 +1934,7 @@
Type:
Source:
@@ -2017,7 +2017,7 @@
Type:
Source:
@@ -2100,7 +2100,7 @@
Type:
Source:
@@ -2182,7 +2182,7 @@
Type:
Source:
@@ -2264,7 +2264,7 @@
Type:
Source:
@@ -2346,7 +2346,7 @@
Type:
Source:
@@ -2428,7 +2428,7 @@
Type:
Source:
@@ -2458,11 +2458,14 @@

- The default options for the Cesium map used in the CatalogSearchView for searching the data -catalog. Add custom layers, a default home position (for example, zoom into your area of research), -and enable/disable map widgets. See MapConfig for the full suite of options. Keep the `CesiumGeohash` -layer here in order to show the search results in the map as geohash boxes. Use any satellite imagery -layer of your choice, such as a self-hosted imagery layer or hosted on Cesium Ion. + The default options for the Cesium map used in the +CatalogSearchView for searching the data catalog. Add custom +layers, a default home position (for example, zoom into your area of +research), and enable/disable map widgets. See MapConfig for +the full suite of options. Use any satellite imagery layer of your +choice, such as a self-hosted imagery layer or hosted on Cesium Ion. If +no layer of type `CesiumGeohash` is included, a geohash layer will be +added automatically in order to show the search results on the map.
@@ -2513,7 +2516,7 @@

Type:
Source:
@@ -2595,7 +2598,7 @@
Type:
Source:
@@ -2680,7 +2683,7 @@
Type:
Source:
@@ -2762,7 +2765,7 @@
Type:
Source:
@@ -2852,7 +2855,7 @@
Type:
Source:
@@ -2937,7 +2940,7 @@
Type:
Source:
@@ -3022,7 +3025,7 @@
Type:
Source:
@@ -3106,7 +3109,7 @@
Type:
Source:
@@ -3194,7 +3197,7 @@
Type:
Source:
@@ -3276,7 +3279,7 @@
Type:
Source:
@@ -3359,7 +3362,7 @@
Type:
Source:
@@ -3442,7 +3445,7 @@
Type:
Source:
@@ -3534,7 +3537,7 @@
Type:
Source:
@@ -3626,7 +3629,7 @@
Type:
Source:
@@ -3704,7 +3707,7 @@
Type:
Source:
@@ -3788,7 +3791,7 @@
Type:
Source:
@@ -3875,7 +3878,7 @@
Type:
Source:
@@ -3965,7 +3968,7 @@
Type:
Source:
@@ -4054,7 +4057,7 @@
Type:
Source:
@@ -4145,7 +4148,7 @@
Type:
Source:
@@ -4244,7 +4247,7 @@
Type:
Source:
@@ -4329,7 +4332,7 @@
Type:
Source:
@@ -4410,7 +4413,7 @@
Type:
Source:
@@ -4500,7 +4503,7 @@
Type:
Source:
@@ -4523,6 +4526,87 @@
Example
+

+ + + + + description :string +

+ + + + +
+ The default page description. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -4585,7 +4669,7 @@
Type:
Source:
@@ -4668,7 +4752,7 @@

Type:
Source:
@@ -4752,7 +4836,7 @@
Type:
Source:
@@ -4835,7 +4919,7 @@
Type:
Source:
@@ -4919,7 +5003,7 @@
Type:
Source:
@@ -5002,7 +5086,7 @@
Type:
Source:
@@ -5086,7 +5170,7 @@
Type:
Source:
@@ -5170,7 +5254,7 @@
Type:
Source:
@@ -5253,7 +5337,7 @@
Type:
Source:
@@ -5337,7 +5421,7 @@
Type:
Source:
@@ -5420,7 +5504,7 @@
Type:
Source:
@@ -5504,7 +5588,7 @@
Type:
Source:
@@ -5590,7 +5674,7 @@
Type:
Source:
@@ -5673,7 +5757,7 @@
Type:
Source:
@@ -5759,7 +5843,7 @@
Type:
Source:
@@ -5849,7 +5933,7 @@
Type:
Source:
@@ -5943,7 +6027,7 @@
Type:
Source:
@@ -6021,7 +6105,7 @@
Type:
Source:
@@ -6099,7 +6183,7 @@
Type:
Source:
@@ -6186,7 +6270,7 @@
Type:
Source:
@@ -6272,7 +6356,7 @@
Type:
Source:
@@ -6356,7 +6440,7 @@
Type:
Source:
@@ -6807,7 +6891,7 @@
Properties:
Source:
@@ -6919,7 +7003,7 @@
Type:
Source:
@@ -7093,7 +7177,7 @@
Properties:
Source:
@@ -7184,7 +7268,7 @@
Type:
Source:
@@ -7269,7 +7353,7 @@
Type:
Source:
@@ -7356,7 +7440,7 @@
Type:
Source:
@@ -7439,7 +7523,7 @@
Type:
Source:
@@ -7525,7 +7609,7 @@
Type:
Source:
@@ -7613,7 +7697,7 @@
Type:
Source:
@@ -7701,7 +7785,7 @@
Type:
Source:
@@ -7787,7 +7871,7 @@
Type:
Source:
@@ -7872,7 +7956,7 @@
Type:
Source:
@@ -7953,7 +8037,7 @@
Type:
Source:
@@ -8038,7 +8122,7 @@
Type:
Source:
@@ -8122,7 +8206,7 @@
Type:
Source:
@@ -8206,7 +8290,7 @@
Type:
Source:
@@ -8286,7 +8370,7 @@
Type:
Source:
@@ -8369,7 +8453,7 @@
Type:
Source:
@@ -8455,7 +8539,7 @@
Type:
Source:
@@ -8544,7 +8628,7 @@
Type:
Source:
@@ -8624,7 +8708,7 @@
Type:
Source:
@@ -8707,7 +8791,7 @@
Type:
Source:
@@ -8793,7 +8877,7 @@
Type:
Source:
@@ -8873,7 +8957,7 @@
Type:
Source:
@@ -8969,7 +9053,7 @@
Type:
Source:
@@ -9057,7 +9141,7 @@
Type:
Source:
@@ -9145,7 +9229,7 @@
Type:
Source:
@@ -9233,7 +9317,7 @@
Type:
Source:
@@ -9321,7 +9405,7 @@
Type:
Source:
@@ -9409,7 +9493,7 @@
Type:
Source:
@@ -9488,7 +9572,7 @@
Type:
Source:
@@ -9572,7 +9656,7 @@
Type:
Source:
@@ -9651,7 +9735,7 @@
Type:
Source:
@@ -9737,7 +9821,7 @@
Type:
Source:
@@ -9828,7 +9912,7 @@
Type:
Source:
@@ -9911,7 +9995,7 @@
Type:
Source:
@@ -9994,7 +10078,7 @@
Type:
Source:
@@ -10077,7 +10161,7 @@
Type:
Source:
@@ -10160,7 +10244,7 @@
Type:
Source:
@@ -10243,7 +10327,7 @@
Type:
Source:
@@ -10326,7 +10410,7 @@
Type:
Source:
@@ -10407,7 +10491,7 @@
Type:
Source:
@@ -10490,7 +10574,7 @@
Type:
Source:
@@ -10573,7 +10657,7 @@
Type:
Source:
@@ -10651,7 +10735,7 @@
Type:
Source:
@@ -10736,7 +10820,7 @@
Type:
Source:
@@ -10823,7 +10907,7 @@
Type:
Source:
@@ -10908,7 +10992,7 @@
Type:
Source:
@@ -10989,7 +11073,7 @@
Type:
Source:
@@ -11072,7 +11156,7 @@
Type:
Source:
@@ -11152,7 +11236,7 @@
Type:
Source:
@@ -11237,7 +11321,7 @@
Type:
Source:
@@ -11322,7 +11406,7 @@
Type:
Source:
@@ -11402,7 +11486,7 @@
Type:
Source:
@@ -11768,7 +11852,7 @@
Properties:
Source:
@@ -11868,7 +11952,7 @@
Type:
Source:
@@ -11947,7 +12031,7 @@
Type:
Source:
@@ -12026,7 +12110,7 @@
Type:
Source:
@@ -12104,7 +12188,7 @@
Type:
Source:
@@ -12350,7 +12434,7 @@
Properties:
Source:
@@ -12436,7 +12520,7 @@
Type:
Source:
@@ -12523,7 +12607,7 @@
Type:
Source:
@@ -12609,7 +12693,7 @@
Type:
Source:
@@ -12696,7 +12780,7 @@
Type:
Source:
@@ -12783,7 +12867,7 @@
Type:
Source:
@@ -12872,7 +12956,7 @@
Type:
Source:
@@ -12956,7 +13040,7 @@
Type:
Source:
@@ -13035,7 +13119,7 @@
Type:
Source:
@@ -13119,7 +13203,7 @@
Type:
Source:
@@ -13189,7 +13273,7 @@

Source:
@@ -13259,7 +13343,7 @@

Source:
@@ -13343,7 +13427,7 @@

Type:
Source:
@@ -13423,7 +13507,7 @@
Type:
Source:
@@ -13514,7 +13598,7 @@
Type:
Source:
@@ -13616,7 +13700,7 @@
Type:
Source:
@@ -13703,7 +13787,7 @@
Type:
Source:
@@ -13783,7 +13867,7 @@
Type:
Source:
@@ -13871,7 +13955,7 @@
Type:
Source:
@@ -13943,7 +14027,7 @@

Source:
@@ -14021,7 +14105,7 @@

Type:
Source:
@@ -14107,7 +14191,7 @@
Type:
Source:
@@ -14190,7 +14274,7 @@
Type:
Source:
@@ -14273,7 +14357,7 @@
Type:
Source:
@@ -14359,7 +14443,7 @@
Type:
Source:
@@ -14442,7 +14526,7 @@
Type:
Source:
@@ -14528,7 +14612,7 @@
Type:
Source:
@@ -14611,7 +14695,7 @@
Type:
Source:
@@ -14690,7 +14774,7 @@
Type:
Source:
@@ -14769,7 +14853,7 @@
Type:
Source:
@@ -14848,7 +14932,7 @@
Type:
Source:
@@ -14927,7 +15011,7 @@
Type:
Source:
@@ -15010,7 +15094,7 @@
Type:
Source:
@@ -15100,7 +15184,7 @@
Type:
Source:
@@ -15186,7 +15270,7 @@
Type:
Source:
@@ -15272,7 +15356,7 @@
Type:
Source:
@@ -15359,7 +15443,7 @@
Type:
Source:
@@ -15451,7 +15535,7 @@
Type:
Source:
@@ -15538,7 +15622,7 @@
Type:
Source:
@@ -15783,7 +15867,7 @@
Type:
Source:
@@ -15870,7 +15954,7 @@
Type:
Source:
@@ -15965,7 +16049,7 @@
Type:
Source:
@@ -16049,7 +16133,7 @@
Type:
Source:
@@ -16129,7 +16213,7 @@
Type:
Source:
@@ -16316,7 +16400,7 @@
Properties:
Source:
diff --git a/docs/docs/AppModel.html b/docs/docs/AppModel.html index 0b94bd8f9..1db8554b7 100644 --- a/docs/docs/AppModel.html +++ b/docs/docs/AppModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -324,7 +324,7 @@
Parameters:
Source:
@@ -418,7 +418,7 @@

Source:
@@ -591,7 +591,7 @@

Parameters:
Source:
@@ -705,7 +705,7 @@

Source:
@@ -851,7 +851,201 @@

Parameters:
Source:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + resetDescription() +

+ + + + + + +
+ Reset the web document's description to the default +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + resetTitle() +

+ + + + + + +
+ Reset the web document's title to the default +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -947,7 +1141,7 @@

Source:
diff --git a/docs/docs/AppView.html b/docs/docs/AppView.html index eb30450d4..0ade43f15 100644 --- a/docs/docs/AppView.html +++ b/docs/docs/AppView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -239,7 +239,7 @@
Type:
Source:
@@ -261,6 +261,197 @@
Type:

Methods

+ + + + + + +

+ + + + + changeDescription() +

+ + + + + + +
+ Change the web document's description +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + changeTitle() +

+ + + + + + +
+ Change the web document's title +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -327,7 +518,7 @@

Source:
@@ -421,7 +612,7 @@

Source:
@@ -533,7 +724,7 @@

Source:
@@ -628,7 +819,7 @@

Source:
@@ -725,7 +916,7 @@

Source:
@@ -830,7 +1021,7 @@

Source:
@@ -871,7 +1062,7 @@

- showAlert(options) + showAlert(options) → {Element}

@@ -1260,7 +1451,7 @@
Properties:
Source:
@@ -1285,6 +1476,28 @@
Properties:
+
Returns:
+ + +
+ The alert element +
+ + + +
+
+ Type +
+
+ +Element + + +
+
+ + @@ -1716,7 +1929,7 @@
Properties
Source:
@@ -1810,7 +2023,7 @@

Source:
@@ -1907,7 +2120,7 @@

Source:
diff --git a/docs/docs/AssetColor.html b/docs/docs/AssetColor.html index a22806680..8d05512a8 100644 --- a/docs/docs/AssetColor.html +++ b/docs/docs/AssetColor.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -373,7 +373,7 @@
Properties:
Source:
@@ -479,12 +479,12 @@

Methods

-

- +

+ - hexToRGB(hex) → {Color} + hexToRGBA(hex) → {Color}

@@ -493,7 +493,7 @@

- Converts hex color values to RGB values between 0 and 1 + Converts an 6 to 8 digit hex color value to RGBA values between 0 and 1
@@ -545,7 +545,7 @@

Parameters:
- a color in hexadecimal format + A hex color code, e.g. '#44A96A' or '#44A96A88' @@ -562,6 +562,9 @@
Parameters:
+
Since:
+
  • 2.25.0
+ @@ -586,7 +589,7 @@
Parameters:
Source:
@@ -615,7 +618,7 @@
Returns:
- a color in RGB format + - The RGBA values of the color
@@ -764,7 +767,7 @@
Parameters:
Source:
@@ -974,6 +977,44 @@
Properties:
+ + + + alpha + + + + + +number + + + + + + + + + <optional>
+ + + + + + + + + + 1 + + + + + A number between 0 and 1 indicating the opacity of +this color. + + + diff --git a/docs/docs/AssetColorPalette.html b/docs/docs/AssetColorPalette.html index 208158c0b..e98b7d25d 100644 --- a/docs/docs/AssetColorPalette.html +++ b/docs/docs/AssetColorPalette.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,10 +48,10 @@

Class: AssetColorPalette

AssetColorPalette()

-
An AssetColorPalette Model represents a color scale that is mapped to -some attribute of a Map Asset. For vector assets, like 3D tilesets, this palette is -used to conditionally color features on a map. For any type of asset, it can be -used to generate a legend.
+
An AssetColorPalette Model represents a color scale that is +mapped to some attribute of a Map Asset. For vector assets, like 3D +tilesets, this palette is used to conditionally color features on a map. +For any type of asset, it can be used to generate a legend.
@@ -126,7 +126,7 @@

Source:
@@ -285,16 +285,17 @@

Properties:
Set to 'categorical', 'continuous', or -'classified'. NOTE: Currently only categorical and continuous palettes are -supported. -- Categorical: the color conditions will be interpreted such that one color - represents a single value (e.g. a discrete palette). -- Continuous: each color in the colors attribute will represent a point in a - gradient. The point in the gradient will be associated with the number set - with the color, and numbers in between points will be set to an interpolated - color. -- Classified: the numbers set in the colors attribute will be interpreted as - maximums. Continuous properties will be forced into discrete bins. +'classified'. NOTE: Currently only categorical and continuous palettes +are supported. +- Categorical: the color conditions will be interpreted such that one + color represents a single value (e.g. a discrete palette). +- Continuous: each color in the colors attribute will represent a point + in a gradient. The point in the gradient will be associated with the + number set with the color, and numbers in between points will be set + to an interpolated color. +- Classified: the numbers set in the colors attribute will be + interpreted as maximums. Continuous properties will be forced into + discrete bins. @@ -327,10 +328,10 @@
Properties:
- The name (ID) of the property in the asset layer's -attribute table to color the vector data by (or for imagery data that does not -have an attribute table, just the name of the attribute that these colors map -to). + The name (ID) of the property in the asset +layer's attribute table to color the vector data by (or for imagery +data that does not have an attribute table, just the name of the +attribute that these colors map to). @@ -367,8 +368,8 @@
Properties:
- A user-friendly name to display instead of -the actual property name. + A user-friendly name to display +instead of the actual property name. @@ -405,11 +406,90 @@
Properties:
- The colors to use in the -color palette, along with the conditions associated with each color (i.e. the -properties of the feature that must be true to use the given color.) . The last -color in the collection will always be treated as the default color - any -feature that doesn't match the other colors will be colored with this color. + The colors to use +in the color palette, along with the conditions associated with each +color (i.e. the properties of the feature that must be true to use the +given color.) . The last color in the collection will always be treated +as the default color - any feature that doesn't match the other colors +will be colored with this color. + + + + + + + minVal + + + + + +number + + + + + + + + + <optional>
+ + + + + + + + + + null + + + + + The minimum value of the property to +use in the color palette when the special value 'min' is used for the +value of a color. + + + + + + + maxVal + + + + + +number + + + + + + + + + <optional>
+ + + + + + + + + + null + + + + + The maximum value of the property to +use in the color palette when the special value 'max' is used for the +value of a color. @@ -448,7 +528,7 @@
Properties:
Source:
@@ -526,7 +606,7 @@
Type:
Source:
@@ -554,12 +634,12 @@

Methods

-

- +

+ - getColor(properties) → {AssetColor#Color} + getCategoricalColor(value) → {AssetColor#Color}

@@ -568,7 +648,7 @@

- Given properties of a feature, returns the color associated with that feature. + Get the color for a categorical color palette for a given value.
@@ -604,13 +684,16 @@

Parameters:
- properties + value -Object +Number +| + +string @@ -620,8 +703,7 @@
Parameters:
- The properties of the feature to get the color for. -(See the 'properties' attribute of Feature#defaults.) + The value to get the color for. @@ -662,7 +744,7 @@
Parameters:
Source:
@@ -691,8 +773,175 @@
Returns:
- The color associated with the given set of -properties. + The color associated with the given value. +
+ + + +
+
+ Type +
+
+ +AssetColor#Color + + +
+
+ + + + + + + + + + + + + +

+ + + + + getClassifiedColor(value) → {AssetColor#Color} +

+ + + + + + +
+ Get the color for a classified color palette for a given value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number +| + +string + + + + The value to get the color for.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The color for the given value.
@@ -715,6 +964,321 @@
Returns:
+ + + + + + +

+ + + + + getColor(properties) → {AssetColor#Color} +

+ + + + + + +
+ Given properties of a feature, returns the color associated with that +feature. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
properties + + +Object + + + + The properties of the feature to get the +color for. (See the 'properties' attribute of +Feature#defaults.)
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The color associated with the given set of +properties. +
+ + + +
+
+ Type +
+
+ +AssetColor#Color + + +
+
+ + + + + + + + + + + + + +

+ + + + + getContinuousColor(value) +

+ + + + + + +
+ Get the color for a continuous color palette for a given value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number +| + +string + + + + The value to get the color for.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -735,8 +1299,8 @@

- Gets the default color for the color palette, returns it as an object of RGB -intestines between 0 and 1. + Gets the default color for the color palette, returns it as an object +of RGB intestines between 0 and 1.
@@ -780,7 +1344,7 @@

Source:
@@ -916,8 +1480,8 @@

Parameters:
- The initial values of the -attributes, which will be set on the model. + The initial +values of the attributes, which will be set on the model. @@ -958,7 +1522,7 @@
Parameters:
Source:
@@ -1008,8 +1572,8 @@

- Given two colors, returns a color that is a linear interpolation between the -two colors. + Given two colors, returns a color that is a linear interpolation +between the two colors.
@@ -1107,7 +1671,8 @@

Parameters:
- The percentage of the way between the two colors, 0-1. + The percentage of the way between the two +colors, 0-1. @@ -1148,7 +1713,7 @@
Parameters:
Source:
diff --git a/docs/docs/AssetColors.html b/docs/docs/AssetColors.html index 590686110..2c699af53 100644 --- a/docs/docs/AssetColors.html +++ b/docs/docs/AssetColors.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -274,6 +274,270 @@

Methods

+

+ + + + + comparator() +

+ + + + + + +
+ Add custom sort functionality such that values are sorted +numerically, but keep the special value key words "min" and "max" at +the beginning or end of the collection, respectively. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getAttr(attr) → {Array} +

+ + + + + + +
+ For any attribute that exists in the models in this collection, return an +array of the values for that attribute. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + The attribute to get the values for.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + + + + + + + + +

@@ -333,7 +597,7 @@

Source:
diff --git a/docs/docs/BooleanFilter.html b/docs/docs/BooleanFilter.html index 7c0212eb6..90a10de23 100644 --- a/docs/docs/BooleanFilter.html +++ b/docs/docs/BooleanFilter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/BooleanFilterView.html b/docs/docs/BooleanFilterView.html index 40949f766..4c928fe17 100644 --- a/docs/docs/BooleanFilterView.html +++ b/docs/docs/BooleanFilterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -120,7 +120,7 @@

Source:
@@ -230,7 +230,7 @@

Type:
Source:
@@ -252,6 +252,96 @@
Type:

Methods

+ + + + + + +

+ + + + + events() +

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -316,7 +406,7 @@

Source:
@@ -410,7 +500,7 @@

Source:
diff --git a/docs/docs/CatalogSearchView.html b/docs/docs/CatalogSearchView.html index f5e6bb84a..1193a06b8 100644 --- a/docs/docs/CatalogSearchView.html +++ b/docs/docs/CatalogSearchView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,10 +48,21 @@

Class: CatalogSearchView

CatalogSearchView()

-
CatalogSearchView
+
The data catalog search view for the repository. This view +displays a Cesium map, search results, and search filters.
+ + +
+

Screenshot

+ + + +
+ + @@ -123,7 +134,7 @@

Source:
@@ -184,19 +195,19 @@

Members

-

- +

+ - className :string + bodyClass :string

- The HTML classes to use for this view's element + The CSS class to add to the body element when this view is rendered.
@@ -219,6 +230,9 @@

Type:
+ +
Since:
+
  • 2.22.0
@@ -239,12 +253,17 @@
Type:
+ +
Default Value:
+
    +
  • "catalog-search-body",
  • +
Source:
@@ -262,19 +281,19 @@
Type:
-

- +

+ - events :Object + className :string

- The events this view will listen to and the associated function to call. + The HTML classes to use for this view's element
@@ -283,7 +302,7 @@

Type:
+ + + + + + + + +

+ + + + + sorterView :SorterView +

+ + + + +
+ The view that handles sorting the search results. The render method +will attach the sorter view to the +CatalogSearchView#sorterContainer element and will add the view +reference to this property. +
+ + + +
Type:
+ + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + tagName :string +

+ + + + +
+ The HTML tag to use for this view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + template :underscore.template +

+ + + + +
+ The template to use for this view's element +
+ + + +
Type:
+
    +
  • + +underscore.template + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + titleContainer :string +

+ + + + +
+ The query selector for the title container +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + toggleFiltersButton :string +

+ + + + +
+ The query selector for the button that is used to either show or hide +the filters. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + toggleFiltersLabel :string +

+ + + + +
+ The query selector for the label that is used to describe the +CatalogSearchView#toggleFiltersButton. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "#toggle-map-label"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + toggleMapButton :string +

+ + + + +
+ The query selector for button that is used to either show or hide the +map. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + toggleMapLabel :string +

+ + + + +
+ The query selector for the label that is used to describe the +CatalogSearchView#toggleMapButton. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "#toggle-map-label"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + type :string +

+ + + + +
+ The type of View this is +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + addLinkedData() +

+ + + + + + +
+ Linked Data Object for appending the jsonld into the browser DOM +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + createMap() +

+ + + + + + +
+ Create the models and views associated with the map and map search +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + createSearchResults() +

+ + + + + + +
+ Creates the SearchResultsView and saves a reference to the SolrResults +collection +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + events() +

+ + + + + + +
+ The events this view will listen to and the associated function to +call. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + initialize(options) +

+ + + + + + +
+ Initialize the view. In addition to the options described below, any +option that is available in the +MapSearchFiltersConnector#initialize method can be passed to +this view, such as Map, SolrResult, and FilterGroup models, and whether +to create a geohash layer or spatial filter if they are not present. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +Object + + + + The options for this view. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
initialQuery + + +string + + + + + + <optional>
+ + + + + +
The initial text query to run +when the view is rendered.
model + + +MapSearchFiltersConnector + + + + + + <optional>
+ + + + + +
A +MapSearchFiltersConnector model to use for this view. If not provided, +a new one will be created. If one is provided, then other options that +would be passed to the MapSearchFiltersConnector model will be ignored +(such as map, searchResults, filterGroups, catalogSearch, etc.)
+ +
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + onClose() +

+ + + + + + +
+ Tasks to perform when the view is closed +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + render() +

+ + + + + + +
+ Renders the view +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + renderComponents() +

+ + + + + + +
+ Calls other methods that insert the sub-views into the DOM and render +them. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1531,12 +3293,12 @@
Parameters:
-

- +

+ - createMap() + renderError()

@@ -1545,7 +3307,104 @@

- Create the models and views associated with the map and map search + Indicates that there was a problem rendering this view. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + renderFilters() +

+ + + + + + +
+ Renders the search filters
@@ -1592,7 +3451,7 @@

Source:
@@ -1628,12 +3487,12 @@

-

- +

+ - createSearchResults() + renderMap()

@@ -1642,7 +3501,7 @@

- Creates the SearchResultsView and saves a reference to the SolrResults collection + Renders the Cesium map with a geohash layer
@@ -1689,7 +3548,7 @@

Source:
@@ -1725,12 +3584,12 @@

-

- +

+ - renderFilters() + renderPager()

@@ -1739,7 +3598,7 @@

- Renders the search filters + Creates a PagerView and adds it to the page.
@@ -1786,7 +3645,7 @@

Source:
@@ -1822,12 +3681,12 @@

-

- +

+ - renderMap() + renderSearchResults()

@@ -1836,7 +3695,7 @@

- Renders the Cesium map with a geohash layer + Renders the search result list
@@ -1883,7 +3742,7 @@

Source:
@@ -1919,12 +3778,12 @@

-

- +

+ - renderPager() + renderSorter()

@@ -1933,7 +3792,7 @@

- Creates a PagerView and adds it to the page. + Creates a SorterView and adds it to the page.
@@ -1980,7 +3839,7 @@

Source:
@@ -2016,12 +3875,12 @@

-

- +

+ - renderSearchResults() + renderTitle()

@@ -2030,7 +3889,8 @@

- Renders the search result list + Updates the view title using the +CatalogSearchView#searchResults data.
@@ -2077,7 +3937,7 @@

Source:
@@ -2113,12 +3973,12 @@

-

- +

+ - renderSorter() + setMapVisibility()

@@ -2127,7 +3987,7 @@

- Creates a SorterView and adds it to the page. + Sets the search mode (map or list)
@@ -2174,7 +4034,7 @@

Source:
@@ -2210,12 +4070,12 @@

-

- +

+ - renderTitle() + setupView()

@@ -2224,7 +4084,7 @@

- Updates the view title using the CatalogSearchView#searchResults data. + Sets up the basic components of this view
@@ -2271,7 +4131,7 @@

Source:
@@ -2307,12 +4167,12 @@

-

- +

+ - setMode() + titleTemplate(start, end, numFound) → {string}

@@ -2321,7 +4181,7 @@

- Sets the search mode (map or list) + Constructs an HTML string of the title of this view
@@ -2332,6 +4192,101 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
start + + +number + + + +
end + + +number + + + +
numFound + + +number + + + +
+ + @@ -2368,7 +4323,7 @@

Source:
@@ -2393,6 +4348,24 @@

+

Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + @@ -2404,12 +4377,12 @@

-

- +

+ - setupSearch() + toggleFiltersVisibility(show)

@@ -2418,7 +4391,7 @@

- Creates the Filter models and SolrResults that will be used for searches + Shows or hide the filters
@@ -2429,6 +4402,57 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
show + + +boolean + + + + Optionally provide the desired choice of +whether the filters should be shown (true) or hidden (false). If not +provided, the opposite of the current mode will be used.
+ + @@ -2439,7 +4463,7 @@

Since:
-
  • 2.22.0
+
  • 2.25.0
@@ -2465,7 +4489,7 @@

Source:
@@ -2501,12 +4525,12 @@

-

- +

+ - setupView() + toggleMapFilter(newSetting)

@@ -2515,7 +4539,7 @@

- Sets up the basic components of this view + Toggles the map filter on and off
@@ -2526,6 +4550,58 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
newSetting + + +boolean + + + + Optionally provide the desired new mode +to switch to. true = limit search to map area, false = do not limit +search to map area. If not provided, the opposite of the current mode +will be used.
+ + @@ -2535,6 +4611,9 @@

+
Since:
+
  • 2.25.0
+ @@ -2559,7 +4638,7 @@

Source:
@@ -2595,12 +4674,12 @@

-

- +

+ - titleTemplate(start, end, numFound) → {string} + toggleMapVisibility(show)

@@ -2609,7 +4688,7 @@

- Constructs an HTML string of the title of this view + Show or hide the map
@@ -2645,13 +4724,13 @@

Parameters:
- start + show -number +boolean @@ -2661,58 +4740,113 @@
Parameters:
- + Optionally provide the desired choice of +whether the filters should be shown (true) or hidden (false). If not +provided, the opposite of the current mode will be used. (Set to true +to show map, false to hide it.) + + - - - end - - - - -number - - - - +
- - + +
Since:
+
  • 2.25.0
+ - - - numFound - + - - - -number + + - - + - + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + - - + + + +

+ + + + + updateToggleFiltersLabel() +

+ - - + + + +
+ Change the content of the filters toggle label to indicate whether +clicking the button will show or hide the filters. +
+ + + + + + + @@ -2725,7 +4859,7 @@
Parameters:
Since:
-
  • 2.22.0
+
  • 2.25.0
@@ -2751,7 +4885,7 @@
Parameters:
Source:
@@ -2776,24 +4910,6 @@
Parameters:
-
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - @@ -2805,12 +4921,12 @@
Returns:
-

- +

+ - toggleMode() + updateToggleMapLabel()

@@ -2819,7 +4935,8 @@

- Toggles between map and list search mode + Change the content of the map toggle label to indicate whether +clicking the button will show or hide the map.
@@ -2840,7 +4957,7 @@

Since:
-
  • 2.22.0
+
  • 2.25.0
@@ -2866,7 +4983,7 @@

Source:
diff --git a/docs/docs/Cesium3DTileset.html b/docs/docs/Cesium3DTileset.html index 4d35a948a..4008f06c5 100644 --- a/docs/docs/Cesium3DTileset.html +++ b/docs/docs/Cesium3DTileset.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -693,7 +693,7 @@
Parameters:
Source:
@@ -751,6 +751,183 @@
Returns:
+

+ + + + + containsFeature(feature) → {boolean} +

+ + + + + + +
+ Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the given feature is part of the +selectedFeatures collection in this asset +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + +

@@ -863,7 +1040,7 @@
Parameters:
Source:
@@ -915,7 +1092,7 @@

Given a feature object from a Feature model, checks if it is part of the selectedFeatures collection. See featureObject property from -Feature#defaults. +Feature#defaults. For vector and 3d tile models only.
@@ -1014,7 +1191,7 @@

Parameters:
Source:
@@ -1187,7 +1364,7 @@
Parameters:
Source:
@@ -1360,7 +1537,7 @@
Parameters:
Source:
@@ -1537,7 +1714,7 @@
Parameters:
Source:
@@ -1740,7 +1917,7 @@
Parameters:
Source:
@@ -1858,7 +2035,7 @@

Source:
@@ -1899,7 +2076,644 @@

Returns:
-Promise +Promise + + +
+
+ + + + + + + + + + + + + +

+ + + + + getCesiumModelFromFeature(feature) → {Cesium3DTileset} +

+ + + + + + +
+ Return the Cesium3DTileset model for a feature from a Cesium 3D tileset +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTileFeature + + + + A Cesium 3D Tile feature
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The model +
+ + + +
+
+ Type +
+
+ +Cesium3DTileset + + +
+
+ + + + + + + + + + + + + +

+ + + + + getColor(properties) → {AssetColor#Color} +

+ + + + + + +
+ Given properties of a Feature model from this MapAsset, returns the color +associated with that feature. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
properties + + +Object + + + + The properties of the feature to get the color for; +An object containing key-value mapping of property names to properties. (See +the 'properties' attribute of Feature#defaults.)
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The color associated with the given set of +properties. +
+ + + +
+
+ Type +
+
+ +AssetColor#Color + + +
+
+ + + + + + + + + + + + + +

+ + + + + getColorFunction() → {function} +

+ + + + + + +
+ Creates a function that takes a Cesium3DTileFeature (see +https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileFeature.html) and +returns a Cesium color based on the colorPalette property set on this model. +The returned function is designed to be used as the evaluateColor function that +is set in the color property of a Cesium3DTileStyle StyleExpression. See +https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileStyle.html#color +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ A Cesium 3dTile evaluate color function +
+ + + +
+
+ Type +
+
+ +function + + +
+
+ + + + + + + + + + + + + +

+ + + + + getFeatureAttributes(feature) → {Object} +

+ + + + + + +
+ Given a feature object from a Feature model, returns the attributes +needed to create a Feature model. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with properties, mapAsset, featureID, featureObject, +and label properties. Returns null if the feature is not the correct type +for this asset model. +
+ + + +
+
+ Type +
+
+ +Object
@@ -1917,12 +2731,12 @@
Returns:
-

- +

+ - getColor(properties) → {AssetColor#Color} + getIDFromFeature(feature) → {string}

@@ -1931,8 +2745,7 @@

- Given properties of a Feature model from this MapAsset, returns the color -associated with that feature. + Return the ID used by Cesium for a feature from a Cesium 3D tileset
@@ -1968,13 +2781,13 @@

Parameters:
- properties + feature -Object +Cesium.Cesium3DTileFeature @@ -1984,9 +2797,7 @@
Parameters:
- The properties of the feature to get the color for; -An object containing key-value mapping of property names to properties. (See -the 'properties' attribute of Feature#defaults.) + A Cesium 3D Tile feature @@ -2003,12 +2814,10 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -2032,7 +2841,7 @@
Parameters:
Source:
@@ -2061,8 +2870,7 @@
Returns:
- The color associated with the given set of -properties. + The ID
@@ -2073,7 +2881,7 @@
Returns:
-AssetColor#Color +string
@@ -2091,12 +2899,12 @@
Returns:
-

- +

+ - getColorFunction() → {function} + getLabelFromFeature(feature) → {string}

@@ -2105,12 +2913,7 @@

- Creates a function that takes a Cesium3DTileFeature (see -https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileFeature.html) and -returns a Cesium color based on the colorPalette property set on this model. -The returned function is designed to be used as the evaluateColor function that -is set in the color property of a Cesium3DTileStyle StyleExpression. See -https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileStyle.html#color + Return the label for a feature from a Cesium 3D tileset
@@ -2121,6 +2924,55 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTileFeature + + + + A Cesium 3D Tile feature
+ + @@ -2130,6 +2982,9 @@

+
Since:
+
  • 2.25.0
+ @@ -2154,7 +3009,7 @@

Source:
@@ -2183,7 +3038,7 @@

Returns:
- A Cesium 3dTile evaluate color function + The label
@@ -2194,7 +3049,7 @@
Returns:
-function +string
@@ -2320,7 +3175,7 @@
Parameters:
Source:
@@ -2499,7 +3354,7 @@
Parameters:
Source:
@@ -2647,7 +3502,7 @@
Parameters:
Source:
@@ -2770,7 +3625,7 @@

Source:
@@ -2895,7 +3750,7 @@

Source:
@@ -3067,7 +3922,7 @@

Parameters:
Source:
@@ -3163,7 +4018,7 @@

Source:
@@ -3257,7 +4112,7 @@

Source:
@@ -3357,7 +4212,7 @@

Source:
@@ -3452,7 +4307,7 @@

Source:
@@ -3548,7 +4403,7 @@

Source:
@@ -3697,7 +4552,165 @@

Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + usesFeatureType(feature) → {boolean} +

+ + + + + + +
+ Checks if a feature from the map (a Cesium object) is the type of +feature that this map asset model contains. For example, if a +Cesium3DTilesetFeature is passed to this function, this function +will return true if it is a Cesium3DTileset model, and false if it +is a CesiumVectorData model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity + + + +
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -3722,6 +4735,29 @@
Parameters:
+
Returns:
+ + +
+ true if the feature is an instance of the feature +type set on the asset model, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -3796,7 +4832,7 @@

Source:
diff --git a/docs/docs/CesiumGeohash.html b/docs/docs/CesiumGeohash.html index e8a92102b..08d9047c9 100644 --- a/docs/docs/CesiumGeohash.html +++ b/docs/docs/CesiumGeohash.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -123,7 +123,7 @@

Source:
@@ -163,7 +163,7 @@

Extends

@@ -241,7 +241,77 @@
Properties:
- geohashLevel + type + + + + + +'CesiumGeohash' + + + + + + + + + + The format of the data. + + + + + + + label + + + + + +string + + + + + + + + + + The label for the layer. + + + + + + + geohashes + + + + + +Geohashes + + + + + + + + + + The collection of geohashes to display +on the map. + + + + + + + opacity @@ -257,23 +327,114 @@
Properties:
- The level of geohash currently used by this Cesium Map Asset + The opacity of the layer. - geohashCounts + colorPalette -Array.<number> -| +AssetColorPalette + + + + + + + + + + The color palette for the +layer. + + + + + + + outlineColor + + + + + +AssetColor + + + + + + + + + + The outline color for the layer. + + + + + + + highlightColor + + + + + +AssetColor + + + + + + + + + + The color to use for features +that are selected/highlighted. + + + + + + + showLabels + + + + + +boolean + + + + + + + + + + Whether to show labels for the layer. + + + + + + + maxGeoHashes + -Array.<string> + + + +number @@ -283,7 +444,10 @@
Properties:
- An array of geohash strings followed by their associated count. e.g. ["a", 123, "f", 8] + The maximum number of geohashes to +render at a time for performance reasons. If the number of geohashes +exceeds this number, then the precision will be decreased until the +number of geohashes is less than or equal to this number. @@ -304,7 +468,7 @@
Properties:
Overrides:
@@ -327,7 +491,7 @@
Properties:
Source:
@@ -385,7 +549,7 @@
Type:
Inherited From:
@@ -410,7 +574,7 @@
Type:
Source:
@@ -555,7 +719,7 @@
Parameters:
Source:
@@ -613,12 +777,12 @@
Returns:
-

- +

+ - featureIsSelected(feature) → {boolean} + colorForEntity(entity) → {Cesium.Color|null}

@@ -627,9 +791,8 @@

- Given a feature object from a Feature model, checks if it is part of the -selectedFeatures collection. See featureObject property from -Feature#defaults. + Return the color for a feature based on the colorPalette and filters +attributes.
@@ -665,13 +828,13 @@

Parameters:
- feature + entity -* +Cesium.Entity @@ -681,8 +844,7 @@
Parameters:
- An object that a Map widget uses to represent this feature -in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature + A Cesium Entity @@ -699,11 +861,14 @@
Parameters:
+
Since:
+
  • 2.25.0
+
Inherited From:
@@ -728,7 +893,7 @@
Parameters:
Source:
@@ -757,8 +922,8 @@
Returns:
- Returns true if the given feature is part of the -selectedFeatures collection in this asset + A Cesium Color or null if the color is +invalid or alpha is 0
@@ -769,7 +934,10 @@
Returns:
-boolean +Cesium.Color +| + +null
@@ -787,12 +955,12 @@
Returns:
-

- +

+ - featureIsVisible(properties) → {boolean} + colorToCesiumColor(color) → {Cesium.Color|null}

@@ -801,8 +969,7 @@

- This function checks whether a feature from the MapAsset is visible on the map -based on the properties of the feature and the MapAsset's filter settings. + Covert a Color model to a Cesium Color
@@ -838,13 +1005,13 @@

Parameters:
- properties + color -Object +Color @@ -854,8 +1021,7 @@
Parameters:
- The properties of the feature to be filtered. (See -the 'properties' attribute of Feature#defaults.) + A Color model @@ -872,11 +1038,14 @@
Parameters:
+
Since:
+
  • 2.25.0
+
Inherited From:
@@ -901,7 +1070,7 @@
Parameters:
Source:
@@ -930,9 +1099,8 @@
Returns:
- Returns true if the feature passes all the filters, or if -there are no filters set for this MapAsset. Returns false if the feature fails -any of the filters. + A Cesium Color or null if the color is +invalid
@@ -943,7 +1111,10 @@
Returns:
-boolean +Cesium.Color +| + +null
@@ -961,12 +1132,12 @@
Returns:
-

- +

+ - fetchIcon(pid) + containsFeature(feature) → {boolean}

@@ -975,8 +1146,9 @@

- Fetches an SVG given a pid, sanitizes it, then updates the model's icon -attribute with the new and SVG string (after sanitizing it) + Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only.
@@ -1012,13 +1184,13 @@

Parameters:
- pid + feature -string +* @@ -1028,7 +1200,8 @@
Parameters:
- + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature @@ -1045,11 +1218,14 @@
Parameters:
+
Since:
+
  • 2.25.0
+
Inherited From:
@@ -1074,7 +1250,7 @@
Parameters:
Source:
@@ -1099,6 +1275,29 @@
Parameters:
+
Returns:
+ + +
+ Returns true if the given feature is part of the +selectedFeatures collection in this asset +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -1110,12 +1309,12 @@
Parameters:
-

- +

+ - formatDateProperty(config, properties) → {string} + createCesiumModel(recreateopt)

@@ -1124,8 +1323,10 @@

- Given a definition for a new date property, and the properties that already -exist on a specific feature, returns a new string with the formatted date. + Creates a Cesium.DataSource model and sets it to this model's +'cesiumModel' attribute. This cesiumModel contains all the +information required for Cesium to render the vector data. See +https://cesium.com/learn/cesiumjs/ref-doc/DataSource.html?classFilter=DataSource
@@ -1149,8 +1350,12 @@

Parameters:
Type + Attributes + + Default + Description @@ -1161,48 +1366,41 @@
Parameters:
- config + recreate -MapConfig#CustomDateProperty +Boolean - - - - An object that defines the new -date property to create - - - - - - - properties - - - - + + + <optional>
-Object + + + - - + + + false + + - key-value pairs representing existing properties in -a Feature + Set recreate to true to force +the function create the Cesium Model again. Otherwise, if a cesium +model already exists, that is returned instead. @@ -1219,14 +1417,11 @@
Parameters:
-
Since:
-
  • 2.19.0
-
Inherited From:
@@ -1251,7 +1446,7 @@
Parameters:
Source:
@@ -1276,29 +1471,6 @@
Parameters:
-
Returns:
- - -
- The value for the new date property, formatted as defined by -config, for the given feature -
- - - -
-
- Type -
-
- -string - - -
-
- - @@ -1310,12 +1482,12 @@
Returns:
-

- +

+ - formatStringProperty(config, properties) → {string} + featureIsSelected(feature) → {boolean}

@@ -1324,11 +1496,9 @@

- For a given set of Feature properties and a definition for a new sting -property, returns the value of the custom property. Note that since only static -strings are supported so far, this function essentially just returns the value -of config.value. This function exists to allow support of dynamic strings in -the future (e.g. combining strings from existing properties) + Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only.
@@ -1364,37 +1534,13 @@

Parameters:
- config - - - - - -MapConfig#CustomStringProperty - - - - - - - - - - The object the defines the new -custom property - - - - - - - properties + feature -Object +* @@ -1404,8 +1550,8 @@
Parameters:
- key-value pairs representing existing properties in -a Feature + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature @@ -1422,14 +1568,11 @@
Parameters:
-
Since:
-
  • 2.19.0
-
Inherited From:
@@ -1454,7 +1597,7 @@
Parameters:
Source:
@@ -1483,7 +1626,8 @@
Returns:
- The new string for the given Feature property + Returns true if the given feature is part of the +selectedFeatures collection in this asset
@@ -1494,7 +1638,7 @@
Returns:
-string +boolean
@@ -1512,12 +1656,12 @@
Returns:
-

- +

+ - getColor(properties) → {AssetColor#Color} + featureIsVisible(properties) → {boolean}

@@ -1526,8 +1670,8 @@

- Given properties of a Feature model from this MapAsset, returns the color -associated with that feature. + This function checks whether a feature from the MapAsset is visible on the map +based on the properties of the feature and the MapAsset's filter settings.
@@ -1579,8 +1723,7 @@

Parameters:
- The properties of the feature to get the color for; -An object containing key-value mapping of property names to properties. (See + The properties of the feature to be filtered. (See the 'properties' attribute of Feature#defaults.) @@ -1602,7 +1745,7 @@
Parameters:
Inherited From:
@@ -1627,7 +1770,7 @@
Parameters:
Source:
@@ -1656,8 +1799,9 @@
Returns:
- The color associated with the given set of -properties. + Returns true if the feature passes all the filters, or if +there are no filters set for this MapAsset. Returns false if the feature fails +any of the filters.
@@ -1668,7 +1812,7 @@
Returns:
-AssetColor#Color +boolean
@@ -1686,12 +1830,12 @@
Returns:
-

- +

+ - isSVG(str) → {Boolean} + fetchIcon(pid)

@@ -1700,7 +1844,8 @@

- Simple test to see if a string is an SVG + Fetches an SVG given a pid, sanitizes it, then updates the model's icon +attribute with the new and SVG string (after sanitizing it)
@@ -1736,7 +1881,7 @@

Parameters:
- str + pid @@ -1752,7 +1897,7 @@
Parameters:
- The string to check + @@ -1773,7 +1918,7 @@
Parameters:
Inherited From:
@@ -1798,7 +1943,7 @@
Parameters:
Source:
@@ -1823,29 +1968,6 @@
Parameters:
-
Returns:
- - -
- Returns true if the string starts with ``, regardless of case -
- - - -
-
- Type -
-
- -Boolean - - -
-
- - @@ -1857,12 +1979,12 @@
Returns:
-

- +

+ - isVisible() → {boolean} + formatDateProperty(config, properties) → {string}

@@ -1871,8 +1993,8 @@

- Checks that the visible attribute is set to true and that the opacity attribute -is greater than zero. If both conditions are met, returns true. + Given a definition for a new date property, and the properties that already +exist on a specific feature, returns a new string with the formatted date.
@@ -1883,6 +2005,80 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
config + + +MapConfig#CustomDateProperty + + + + An object that defines the new +date property to create
properties + + +Object + + + + key-value pairs representing existing properties in +a Feature
+ + @@ -1892,11 +2088,14 @@

+
Since:
+
  • 2.19.0
+
Inherited From:
@@ -1921,7 +2120,7 @@

Source:
@@ -1950,7 +2149,8 @@

Returns:
- Returns true if the MapAsset has opacity > 0 and is visible. + The value for the new date property, formatted as defined by +config, for the given feature
@@ -1961,7 +2161,7 @@
Returns:
-boolean +string
@@ -1979,12 +2179,12 @@
Returns:
-

- +

+ - resetStatus() + formatStringProperty(config, properties) → {string}

@@ -1993,8 +2193,11 @@

- Resets the Map Asset's status and statusDetails attributes to their default -values. + For a given set of Feature properties and a definition for a new sting +property, returns the value of the custom property. Note that since only static +strings are supported so far, this function essentially just returns the value +of config.value. This function exists to allow support of dynamic strings in +the future (e.g. combining strings from existing properties)
@@ -2005,6 +2208,80 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
config + + +MapConfig#CustomStringProperty + + + + The object the defines the new +custom property
properties + + +Object + + + + key-value pairs representing existing properties in +a Feature
+ + @@ -2015,13 +2292,13 @@

Since:
-
  • 2.21.0
+
  • 2.19.0
Inherited From:
@@ -2046,7 +2323,7 @@

Source:
@@ -2071,6 +2348,28 @@

+

Returns:
+ + +
+ The new string for the given Feature property +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + @@ -2082,12 +2381,12 @@

-

- +

+ - sanitizeIcon(icon, callback) + getBoundingSphere(dataSourceDisplay) → {Promise}

@@ -2096,7 +2395,9 @@

- Takes an SVG string and returns it with only the allowed tags and attributes + Waits for the model to be ready to display, then gets a Cesium Bounding Sphere +that can be used to navigate to view the full extent of the vector data. See +https://cesium.com/learn/cesiumjs/ref-doc/BoundingSphere.html.
@@ -2132,36 +2433,13 @@

Parameters:
- icon - - - - - -string - - - - - - - - - - The SVG icon string to sanitize - - - - - - - callback + dataSourceDisplay -function +Cesium.DataSourceDisplay @@ -2171,8 +2449,8 @@
Parameters:
- Function to call once the icon has been sanitized. -Will pass the sanitized icon string. + The data source display +attached to the CesiumWidget scene that this bounding sphere is for. Required. @@ -2193,7 +2471,7 @@
Parameters:
Inherited From:
@@ -2218,7 +2496,7 @@
Parameters:
Source:
@@ -2243,6 +2521,29 @@
Parameters:
+
Returns:
+ + +
+ Returns a promise that resolves to a Cesium Bounding Sphere +when ready +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + @@ -2254,12 +2555,12 @@
Parameters:
-

- +

+ - show() + getCesiumModelFromFeature(feature) → {Cesium.GeoJsonDataSource|Cesium.CzmlDataSource}

@@ -2268,8 +2569,8 @@

- Make sure the layer is visible. Sets visibility to true if false, and sets -opacity to 0.5 if it's less than 0.05. + Return the DataSource model for a feature from a Cesium DataSource +model
@@ -2280,6 +2581,55 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + @@ -2293,7 +2643,7 @@

Inherited From:
@@ -2318,7 +2668,7 @@

Source:
@@ -2343,6 +2693,31 @@

+

Returns:
+ + +
+ The model +
+ + + +
+
+ Type +
+
+ +Cesium.GeoJsonDataSource +| + +Cesium.CzmlDataSource + + +
+
+ + @@ -2354,12 +2729,12 @@

-

- +

+ - updateIcon(icon) + getColor(properties) → {AssetColor#Color}

@@ -2368,8 +2743,8 @@

- Sanitizes an SVG string and updates the model's 'icon' attribute the sanitized -string. Also sets the 'iconStatus' attribute to 'success'. + Given properties of a Feature model from this MapAsset, returns the color +associated with that feature.
@@ -2405,13 +2780,13 @@

Parameters:
- icon + properties -string +Object @@ -2421,7 +2796,9 @@
Parameters:
- An SVG string to use for the MapAsset icon + The properties of the feature to get the color for; +An object containing key-value mapping of property names to properties. (See +the 'properties' attribute of Feature#defaults.) @@ -2442,7 +2819,7 @@
Parameters:
Inherited From:
@@ -2467,7 +2844,7 @@
Parameters:
Source:
@@ -2492,18 +2869,3849 @@
Parameters:
+
Returns:
+ +
+ The color associated with the given set of +properties. +
- +
+
+ Type +
+
- +AssetColor#Color - - -

+

+
+ + + + + + + + + + + + + +

+ + + + + getEntityFromMapObject(mapObject) → {Cesium.Entity} +

+ + + + + + +
+ Try to find Entity object that comes from an object passed from the +Cesium map. This is useful when the map is clicked and the map +returns an object that may or may not be an Entity. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
mapObject + + +Object + + + + An object returned from the Cesium map
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - The Entity object if found, otherwise null. +
+ + + +
+
+ Type +
+
+ +Cesium.Entity + + +
+
+ + + + + + + + + + + + + +

+ + + + + getFeatureAttributes(feature) → {Object} +

+ + + + + + +
+ Given a feature object from a Feature model, returns the attributes +needed to create a Feature model. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with properties, mapAsset, featureID, featureObject, +and label properties. Returns null if the feature is not the correct type +for this asset model. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getIDFromFeature(feature) → {string} +

+ + + + + + +
+ Return the ID used by Cesium for a feature from a DataSource model +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The ID +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getLabelFromFeature(feature) → {string} +

+ + + + + + +
+ Return the label for a feature from a DataSource model +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The label +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getPropertiesFromFeature(feature) → {Object} +

+ + + + + + +
+ Given a feature from a Cesium Vector Data source, returns any properties that are set +on the feature, similar to an attributes table. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object containing key-value mapping of property names to +properties. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getSelectedStyles(entity) → {Object} +

+ + + + + + +
+ Return the styles for a selected feature +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object containing the styles for the feature +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getStyles(entity) → {Object} +

+ + + + + + +
+ Return the styles for a feature +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object containing the styles for the feature +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize(assetConfigopt) +

+ + + + + + +
+ Executed when a new CesiumVectorData model is created. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
assetConfig + + +MapConfig#MapAssetConfig + + + + + + <optional>
+ + + + + +
The initial values of the +attributes, which will be set on the model.
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + isSVG(str) → {Boolean} +

+ + + + + + +
+ Simple test to see if a string is an SVG +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + +string + + + + The string to check
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the string starts with ``, regardless of case +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + isVisible() → {boolean} +

+ + + + + + +
+ Checks that the visible attribute is set to true and that the opacity attribute +is greater than zero. If both conditions are met, returns true. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the MapAsset has opacity > 0 and is visible. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + resetStatus() +

+ + + + + + +
+ Resets the Map Asset's status and statusDetails attributes to their default +values. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.21.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + sanitizeIcon(icon, callback) +

+ + + + + + +
+ Takes an SVG string and returns it with only the allowed tags and attributes +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
icon + + +string + + + + The SVG icon string to sanitize
callback + + +function + + + + Function to call once the icon has been sanitized. +Will pass the sanitized icon string.
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setListeners() +

+ + + + + + +
+ Set listeners that update the cesium model when the backbone model is updated. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + show() +

+ + + + + + +
+ Make sure the layer is visible. Sets visibility to true if false, and sets +opacity to 0.5 if it's less than 0.05. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + styleBillboard(entity, styles) +

+ + + + + + +
+ Update the styles for a billboard entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + styleEntities(entities) +

+ + + + + + +
+ Update the styles for a set of entities +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entities + + +Array + + + + The entities to update
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + styleLabel(entity, styles) +

+ + + + + + +
+ Update the styles for a label entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + stylePoint(entity, styles) +

+ + + + + + +
+ Update the styles for a point entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + stylePolygon(entity, styles) +

+ + + + + + +
+ Update the styles for a polygon entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + stylePolyline(entity, styles) +

+ + + + + + +
+ Update the styles for a polyline entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateAppearance() +

+ + + + + + +
+ Updates the styles set on the cesiumModel object based on the colorPalette and +filters attributes. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateFeatureVisibility() +

+ + + + + + +
+ Shows or hides each feature from this Map Asset based on the filters. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateIcon(icon) +

+ + + + + + +
+ Sanitizes an SVG string and updates the model's 'icon' attribute the sanitized +string. Also sets the 'iconStatus' attribute to 'success'. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
icon + + +string + + + + An SVG string to use for the MapAsset icon
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + usesFeatureType(feature) → {boolean} +

+ + + + + + +
+ Checks if a feature from the map (a Cesium object) is the type of +feature that this map asset model contains. For example, if a +Cesium3DTilesetFeature is passed to this function, this function +will return true if it is a Cesium3DTileset model, and false if it +is a CesiumVectorData model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity + + + +
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ true if the feature is an instance of the feature +type set on the asset model, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + whenDisplayReady() → {Promise} +

+ + + + + + +
+ Checks that the map is ready to display this asset. The displayReady attribute +is updated by the Cesium map when the dataSourceDisplay is updated. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns a promise that resolves to this model when ready to +be displayed. +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + + + + +

@@ -2566,7 +6774,7 @@

Source:
@@ -2622,6 +6830,154 @@

Returns:
+

Type Definitions

+ + + +

+ + + + + cesiumOptions +

+ + + + +
+ Options that are supported for creating Cesium DataSources. The object will be +passed to the cesium DataSource's load method as options, so the properties +listed in the Cesium documentation are also supported. Each type of Cesium Data +Source has a specific set of load method options. See for example, the +GeoJsonDataSource options: +https://cesium.com/learn/cesiumjs/ref-doc/GeoJsonDataSource.html +
+ + + +
Type:
+
    +
  • + +Object + + +
  • +
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + +string +| + +Object + + + + The url, GeoJSON object, or TopoJSON object to +be loaded.
+ + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + diff --git a/docs/docs/CesiumImagery.html b/docs/docs/CesiumImagery.html index 954697dce..159c5f515 100644 --- a/docs/docs/CesiumImagery.html +++ b/docs/docs/CesiumImagery.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -595,7 +595,7 @@
Parameters:
Source:
@@ -653,6 +653,183 @@
Returns:
+

+ + + + + containsFeature(feature) → {boolean} +

+ + + + + + +
+ Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the given feature is part of the +selectedFeatures collection in this asset +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + +

@@ -816,7 +993,7 @@

@@ -915,7 +1092,7 @@

Parameters:
Source:
@@ -1088,7 +1265,7 @@

Parameters:
Source:
@@ -1261,7 +1438,7 @@
Parameters:
Source:
@@ -1438,7 +1615,7 @@
Parameters:
Source:
@@ -1641,7 +1818,7 @@
Parameters:
Source:
@@ -1759,7 +1936,7 @@

Source:
@@ -1933,7 +2110,7 @@

Parameters:
Source:
@@ -2099,7 +2276,7 @@
Parameters:
Source:
@@ -2157,6 +2334,180 @@
Returns:
+

+ + + + + getFeatureAttributes(feature) → {Object} +

+ + + + + + +
+ Given a feature object from a Feature model, returns the attributes +needed to create a Feature model. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with properties, mapAsset, featureID, featureObject, +and label properties. Returns null if the feature is not the correct type +for this asset model. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + +

@@ -2218,7 +2569,7 @@

Source:
@@ -2834,7 +3185,7 @@

Parameters:
Source:
@@ -2957,7 +3308,7 @@

Source:
@@ -3082,7 +3433,7 @@

Source:
@@ -3254,7 +3605,7 @@

Parameters:
Source:
@@ -3348,7 +3699,7 @@

Source:
@@ -3448,7 +3799,7 @@

Source:
@@ -3597,7 +3948,165 @@

Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + usesFeatureType(feature) → {boolean} +

+ + + + + + +
+ Checks if a feature from the map (a Cesium object) is the type of +feature that this map asset model contains. For example, if a +Cesium3DTilesetFeature is passed to this function, this function +will return true if it is a Cesium3DTileset model, and false if it +is a CesiumVectorData model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity + + + +
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -3622,6 +4131,29 @@
Parameters:
+
Returns:
+ + +
+ true if the feature is an instance of the feature +type set on the asset model, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -3696,7 +4228,7 @@

Source:
diff --git a/docs/docs/CesiumTerrain.html b/docs/docs/CesiumTerrain.html index d50e8c667..0ad0bcd3d 100644 --- a/docs/docs/CesiumTerrain.html +++ b/docs/docs/CesiumTerrain.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -584,7 +584,7 @@
Parameters:
Source:
@@ -642,6 +642,183 @@
Returns:
+

+ + + + + containsFeature(feature) → {boolean} +

+ + + + + + +
+ Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the given feature is part of the +selectedFeatures collection in this asset +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + +

@@ -805,7 +982,7 @@

@@ -904,7 +1081,7 @@

Parameters:
Source:
@@ -1077,7 +1254,7 @@

Parameters:
Source:
@@ -1250,7 +1427,7 @@
Parameters:
Source:
@@ -1427,7 +1604,7 @@
Parameters:
Source:
@@ -1630,7 +1807,7 @@
Parameters:
Source:
@@ -1803,7 +1980,7 @@
Parameters:
Source:
@@ -1862,6 +2039,180 @@
Returns:
+

+ + + + + getFeatureAttributes(feature) → {Object} +

+ + + + + + +
+ Given a feature object from a Feature model, returns the attributes +needed to create a Feature model. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with properties, mapAsset, featureID, featureObject, +and label properties. Returns null if the feature is not the correct type +for this asset model. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + +

@@ -2163,7 +2514,7 @@
Parameters:
Source:
@@ -2286,7 +2637,7 @@

Source:
@@ -2411,7 +2762,7 @@

Source:
@@ -2583,7 +2934,7 @@

Parameters:
Source:
@@ -2779,7 +3130,7 @@

Source:
@@ -2928,7 +3279,165 @@

Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + usesFeatureType(feature) → {boolean} +

+ + + + + + +
+ Checks if a feature from the map (a Cesium object) is the type of +feature that this map asset model contains. For example, if a +Cesium3DTilesetFeature is passed to this function, this function +will return true if it is a Cesium3DTileset model, and false if it +is a CesiumVectorData model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity + + + +
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2953,6 +3462,29 @@
Parameters:
+
Returns:
+ + +
+ true if the feature is an instance of the feature +type set on the asset model, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -3027,7 +3559,7 @@

Source:
diff --git a/docs/docs/CesiumVectorData.html b/docs/docs/CesiumVectorData.html index 318d70bdc..1352230cc 100644 --- a/docs/docs/CesiumVectorData.html +++ b/docs/docs/CesiumVectorData.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,14 +48,14 @@

Class: CesiumVectorData

CesiumVectorData()

-
A CesiumVectorData Model is a vector layer (excluding Cesium3DTilesets) -that can be used in Cesium maps. This model corresponds to "DataSource" models in -Cesium. For example, this could represent vectors rendered from a Cesium -GeoJSONDataSource. -https://cesium.com/learn/cesiumjs/ref-doc/GeoJsonDataSource.html. Note: -GeoJsonDataSource is the only supported DataSource so far, eventually this model -could be used to support Cesium's CzmlDataSource and KmlDataSource (and perhaps a -Cesium CustomDataSource).
+
A CesiumVectorData Model is a vector layer (excluding +Cesium3DTilesets) that can be used in Cesium maps. This model corresponds +to "DataSource" models in Cesium. For example, this could represent +vectors rendered from a Cesium GeoJSONDataSource. +https://cesium.com/learn/cesiumjs/ref-doc/GeoJsonDataSource.html. +Note: The GeoJsonDataSource and CzmlDataSource are the only supported +DataSources so far, but eventually this model could be used to support +the KmlDataSource (and perhaps a Cesium CustomDataSource).
@@ -279,7 +279,7 @@
Properties:
The format of the data. Must be -'GeoJsonDataSource'. (The only Cesium DataSource supported so far.) +'GeoJsonDataSource' or 'CzmlDataSource'. @@ -431,6 +431,46 @@
Properties:
+ + + + outlineColor + + + + + +outlineColor + + + + + + + + + <optional>
+ + + + + + + + + + null + + + + + The color of the outline of the +features. If null, the outline will not be shown. If a string, it should be a +valid CSS color string. If an object, it should be an AssetColor object, or +a set of RGBA values. + + + @@ -699,7 +739,7 @@
Parameters:
Source:
@@ -757,12 +797,12 @@
Returns:
-

- +

+ - createCesiumModel(recreate) + colorForEntity(entity) → {Cesium.Color|null}

@@ -771,10 +811,8 @@

- Creates a Cesium.DataSource model and sets it to this model's -'cesiumModel' attribute. This cesiumModel contains all the information required -for Cesium to render the vector data. See -https://cesium.com/learn/cesiumjs/ref-doc/DataSource.html?classFilter=DataSource + Return the color for a feature based on the colorPalette and filters +attributes.
@@ -810,13 +848,13 @@

Parameters:
- recreate + entity -Boolean +Cesium.Entity @@ -826,9 +864,7 @@
Parameters:
- Set recreate to true to force the function create -the Cesium Model again. Otherwise, if a cesium model already exists, that is -returned instead. + A Cesium Entity @@ -845,6 +881,9 @@
Parameters:
+
Since:
+
  • 2.25.0
+ @@ -869,7 +908,7 @@
Parameters:
Source:
@@ -894,6 +933,32 @@
Parameters:
+
Returns:
+ + +
+ A Cesium Color or null if the color is +invalid or alpha is 0 +
+ + + +
+
+ Type +
+
+ +Cesium.Color +| + +null + + +
+
+ + @@ -905,12 +970,12 @@
Parameters:
-

- +

+ - featureIsSelected(feature) → {boolean} + colorToCesiumColor(color) → {Cesium.Color|null}

@@ -919,9 +984,7 @@

- Given a feature object from a Feature model, checks if it is part of the -selectedFeatures collection. See featureObject property from -Feature#defaults. + Covert a Color model to a Cesium Color
@@ -957,13 +1020,13 @@

Parameters:
- feature + color -* +Color @@ -973,8 +1036,7 @@
Parameters:
- An object that a Map widget uses to represent this feature -in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature + A Color model @@ -991,12 +1053,10 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -1020,7 +1080,7 @@
Parameters:
Source:
@@ -1049,8 +1109,8 @@
Returns:
- Returns true if the given feature is part of the -selectedFeatures collection in this asset + A Cesium Color or null if the color is +invalid
@@ -1061,7 +1121,10 @@
Returns:
-boolean +Cesium.Color +| + +null
@@ -1079,12 +1142,12 @@
Returns:
-

- +

+ - featureIsVisible(properties) → {boolean} + containsFeature(feature) → {boolean}

@@ -1093,8 +1156,9 @@

- This function checks whether a feature from the MapAsset is visible on the map -based on the properties of the feature and the MapAsset's filter settings. + Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only.
@@ -1130,13 +1194,13 @@

Parameters:
- properties + feature -Object +* @@ -1146,8 +1210,8 @@
Parameters:
- The properties of the feature to be filtered. (See -the 'properties' attribute of Feature#defaults.) + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature @@ -1164,11 +1228,14 @@
Parameters:
+
Since:
+
  • 2.25.0
+
Inherited From:
@@ -1193,7 +1260,7 @@
Parameters:
Source:
@@ -1222,9 +1289,8 @@
Returns:
- Returns true if the feature passes all the filters, or if -there are no filters set for this MapAsset. Returns false if the feature fails -any of the filters. + Returns true if the given feature is part of the +selectedFeatures collection in this asset
@@ -1253,12 +1319,12 @@
Returns:
-

- +

+ - fetchIcon(pid) + createCesiumModel(recreateopt)

@@ -1267,8 +1333,10 @@

- Fetches an SVG given a pid, sanitizes it, then updates the model's icon -attribute with the new and SVG string (after sanitizing it) + Creates a Cesium.DataSource model and sets it to this model's +'cesiumModel' attribute. This cesiumModel contains all the +information required for Cesium to render the vector data. See +https://cesium.com/learn/cesiumjs/ref-doc/DataSource.html?classFilter=DataSource
@@ -1292,8 +1360,12 @@

Parameters:
Type + Attributes + + Default + Description @@ -1304,23 +1376,41 @@
Parameters:
- pid + recreate -string +Boolean + + + <optional>
+ + + + + + + + + + false + + + - + Set recreate to true to force +the function create the Cesium Model again. Otherwise, if a cesium +model already exists, that is returned instead. @@ -1338,11 +1428,6 @@
Parameters:
- -
Inherited From:
-
@@ -1366,7 +1451,7 @@
Parameters:
Source:
@@ -1402,12 +1487,12 @@
Parameters:
-

- +

+ - formatDateProperty(config, properties) → {string} + featureIsSelected(feature) → {boolean}

@@ -1416,8 +1501,9 @@

- Given a definition for a new date property, and the properties that already -exist on a specific feature, returns a new string with the formatted date. + Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only.
@@ -1453,37 +1539,13 @@

Parameters:
- config - - - - - -MapConfig#CustomDateProperty - - - - - - - - - - An object that defines the new -date property to create - - - - - - - properties + feature -Object +* @@ -1493,8 +1555,8 @@
Parameters:
- key-value pairs representing existing properties in -a Feature + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature @@ -1511,14 +1573,11 @@
Parameters:
-
Since:
-
  • 2.19.0
-
Inherited From:
@@ -1543,7 +1602,7 @@
Parameters:
Source:
@@ -1572,8 +1631,8 @@
Returns:
- The value for the new date property, formatted as defined by -config, for the given feature + Returns true if the given feature is part of the +selectedFeatures collection in this asset
@@ -1584,7 +1643,7 @@
Returns:
-string +boolean
@@ -1602,12 +1661,12 @@
Returns:
-

- +

+ - formatStringProperty(config, properties) → {string} + featureIsVisible(properties) → {boolean}

@@ -1616,11 +1675,8 @@

- For a given set of Feature properties and a definition for a new sting -property, returns the value of the custom property. Note that since only static -strings are supported so far, this function essentially just returns the value -of config.value. This function exists to allow support of dynamic strings in -the future (e.g. combining strings from existing properties) + This function checks whether a feature from the MapAsset is visible on the map +based on the properties of the feature and the MapAsset's filter settings.
@@ -1654,30 +1710,6 @@

Parameters:
- - - config - - - - - -MapConfig#CustomStringProperty - - - - - - - - - - The object the defines the new -custom property - - - - properties @@ -1696,8 +1728,8 @@
Parameters:
- key-value pairs representing existing properties in -a Feature + The properties of the feature to be filtered. (See +the 'properties' attribute of Feature#defaults.) @@ -1714,14 +1746,11 @@
Parameters:
-
Since:
-
  • 2.19.0
-
Inherited From:
@@ -1746,7 +1775,7 @@
Parameters:
Source:
@@ -1775,7 +1804,9 @@
Returns:
- The new string for the given Feature property + Returns true if the feature passes all the filters, or if +there are no filters set for this MapAsset. Returns false if the feature fails +any of the filters.
@@ -1786,7 +1817,7 @@
Returns:
-string +boolean
@@ -1804,12 +1835,12 @@
Returns:
-

- +

+ - getBoundingSphere(dataSourceDisplay) → {Promise} + fetchIcon(pid)

@@ -1818,9 +1849,8 @@

- Waits for the model to be ready to display, then gets a Cesium Bounding Sphere -that can be used to navigate to view the full extent of the vector data. See -https://cesium.com/learn/cesiumjs/ref-doc/BoundingSphere.html. + Fetches an SVG given a pid, sanitizes it, then updates the model's icon +attribute with the new and SVG string (after sanitizing it)
@@ -1856,13 +1886,13 @@

Parameters:
- dataSourceDisplay + pid -Cesium.DataSourceDisplay +string @@ -1872,8 +1902,7 @@
Parameters:
- The data source display -attached to the CesiumWidget scene that this bounding sphere is for. Required. + @@ -1891,6 +1920,11 @@
Parameters:
+ +
Inherited From:
+
@@ -1914,7 +1948,7 @@
Parameters:
Source:
@@ -1939,29 +1973,6 @@
Parameters:
-
Returns:
- - -
- Returns a promise that resolves to a Cesium Bounding Sphere -when ready -
- - - -
-
- Type -
-
- -Promise - - -
-
- - @@ -1973,12 +1984,12 @@
Returns:
-

- +

+ - getColor(properties) → {AssetColor#Color} + formatDateProperty(config, properties) → {string}

@@ -1987,8 +1998,8 @@

- Given properties of a Feature model from this MapAsset, returns the color -associated with that feature. + Given a definition for a new date property, and the properties that already +exist on a specific feature, returns a new string with the formatted date.
@@ -2022,6 +2033,30 @@

Parameters:
+ + + config + + + + + +MapConfig#CustomDateProperty + + + + + + + + + + An object that defines the new +date property to create + + + + properties @@ -2040,9 +2075,8 @@
Parameters:
- The properties of the feature to get the color for; -An object containing key-value mapping of property names to properties. (See -the 'properties' attribute of Feature#defaults.) + key-value pairs representing existing properties in +a Feature @@ -2059,11 +2093,14 @@
Parameters:
+
Since:
+
  • 2.19.0
+
Inherited From:
@@ -2088,7 +2125,7 @@
Parameters:
Source:
@@ -2117,8 +2154,8 @@
Returns:
- The color associated with the given set of -properties. + The value for the new date property, formatted as defined by +config, for the given feature
@@ -2129,7 +2166,7 @@
Returns:
-AssetColor#Color +string
@@ -2147,12 +2184,12 @@
Returns:
-

- +

+ - getPropertiesFromFeature(feature) → {Object} + formatStringProperty(config, properties) → {string}

@@ -2161,8 +2198,11 @@

- Given a feature from a Cesium Vector Data source, returns any properties that are set -on the feature, similar to an attributes table. + For a given set of Feature properties and a definition for a new sting +property, returns the value of the custom property. Note that since only static +strings are supported so far, this function essentially just returns the value +of config.value. This function exists to allow support of dynamic strings in +the future (e.g. combining strings from existing properties)
@@ -2198,13 +2238,13 @@

Parameters:
- feature + config -Cesium.Entity +MapConfig#CustomStringProperty @@ -2214,7 +2254,32 @@
Parameters:
- A Cesium Entity + The object the defines the new +custom property + + + + + + + properties + + + + + +Object + + + + + + + + + + key-value pairs representing existing properties in +a Feature @@ -2231,7 +2296,15 @@
Parameters:
+
Since:
+
  • 2.19.0
+ + +
Inherited From:
+
@@ -2255,7 +2328,7 @@
Parameters:
Source:
@@ -2284,8 +2357,7 @@
Returns:
- An object containing key-value mapping of property names to -properties. + The new string for the given Feature property
@@ -2296,7 +2368,7 @@
Returns:
-Object +string
@@ -2314,12 +2386,12 @@
Returns:
-

- +

+ - initialize(assetConfigopt) + getBoundingSphere(dataSourceDisplay) → {Promise}

@@ -2328,7 +2400,9 @@

- Executed when a new CesiumVectorData model is created. + Waits for the model to be ready to display, then gets a Cesium Bounding Sphere +that can be used to navigate to view the full extent of the vector data. See +https://cesium.com/learn/cesiumjs/ref-doc/BoundingSphere.html.
@@ -2352,8 +2426,6 @@

Parameters:
Type - Attributes - @@ -2366,34 +2438,24 @@
Parameters:
- assetConfig + dataSourceDisplay -MapConfig#MapAssetConfig +Cesium.DataSourceDisplay - - - <optional>
- - - - - - - - The initial values of the -attributes, which will be set on the model. + The data source display +attached to the CesiumWidget scene that this bounding sphere is for. Required. @@ -2434,7 +2496,7 @@
Parameters:
Source:
@@ -2459,6 +2521,29 @@
Parameters:
+
Returns:
+ + +
+ Returns a promise that resolves to a Cesium Bounding Sphere +when ready +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + @@ -2470,12 +2555,12 @@
Parameters:
-

- +

+ - isSVG(str) → {Boolean} + getCesiumModelFromFeature(feature) → {Cesium.GeoJsonDataSource|Cesium.CzmlDataSource}

@@ -2484,7 +2569,8 @@

- Simple test to see if a string is an SVG + Return the DataSource model for a feature from a Cesium DataSource +model
@@ -2520,13 +2606,13 @@

Parameters:
- str + feature -string +Cesium.Entity @@ -2536,7 +2622,7 @@
Parameters:
- The string to check + A Cesium Entity @@ -2554,11 +2640,6 @@
Parameters:
- -
Inherited From:
-
@@ -2582,7 +2663,7 @@
Parameters:
Source:
@@ -2611,8 +2692,7 @@
Returns:
- Returns true if the string starts with ``, regardless of case + The model
@@ -2623,7 +2703,10 @@
Returns:
-Boolean +Cesium.GeoJsonDataSource +| + +Cesium.CzmlDataSource
@@ -2641,12 +2724,12 @@
Returns:
-

- +

+ - isVisible() → {boolean} + getColor(properties) → {AssetColor#Color}

@@ -2655,8 +2738,8 @@

- Checks that the visible attribute is set to true and that the opacity attribute -is greater than zero. If both conditions are met, returns true. + Given properties of a Feature model from this MapAsset, returns the color +associated with that feature.
@@ -2667,22 +2750,73 @@

+

Parameters:
+ + + + + + + + + -
+ - +
+ + + - -
Inherited From:
-
- + + + + + + + + + + + + + + + + +
NameTypeDescription
properties + + +Object + + + + The properties of the feature to get the color for; +An object containing key-value mapping of property names to properties. (See +the 'properties' attribute of Feature#defaults.)
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ @@ -2705,7 +2839,7 @@

Source:
@@ -2734,7 +2868,8 @@

Returns:
- Returns true if the MapAsset has opacity > 0 and is visible. + The color associated with the given set of +properties.
@@ -2745,7 +2880,7 @@
Returns:
-boolean +AssetColor#Color
@@ -2763,30 +2898,2680 @@
Returns:
-

- +

+ - resetStatus() + getEntityFromMapObject(mapObject) → {Cesium.Entity} +

+ + + + + + +
+ Try to find Entity object that comes from an object passed from the +Cesium map. This is useful when the map is clicked and the map +returns an object that may or may not be an Entity. +
+ + + + + + + + + +

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
mapObject + + +Object + + + + An object returned from the Cesium map
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - The Entity object if found, otherwise null. +
+ + + +
+
+ Type +
+
+ +Cesium.Entity + + +
+
+ + + + + + + + + + + + + +

+ + + + + getFeatureAttributes(feature) → {Object}

- + + + + +
+ Given a feature object from a Feature model, returns the attributes +needed to create a Feature model. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with properties, mapAsset, featureID, featureObject, +and label properties. Returns null if the feature is not the correct type +for this asset model. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getIDFromFeature(feature) → {string} +

+ + + + + + +
+ Return the ID used by Cesium for a feature from a DataSource model +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The ID +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getLabelFromFeature(feature) → {string} +

+ + + + + + +
+ Return the label for a feature from a DataSource model +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The label +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getPropertiesFromFeature(feature) → {Object} +

+ + + + + + +
+ Given a feature from a Cesium Vector Data source, returns any properties that are set +on the feature, similar to an attributes table. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object containing key-value mapping of property names to +properties. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getSelectedStyles(entity) → {Object} +

+ + + + + + +
+ Return the styles for a selected feature +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object containing the styles for the feature +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getStyles(entity) → {Object} +

+ + + + + + +
+ Return the styles for a feature +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + A Cesium Entity
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object containing the styles for the feature +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize(assetConfigopt) +

+ + + + + + +
+ Executed when a new CesiumVectorData model is created. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
assetConfig + + +MapConfig#MapAssetConfig + + + + + + <optional>
+ + + + + +
The initial values of the +attributes, which will be set on the model.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + isSVG(str) → {Boolean} +

+ + + + + + +
+ Simple test to see if a string is an SVG +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + +string + + + + The string to check
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the string starts with ``, regardless of case +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + isVisible() → {boolean} +

+ + + + + + +
+ Checks that the visible attribute is set to true and that the opacity attribute +is greater than zero. If both conditions are met, returns true. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the MapAsset has opacity > 0 and is visible. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + resetStatus() +

+ + + + + + +
+ Resets the Map Asset's status and statusDetails attributes to their default +values. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.21.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + sanitizeIcon(icon, callback) +

+ + + + + + +
+ Takes an SVG string and returns it with only the allowed tags and attributes +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
icon + + +string + + + + The SVG icon string to sanitize
callback + + +function + + + + Function to call once the icon has been sanitized. +Will pass the sanitized icon string.
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setListeners() +

+ + + + + + +
+ Set listeners that update the cesium model when the backbone model is updated. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + show() +

+ + + + + + +
+ Make sure the layer is visible. Sets visibility to true if false, and sets +opacity to 0.5 if it's less than 0.05. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + styleBillboard(entity, styles) +

+ + + + + + +
+ Update the styles for a billboard entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + styleEntities(entities) +

+ + + + + + +
+ Update the styles for a set of entities +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entities + + +Array + + + + The entities to update
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + styleLabel(entity, styles) +

+ + + + + + +
+ Update the styles for a label entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + stylePoint(entity, styles) +

+ + + + + + +
+ Update the styles for a point entity +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
- Resets the Map Asset's status and statusDetails attributes to their default -values. -
+ + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + Styles to apply, as returned by getStyles
@@ -2799,14 +5584,9 @@

Since:
-
  • 2.21.0
+
  • 2.25.0
- -
Inherited From:
-
@@ -2830,7 +5610,7 @@

Source:
@@ -2866,12 +5646,12 @@

-

- +

+ - sanitizeIcon(icon, callback) + stylePolygon(entity, styles)

@@ -2880,7 +5660,7 @@

- Takes an SVG string and returns it with only the allowed tags and attributes + Update the styles for a polygon entity
@@ -2916,13 +5696,13 @@

Parameters:
- icon + entity -string +Cesium.Entity @@ -2932,20 +5712,20 @@
Parameters:
- The SVG icon string to sanitize + The entity to update - callback + styles -function +Object @@ -2955,8 +5735,7 @@
Parameters:
- Function to call once the icon has been sanitized. -Will pass the sanitized icon string. + Styles to apply, as returned by getStyles @@ -2973,12 +5752,10 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -3002,7 +5779,7 @@
Parameters:
Source:
@@ -3038,12 +5815,12 @@
Parameters:
-

- +

+ - setListeners() + stylePolyline(entity, styles)

@@ -3052,7 +5829,7 @@

- Set listeners that update the cesium model when the backbone model is updated. + Update the styles for a polyline entity
@@ -3063,6 +5840,78 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
entity + + +Cesium.Entity + + + + The entity to update
styles + + +Object + + + + Styles to apply, as returned by getStyles
+ + @@ -3072,6 +5921,9 @@

+
Since:
+
  • 2.25.0
+ @@ -3096,7 +5948,7 @@

Source:
@@ -3132,12 +5984,12 @@

-

- +

+ - show() + updateAppearance()

@@ -3146,8 +5998,8 @@

- Make sure the layer is visible. Sets visibility to true if false, and sets -opacity to 0.5 if it's less than 0.05. + Updates the styles set on the cesiumModel object based on the colorPalette and +filters attributes.
@@ -3168,11 +6020,6 @@

- -
Inherited From:
-
@@ -3196,7 +6043,7 @@

Source:
@@ -3232,12 +6079,12 @@

-

- +

+ - updateAppearance() + updateFeatureVisibility()

@@ -3246,8 +6093,7 @@

- Updates the styles set on the cesiumModel object based on the colorPalette and -filters attributes. + Shows or hides each feature from this Map Asset based on the filters.
@@ -3291,7 +6137,7 @@

Source:
@@ -3327,12 +6173,12 @@

-

- +

+ - updateFeatureVisibility() + updateIcon(icon)

@@ -3341,7 +6187,8 @@

- Shows or hides each feature from this Map Asset based on the filters. + Sanitizes an SVG string and updates the model's 'icon' attribute the sanitized +string. Also sets the 'iconStatus' attribute to 'success'.
@@ -3352,6 +6199,55 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
icon + + +string + + + + An SVG string to use for the MapAsset icon
+ + @@ -3362,6 +6258,11 @@

+ +
Inherited From:
+
@@ -3385,7 +6286,7 @@

Source:
@@ -3421,12 +6322,12 @@

-

- +

+ - updateIcon(icon) + usesFeatureType(feature) → {boolean}

@@ -3435,8 +6336,11 @@

- Sanitizes an SVG string and updates the model's 'icon' attribute the sanitized -string. Also sets the 'iconStatus' attribute to 'success'. + Checks if a feature from the map (a Cesium object) is the type of +feature that this map asset model contains. For example, if a +Cesium3DTilesetFeature is passed to this function, this function +will return true if it is a Cesium3DTileset model, and false if it +is a CesiumVectorData model.
@@ -3472,13 +6376,16 @@

Parameters:
- icon + feature -string +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity @@ -3488,7 +6395,7 @@
Parameters:
- An SVG string to use for the MapAsset icon + @@ -3505,15 +6412,18 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ +
Overrides:
+
+ @@ -3534,7 +6444,7 @@
Parameters:
Source:
@@ -3559,6 +6469,29 @@
Parameters:
+
Returns:
+ + +
+ true if the feature is an instance of the feature +type set on the asset model, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -3629,7 +6562,7 @@

Source:
@@ -3751,7 +6684,7 @@

Source:
diff --git a/docs/docs/CesiumWidgetView.html b/docs/docs/CesiumWidgetView.html index 721abbd49..ef00ebcac 100644 --- a/docs/docs/CesiumWidgetView.html +++ b/docs/docs/CesiumWidgetView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -150,6 +150,21 @@

+

Fires:
+
    +
  • CesiumWidgetView#event:moved
  • + +
  • CesiumWidgetView#event:moveEnd
  • + +
  • CesiumWidgetView#event:moveStart
  • + +
  • Map#event:moved
  • + +
  • Map#event:moveEnd
  • + +
  • Map#event:moveStart
  • +
+ @@ -257,7 +272,7 @@
Type:
Source:
@@ -336,7 +351,7 @@
Type:
Source:
@@ -495,7 +510,7 @@
Properties:
Source:
@@ -573,7 +588,7 @@
Type:
Source:
@@ -646,7 +661,7 @@

Source:
@@ -724,7 +739,7 @@

Type:
Source:
@@ -802,7 +817,7 @@
Type:
Source:
@@ -938,7 +953,7 @@
Parameters:
Source:
@@ -1086,7 +1101,7 @@
Parameters:
Source:
@@ -1122,12 +1137,12 @@
Parameters:
-

- +

+ - addGeohashes() + addImagery(cesiumModel)

@@ -1136,7 +1151,7 @@

- Renders a CesiumGeohash map asset on the map + Renders imagery in the Map.
@@ -1147,6 +1162,55 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
cesiumModel + + +Cesium.ImageryLayer + + + + The Cesium imagery model to render
+ + @@ -1180,7 +1244,7 @@

Source:
@@ -1216,12 +1280,12 @@

-

- +

+ - addImagery(cesiumModel) + addVectorData(cesiumModel)

@@ -1230,7 +1294,7 @@

- Renders imagery in the Map. + Renders vector data (excluding 3D tilesets) in the Map.
@@ -1272,7 +1336,7 @@

Parameters:
-Cesium.ImageryLayer +Cesium.GeoJsonDataSource @@ -1282,7 +1346,8 @@
Parameters:
- The Cesium imagery model to render + The Cesium data source +model to render on the map @@ -1323,7 +1388,7 @@
Parameters:
Source:
@@ -1359,12 +1424,12 @@
Parameters:
-

- +

+ - addVectorData(cesiumModel) + completeFlight(target, options)

@@ -1373,7 +1438,10 @@

- Renders vector data (excluding 3D tilesets) in the Map. + This function is called by CesiumWidgetView#postRender; it should only +be called once the target has been fully rendered in the scene. This function +gets the bounding sphere, if required, and moves the scene to encompass the +full extent of the target.
@@ -1409,13 +1477,22 @@

Parameters:
- cesiumModel + target -Cesium.GeoJsonDataSource +MapAsset +| + +Cesium.BoundingSphere +| + +Object +| + +Feature @@ -1425,8 +1502,41 @@
Parameters:
- The Cesium data source -model to render on the map + The target asset, +bounding sphere, or location to change the camera focus to. If target is a +MapAsset, then the bounding sphere from that asset will be used for the target +destination. If target is an Object, it may contain any of the properties that +are supported by the Cesium camera flyTo options, see +https://cesium.com/learn/cesiumjs/ref-doc/Camera.html#flyTo. If the +target is a Feature, then it must be a Feature of a CesiumVectorData layer +(currently Cesium3DTileFeatures are not supported). The target can otherwise be +a Cesium BoundingSphere, see +https://cesium.com/learn/cesiumjs/ref-doc/BoundingSphere.html + + + + + + + options + + + + + +object + + + + + + + + + + For targets that are a bounding sphere or asset, +options to pass to Cesium Camera.flyToBoundingSphere(). See +https://cesium.com/learn/cesiumjs/ref-doc/Camera.html#flyToBoundingSphere. @@ -1467,7 +1577,7 @@
Parameters:
Source:
@@ -1503,12 +1613,12 @@
Parameters:
-

- +

+ - completeFlight(target, options) + coversGlobe(coords, latAllowance, lonAllowance) → {Boolean}

@@ -1517,10 +1627,7 @@

- This function is called by CesiumWidgetView#postRender; it should only -be called once the target has been fully rendered in the scene. This function -gets the bounding sphere, if required, and moves the scene to encompass the -full extent of the target. + Check if a given bounding box covers the entire globe.
@@ -1556,22 +1663,37 @@

Parameters:
- target + coords -MapAsset -| +Object -Cesium.BoundingSphere -| -Object -| + + -Feature + + + + + An object with the north, south, east, and +west coordinates of a bounding box + + + + + + + latAllowance + + + + + +Number @@ -1581,29 +1703,22 @@
Parameters:
- The target asset, -bounding sphere, or location to change the camera focus to. If target is a -MapAsset, then the bounding sphere from that asset will be used for the target -destination. If target is an Object, it may contain any of the properties that -are supported by the Cesium camera flyTo options, see -https://cesium.com/learn/cesiumjs/ref-doc/Camera.html#flyTo. If the -target is a Feature, then it must be a Feature of a CesiumVectorData layer -(currently Cesium3DTileFeatures are not supported). The target can otherwise be -a Cesium BoundingSphere, see -https://cesium.com/learn/cesiumjs/ref-doc/BoundingSphere.html + The number of degrees latitude to +allow as a buffer. If the north and south coords range from -90 to +90, minus this buffer * 2, then it is considered to cover the globe. - options + lonAllowance -object +Number @@ -1613,9 +1728,8 @@
Parameters:
- For targets that are a bounding sphere or asset, -options to pass to Cesium Camera.flyToBoundingSphere(). See -https://cesium.com/learn/cesiumjs/ref-doc/Camera.html#flyToBoundingSphere. + The number of degrees longitude to +allow as a buffer. @@ -1656,7 +1770,7 @@
Parameters:
Source:
@@ -1681,6 +1795,29 @@
Parameters:
+
Returns:
+ + +
+ Returns true if the bounding box covers the entire +globe, false otherwise. +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + @@ -1754,7 +1891,7 @@

Source:
@@ -1943,7 +2080,7 @@

Parameters:
Source:
@@ -2140,7 +2277,7 @@
Parameters:
Source:
@@ -2214,7 +2351,7 @@

- flyHome() + flyHome(duration)

@@ -2234,6 +2371,55 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
duration + + +number + + + + The duration of the flight in seconds.
+ + @@ -2267,7 +2453,7 @@

Source:
@@ -2457,7 +2643,7 @@

Parameters:
Source:
@@ -2551,7 +2737,7 @@

Source:
@@ -2718,7 +2904,7 @@

Parameters:
Source:
@@ -2765,6 +2951,124 @@
Returns:
+

+ + + + + getViewExtent() → {MapConfig#ViewExtent} +

+ + + + + + +
+ Get the north, south, east, and west-most lat/long that define a +bounding box around the currently visible area of the map. Also gives +the height/ altitude of the camera in meters. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The current view extent. +
+ + + +
+
+ Type +
+
+ +MapConfig#ViewExtent + + +
+
+ + + + + + + + + + + + +

@@ -2884,7 +3188,7 @@
Parameters:
Source:
@@ -2979,7 +3283,7 @@

Source:
@@ -3075,7 +3379,7 @@

Source:
@@ -3199,7 +3503,7 @@

Source:
@@ -3293,7 +3597,7 @@

Source:
@@ -3412,7 +3716,7 @@

Source:
@@ -3624,7 +3928,7 @@

Parameters:
Source:
@@ -3722,7 +4026,7 @@

Source:
@@ -3817,7 +4121,7 @@

Source:
@@ -3917,156 +4221,7 @@

Source:
- - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - updateSelectedFeatures(features) -

- - - - - - -
- Given a feature from a vector layer (e.g. a Cesium3DTileFeature), gets any -properties that are associated with that feature, the MapAsset model that -contains the feature, and the ID that Cesium uses to identify it, and updates -the Features collection that is set on the Map's `selectedFeatures` attribute -with a new Feature model. NOTE: This currently only works with 3D tile -features. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
features - - -Array.<Cesium.Cesium3DTileFeature> - - - - An array of Cesium3DTileFeatures to -select
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
@@ -4211,7 +4366,7 @@
Parameters:
Source:
@@ -4261,9 +4416,8 @@

- Update the 'currentViewExtent' attribute in the Map model with the north, -south, east, and west-most lat/long that define a bounding box around the -currently visible area of the map. + Update the 'currentViewExtent' attribute in the Map model with the +bounding box of the currently visible area of the map.
@@ -4307,7 +4461,7 @@

Source:
diff --git a/docs/docs/ChoiceFilter.html b/docs/docs/ChoiceFilter.html index 54322fbd9..98cedbfb7 100644 --- a/docs/docs/ChoiceFilter.html +++ b/docs/docs/ChoiceFilter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ChoiceFilterView.html b/docs/docs/ChoiceFilterView.html index bddeca804..53e665d96 100644 --- a/docs/docs/ChoiceFilterView.html +++ b/docs/docs/ChoiceFilterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -260,6 +260,368 @@
Type:
+

+ + + + + collapseToggleClass :string +

+ + + + +
+ The class used for the button that toggles the collapsed state of the filter. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapse-toggle"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsed :boolean +

+ + + + +
+ The current state of the filter, if it is FilterView#collapsible. +Whatever this value is set to at initialization, will be how the filter is +initially rendered. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • true
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsedClass :string +

+ + + + +
+ The class to add to the filter when it is collapsed. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapsed"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsible :boolean +

+ + + + +
+ Whether the filter is collapsible. If true, the filter will have a button that +toggles the collapsed state. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -931,7 +1293,7 @@
Type:
Source:
@@ -1480,7 +1842,7 @@

Parameters:
Source:
@@ -1624,7 +1986,7 @@
Parameters:
Source:
@@ -1797,7 +2159,7 @@
Parameters:
Source:
@@ -1957,7 +2319,7 @@
Parameters:
Source:
@@ -2352,7 +2714,7 @@
Parameters:
Source:
@@ -2548,7 +2910,7 @@
Parameters:
Source:
@@ -2727,6 +3089,172 @@
Parameters:
+ + + + + + +

+ + + + + toggleCollapse(collapseopt) +

+ + + + + + +
+ Toggle the collapsed state of the filter. If collapse is a boolean, then set the +collapsed state to that value. Otherwise, set it to the opposite of whichever +state is currently set. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
collapse + + +boolean + + + + + + <optional>
+ + + + + +
Whether to collapse the filter. If not provided, the +filter will be collapsed if it is currently expanded, and vice versa.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -3142,7 +3670,7 @@
Parameters:
Source:
diff --git a/docs/docs/CitationHeaderView.html b/docs/docs/CitationHeaderView.html index 07c640c24..d9aa731ae 100644 --- a/docs/docs/CitationHeaderView.html +++ b/docs/docs/CitationHeaderView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/CitationListView.html b/docs/docs/CitationListView.html index 09a5dba58..3b9f96f4d 100644 --- a/docs/docs/CitationListView.html +++ b/docs/docs/CitationListView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/CitationModalView.html b/docs/docs/CitationModalView.html index a044a6c42..01d99ed6f 100644 --- a/docs/docs/CitationModalView.html +++ b/docs/docs/CitationModalView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/CitationModel.html b/docs/docs/CitationModel.html index bbe2878d9..a8ac75e96 100644 --- a/docs/docs/CitationModel.html +++ b/docs/docs/CitationModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/CitationView.html b/docs/docs/CitationView.html index de5731952..e04535a5f 100644 --- a/docs/docs/CitationView.html +++ b/docs/docs/CitationView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Citations.html b/docs/docs/Citations.html index 468e107a7..46f2629b3 100644 --- a/docs/docs/Citations.html +++ b/docs/docs/Citations.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/CollectionModel.html b/docs/docs/CollectionModel.html index 31f5fba65..a89c77483 100644 --- a/docs/docs/CollectionModel.html +++ b/docs/docs/CollectionModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -511,7 +511,7 @@

Source:
@@ -610,7 +610,7 @@

Source:
@@ -914,7 +914,7 @@

Parameters:
Source:
@@ -1218,7 +1218,7 @@
Properties:
Source:
@@ -1398,7 +1398,7 @@
Parameters:
Source:
@@ -1636,7 +1636,7 @@

Source:
@@ -1735,7 +1735,7 @@

Source:
@@ -2515,7 +2515,7 @@

Parameters:
Source:
@@ -2666,7 +2666,7 @@
Parameters:
Source:
@@ -2787,7 +2787,7 @@

Source:
@@ -2908,7 +2908,7 @@

Source:
@@ -3103,7 +3103,7 @@

Source:
@@ -3263,7 +3263,7 @@

Parameters:
Source:
@@ -3529,7 +3529,7 @@
Properties:
Source:
@@ -3628,7 +3628,7 @@

Source:
@@ -3888,7 +3888,7 @@

Parameters:
Source:
@@ -4012,7 +4012,7 @@

Source:
@@ -4182,7 +4182,7 @@

Parameters:
Source:
@@ -4299,7 +4299,7 @@

Source:
@@ -4421,7 +4421,7 @@

Source:
@@ -4538,7 +4538,7 @@

Source:
@@ -4662,7 +4662,7 @@

Source:
@@ -4832,7 +4832,7 @@

Parameters:
Source:
@@ -5179,7 +5179,7 @@
Parameters:
Source:
@@ -5880,7 +5880,7 @@
Parameters:
Source:
@@ -6073,7 +6073,7 @@

Source:
@@ -6271,7 +6271,7 @@

Source:
@@ -6388,7 +6388,7 @@

Source:
@@ -6488,7 +6488,7 @@

Source:
@@ -6641,7 +6641,7 @@

Parameters:
Source:
@@ -7256,7 +7256,7 @@
Parameters:
Source:
@@ -7404,7 +7404,7 @@
Parameters:
Source:
@@ -7503,7 +7503,7 @@

Source:
@@ -7777,7 +7777,7 @@

Source:
diff --git a/docs/docs/ColorPaletteView.html b/docs/docs/ColorPaletteView.html index a698528f9..21764be58 100644 --- a/docs/docs/ColorPaletteView.html +++ b/docs/docs/ColorPaletteView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/DataCatalogViewWithFilters.html b/docs/docs/DataCatalogViewWithFilters.html index 18aaaa454..6f23b0113 100644 --- a/docs/docs/DataCatalogViewWithFilters.html +++ b/docs/docs/DataCatalogViewWithFilters.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,11 +48,11 @@

Class: DataCatalogViewWithFilters

DataCatalogViewWithFilters()

-
A DataCatalogView that uses the Search collection -and the Filter models for managing queries rather than the -Search model and the filter literal objects used in the -parent DataCatalogView. This accommodates custom portal filters. -This view is deprecated and will eventually be removed in a future version (likely 3.0.0)
+
A DataCatalogView that uses the Search collection and the Filter +models for managing queries rather than the Search model and the filter +literal objects used in the parent DataCatalogView. This accommodates +custom portal filters. This view is deprecated and will eventually be +removed in a future version (likely 3.0.0)
@@ -126,7 +126,7 @@

Source:
@@ -247,7 +247,7 @@

Type:
Source:
@@ -325,7 +325,7 @@
Type:
Source:
@@ -403,7 +403,7 @@
Type:
Source:
@@ -487,7 +487,7 @@
Type:
Source:
@@ -517,12 +517,12 @@

- The Search model to use for creating and storing Filters and constructing -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. + The Search model to use for creating and storing Filters and +constructing 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.
@@ -570,7 +570,7 @@

Type:
Source:
@@ -658,7 +658,7 @@
Type:
Source:
@@ -750,7 +750,7 @@
Type:
Source:
@@ -828,7 +828,7 @@
Type:
Source:
@@ -906,7 +906,7 @@
Type:
Source:
@@ -989,7 +989,7 @@
Type:
Source:
@@ -1083,7 +1083,7 @@

Source:
@@ -1182,7 +1182,7 @@

Source:
@@ -1282,7 +1282,7 @@

Source:
@@ -1381,7 +1381,7 @@

Source:
@@ -1481,7 +1481,7 @@

Source:
@@ -1626,7 +1626,7 @@

Parameters:
Source:
@@ -1676,9 +1676,9 @@

- Creates UI Filter Groups and renders them in this view. UI Filter Groups -are custom, interactive search filter elements, grouped together in one -panel, section, tab, etc. + Creates UI Filter Groups and renders them in this view. UI Filter +Groups are custom, interactive search filter elements, grouped together +in one panel, section, tab, etc.
@@ -1722,7 +1722,7 @@

Source:
@@ -1916,7 +1916,7 @@

Parameters:
Source:
@@ -2015,7 +2015,7 @@

Source:
@@ -2163,7 +2163,7 @@

Parameters:
Source:
@@ -2258,7 +2258,7 @@

Source:
@@ -2407,7 +2407,7 @@

Parameters:
Source:
@@ -2506,7 +2506,7 @@

Source:
@@ -2605,7 +2605,7 @@

Source:
@@ -2655,8 +2655,8 @@

- Override DataCatalogView.render() to render this view with filters -from the Filters collection + Override DataCatalogView.render() to render this view with filters from +the Filters collection
@@ -2700,7 +2700,7 @@

Source:
@@ -2794,7 +2794,7 @@

Source:
@@ -2888,7 +2888,7 @@

Source:
@@ -2983,7 +2983,7 @@

Source:
@@ -3155,7 +3155,7 @@

Parameters:
Source:
@@ -3304,7 +3304,7 @@
Parameters:
Source:
@@ -3399,7 +3399,7 @@

Source:
@@ -3493,7 +3493,7 @@

Source:
@@ -3587,7 +3587,7 @@

Source:
diff --git a/docs/docs/DataItemView.html b/docs/docs/DataItemView.html index 23050ecde..9590ebe8e 100644 --- a/docs/docs/DataItemView.html +++ b/docs/docs/DataItemView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/DataONEObject.html b/docs/docs/DataONEObject.html index edb88d9e1..7bd513b18 100644 --- a/docs/docs/DataONEObject.html +++ b/docs/docs/DataONEObject.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -250,7 +250,7 @@

Source:
@@ -344,7 +344,7 @@

Source:
@@ -499,7 +499,7 @@

Parameters:
Source:
@@ -798,7 +798,7 @@
Properties:
Source:
@@ -973,7 +973,7 @@
Parameters:
Source:
@@ -1091,7 +1091,7 @@

Source:
@@ -1185,7 +1185,7 @@

Source:
@@ -1486,7 +1486,7 @@

Parameters:
Source:
@@ -1632,7 +1632,7 @@
Parameters:
Source:
@@ -1748,7 +1748,7 @@

Source:
@@ -1864,7 +1864,7 @@

Source:
@@ -1958,7 +1958,7 @@

Source:
@@ -2113,7 +2113,7 @@

Parameters:
Source:
@@ -2374,7 +2374,7 @@
Properties:
Source:
@@ -2468,7 +2468,7 @@

Source:
@@ -2629,7 +2629,7 @@

Parameters:
Source:
@@ -2748,7 +2748,7 @@

Source:
@@ -2913,7 +2913,7 @@

Parameters:
Source:
@@ -3025,7 +3025,7 @@

Source:
@@ -3142,7 +3142,7 @@

Source:
@@ -3254,7 +3254,7 @@

Source:
@@ -3373,7 +3373,7 @@

Source:
@@ -3538,7 +3538,7 @@

Parameters:
Source:
@@ -3875,7 +3875,7 @@
Parameters:
Source:
@@ -4116,7 +4116,7 @@
Parameters:
Source:
@@ -4210,7 +4210,7 @@

Source:
@@ -4398,7 +4398,7 @@

Source:
@@ -4510,7 +4510,7 @@

Source:
@@ -4605,7 +4605,7 @@

Source:
@@ -4753,7 +4753,7 @@

Parameters:
Source:
@@ -5188,7 +5188,7 @@
Parameters:
Source:
@@ -5331,7 +5331,7 @@
Parameters:
Source:
@@ -5425,7 +5425,7 @@

Source:
@@ -5519,7 +5519,7 @@

Source:
diff --git a/docs/docs/DataPackage.html b/docs/docs/DataPackage.html index 291da4e54..d49560e2c 100644 --- a/docs/docs/DataPackage.html +++ b/docs/docs/DataPackage.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -1482,7 +1482,7 @@
Parameters:
Source:
@@ -1810,7 +1810,7 @@

Source:
@@ -1905,7 +1905,7 @@

Source:
@@ -2072,7 +2072,7 @@

Parameters:
Source:
@@ -2282,7 +2282,7 @@
Parameters:
Source:
@@ -2376,7 +2376,7 @@

Source:
@@ -2480,7 +2480,7 @@

Source:
@@ -2889,7 +2889,7 @@

Parameters:
Source:
@@ -2983,7 +2983,7 @@

Source:
diff --git a/docs/docs/DataPackageView.html b/docs/docs/DataPackageView.html index e0524d5e7..76f1fb642 100644 --- a/docs/docs/DataPackageView.html +++ b/docs/docs/DataPackageView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/DateFilter.html b/docs/docs/DateFilter.html index 1276848aa..d4d92f380 100644 --- a/docs/docs/DateFilter.html +++ b/docs/docs/DateFilter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/DateFilterView.html b/docs/docs/DateFilterView.html index 5d2786e18..3cce1f8cb 100644 --- a/docs/docs/DateFilterView.html +++ b/docs/docs/DateFilterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -181,6 +181,368 @@

Members

+

+ + + + + collapseToggleClass :string +

+ + + + +
+ The class used for the button that toggles the collapsed state of the filter. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapse-toggle"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsed :boolean +

+ + + + +
+ The current state of the filter, if it is FilterView#collapsible. +Whatever this value is set to at initialization, will be how the filter is +initially rendered. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • true
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsedClass :string +

+ + + + +
+ The class to add to the filter when it is collapsed. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapsed"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsible :boolean +

+ + + + +
+ Whether the filter is collapsible. If true, the filter will have a button that +toggles the collapsed state. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -770,7 +1132,7 @@
Type:
Source:
@@ -861,7 +1223,7 @@

Source:
@@ -933,7 +1295,9 @@

- Updates the view when the filter input is updated + Override the base view which is triggered when the user types in the +input and presses "Enter". The DateFilterView handles updating the model +already and we do not want to clear the input value at any time.
@@ -944,64 +1308,21 @@

-

Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - +
-
-
TypeDescription
- - -Event - - - The DOM Event that occurred on the filter view input element
- - - - - - -
-
Inherited From:
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + toggleCollapse(collapseopt) +

+ + + + + + +
+ Toggle the collapsed state of the filter. If collapse is a boolean, then set the +collapsed state to that value. Otherwise, set it to the opposite of whichever +state is currently set. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
collapse + + +boolean + + + + + + <optional>
+ + + + + +
Whether to collapse the filter. If not provided, the +filter will be collapsed if it is currently expanded, and vice versa.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2267,7 +2752,7 @@
Parameters:
Source:
@@ -2419,7 +2904,7 @@
Parameters:
Source:
@@ -2563,7 +3048,7 @@
Parameters:
Source:
diff --git a/docs/docs/DraftsView.html b/docs/docs/DraftsView.html index dd2405b29..733bcbb60 100644 --- a/docs/docs/DraftsView.html +++ b/docs/docs/DraftsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EML211.html b/docs/docs/EML211.html index 7541a1bca..c7a723dc4 100644 --- a/docs/docs/EML211.html +++ b/docs/docs/EML211.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -392,7 +392,7 @@
Properties:
Source:
@@ -491,7 +491,7 @@

Source:
@@ -590,7 +590,7 @@

Source:
@@ -750,7 +750,7 @@

Parameters:
Source:
@@ -1054,7 +1054,7 @@
Properties:
Source:
@@ -1234,7 +1234,7 @@
Parameters:
Source:
@@ -1357,7 +1357,7 @@

Source:
@@ -1456,7 +1456,7 @@

Source:
@@ -1899,7 +1899,7 @@

Parameters:
Source:
@@ -2050,7 +2050,7 @@
Parameters:
Source:
@@ -2171,7 +2171,7 @@

Source:
@@ -2289,7 +2289,7 @@

Source:
@@ -2409,7 +2409,7 @@

Source:
@@ -2555,7 +2555,7 @@

Parameters:
Source:
@@ -2654,7 +2654,7 @@

Source:
@@ -2814,7 +2814,7 @@

Parameters:
Source:
@@ -3080,7 +3080,7 @@
Properties:
Source:
@@ -3179,7 +3179,7 @@

Source:
@@ -3345,7 +3345,7 @@

Parameters:
Source:
@@ -3469,7 +3469,7 @@

Source:
@@ -3639,7 +3639,7 @@

Parameters:
Source:
@@ -3756,7 +3756,7 @@

Source:
@@ -3878,7 +3878,7 @@

Source:
@@ -3995,7 +3995,7 @@

Source:
@@ -4119,7 +4119,7 @@

Source:
@@ -4289,7 +4289,7 @@

Parameters:
Source:
@@ -4450,7 +4450,7 @@
Parameters:
Source:
@@ -4593,7 +4593,7 @@
Parameters:
Source:
@@ -4922,7 +4922,7 @@
Parameters:
Source:
@@ -5173,7 +5173,7 @@
Parameters:
Source:
@@ -5272,7 +5272,7 @@

Source:
@@ -5470,7 +5470,7 @@

Source:
@@ -5587,7 +5587,7 @@

Source:
@@ -5687,7 +5687,7 @@

Source:
@@ -5840,7 +5840,7 @@

Parameters:
Source:
@@ -5984,7 +5984,7 @@
Parameters:
Source:
@@ -6456,7 +6456,7 @@
Parameters:
Source:
@@ -6604,7 +6604,7 @@
Parameters:
Source:
@@ -6703,7 +6703,7 @@

Source:
@@ -6802,7 +6802,7 @@

Source:
diff --git a/docs/docs/EML211EditorView.html b/docs/docs/EML211EditorView.html index 0141730bb..339bf9189 100644 --- a/docs/docs/EML211EditorView.html +++ b/docs/docs/EML211EditorView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLAnnotation.html b/docs/docs/EMLAnnotation.html index 3638f239c..998087e8b 100644 --- a/docs/docs/EMLAnnotation.html +++ b/docs/docs/EMLAnnotation.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLAnnotations.html b/docs/docs/EMLAnnotations.html index 89187215d..a08ed1b7c 100644 --- a/docs/docs/EMLAnnotations.html +++ b/docs/docs/EMLAnnotations.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLAttribute.html b/docs/docs/EMLAttribute.html index 9ce4e61dc..f0a87401b 100644 --- a/docs/docs/EMLAttribute.html +++ b/docs/docs/EMLAttribute.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLAttributeView.html b/docs/docs/EMLAttributeView.html index bee782d78..0dca4dd94 100644 --- a/docs/docs/EMLAttributeView.html +++ b/docs/docs/EMLAttributeView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLDataTable.html b/docs/docs/EMLDataTable.html index 77d9a453f..d9ebe390e 100644 --- a/docs/docs/EMLDataTable.html +++ b/docs/docs/EMLDataTable.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLEntity.html b/docs/docs/EMLEntity.html index 46df9d975..edebfc1a5 100644 --- a/docs/docs/EMLEntity.html +++ b/docs/docs/EMLEntity.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLEntityView.html b/docs/docs/EMLEntityView.html index 50ec90c96..b54622252 100644 --- a/docs/docs/EMLEntityView.html +++ b/docs/docs/EMLEntityView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLGeoCoverage.html b/docs/docs/EMLGeoCoverage.html index c0efa3197..48253d44f 100644 --- a/docs/docs/EMLGeoCoverage.html +++ b/docs/docs/EMLGeoCoverage.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLMeasurementScale.html b/docs/docs/EMLMeasurementScale.html index 90f6f0ad0..5e5f4de79 100644 --- a/docs/docs/EMLMeasurementScale.html +++ b/docs/docs/EMLMeasurementScale.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLMeasurementScaleView.html b/docs/docs/EMLMeasurementScaleView.html index 1a1fc0661..9ad239bee 100644 --- a/docs/docs/EMLMeasurementScaleView.html +++ b/docs/docs/EMLMeasurementScaleView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLMeasurementTypeView.html b/docs/docs/EMLMeasurementTypeView.html index 7cb86496f..ba3a75a2a 100644 --- a/docs/docs/EMLMeasurementTypeView.html +++ b/docs/docs/EMLMeasurementTypeView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLMethodStep.html b/docs/docs/EMLMethodStep.html index e88244eec..34ad48c65 100644 --- a/docs/docs/EMLMethodStep.html +++ b/docs/docs/EMLMethodStep.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLMethods.html b/docs/docs/EMLMethods.html index 39e397e86..2292caa7a 100644 --- a/docs/docs/EMLMethods.html +++ b/docs/docs/EMLMethods.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLMethodsView.html b/docs/docs/EMLMethodsView.html index 032dc09fb..69f6cabd1 100644 --- a/docs/docs/EMLMethodsView.html +++ b/docs/docs/EMLMethodsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLNonNumericDomain.html b/docs/docs/EMLNonNumericDomain.html index f8168b716..ce185519c 100644 --- a/docs/docs/EMLNonNumericDomain.html +++ b/docs/docs/EMLNonNumericDomain.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLNumericDomain.html b/docs/docs/EMLNumericDomain.html index 8a5a0f790..4caef97e6 100644 --- a/docs/docs/EMLNumericDomain.html +++ b/docs/docs/EMLNumericDomain.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLOtherEntity.html b/docs/docs/EMLOtherEntity.html index e242471ad..0e1cc3892 100644 --- a/docs/docs/EMLOtherEntity.html +++ b/docs/docs/EMLOtherEntity.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLOtherEntityView.html b/docs/docs/EMLOtherEntityView.html index 9c96fb815..e48858037 100644 --- a/docs/docs/EMLOtherEntityView.html +++ b/docs/docs/EMLOtherEntityView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLParty.html b/docs/docs/EMLParty.html index 5c28fa556..8324ba6c5 100644 --- a/docs/docs/EMLParty.html +++ b/docs/docs/EMLParty.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLPartyView.html b/docs/docs/EMLPartyView.html index 614958c0f..d7144e6b0 100644 --- a/docs/docs/EMLPartyView.html +++ b/docs/docs/EMLPartyView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLSpecializedText.html b/docs/docs/EMLSpecializedText.html index a971652d9..802417565 100644 --- a/docs/docs/EMLSpecializedText.html +++ b/docs/docs/EMLSpecializedText.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLTempCoverageView.html b/docs/docs/EMLTempCoverageView.html index 49fc143ac..d0bd74b26 100644 --- a/docs/docs/EMLTempCoverageView.html +++ b/docs/docs/EMLTempCoverageView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLTemporalCoverage.html b/docs/docs/EMLTemporalCoverage.html index d3abd3650..7f7b25960 100644 --- a/docs/docs/EMLTemporalCoverage.html +++ b/docs/docs/EMLTemporalCoverage.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLText.html b/docs/docs/EMLText.html index a61b3cdf3..d342fa655 100644 --- a/docs/docs/EMLText.html +++ b/docs/docs/EMLText.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLText211.html b/docs/docs/EMLText211.html index 96083eefc..a9fc31f21 100644 --- a/docs/docs/EMLText211.html +++ b/docs/docs/EMLText211.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLUnit.html b/docs/docs/EMLUnit.html index 2300bcf3a..113f42bc1 100644 --- a/docs/docs/EMLUnit.html +++ b/docs/docs/EMLUnit.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMLView.html b/docs/docs/EMLView.html index 5a5ceb777..5bc299b81 100644 --- a/docs/docs/EMLView.html +++ b/docs/docs/EMLView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EMlGeoCoverageView_.html b/docs/docs/EMlGeoCoverageView_.html index 556396cb9..2e32a4080 100644 --- a/docs/docs/EMlGeoCoverageView_.html +++ b/docs/docs/EMlGeoCoverageView_.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EditCollectionView.html b/docs/docs/EditCollectionView.html index af4530a42..7846c1bc9 100644 --- a/docs/docs/EditCollectionView.html +++ b/docs/docs/EditCollectionView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/EditorView.html b/docs/docs/EditorView.html index d30ce5d41..76bf57918 100644 --- a/docs/docs/EditorView.html +++ b/docs/docs/EditorView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ExternalView.html b/docs/docs/ExternalView.html index 4a28d9d96..35b716805 100644 --- a/docs/docs/ExternalView.html +++ b/docs/docs/ExternalView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Feature.html b/docs/docs/Feature.html index d6f303c98..78c140739 100644 --- a/docs/docs/Feature.html +++ b/docs/docs/Feature.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/FeatureInfoView.html b/docs/docs/FeatureInfoView.html index 550644dea..7dc81d85e 100644 --- a/docs/docs/FeatureInfoView.html +++ b/docs/docs/FeatureInfoView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Features.html b/docs/docs/Features.html index 8c185e22c..812bc0c06 100644 --- a/docs/docs/Features.html +++ b/docs/docs/Features.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -330,7 +330,13 @@
Parameters:
-* +Feature +| + +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity @@ -357,6 +363,9 @@
Parameters:
+
Since:
+
  • 2.25.0
+ @@ -381,7 +390,7 @@
Parameters:
Source:
@@ -440,6 +449,174 @@
Returns:
+

+ + + + + containsFeatures(featureObjects) → {boolean} +

+ + + + + + +
+ Checks if a given array of feature objects are attributes in one of the +Feature models in this collection. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
featureObjects + + +Array + + + + An array of feature objects to check if they are +in this collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if all of the given feature objects are in this +collection, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + +

diff --git a/docs/docs/Filter.html b/docs/docs/Filter.html index b98e39e35..8cd4c6a7b 100644 --- a/docs/docs/Filter.html +++ b/docs/docs/Filter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/FilterEditorView.html b/docs/docs/FilterEditorView.html index e1ebda8d7..12a4da94c 100644 --- a/docs/docs/FilterEditorView.html +++ b/docs/docs/FilterEditorView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/FilterGroup.html b/docs/docs/FilterGroup.html index e95958e41..827c008d0 100644 --- a/docs/docs/FilterGroup.html +++ b/docs/docs/FilterGroup.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/FilterGroupView.html b/docs/docs/FilterGroupView.html index f09ce69bf..a57ee782e 100644 --- a/docs/docs/FilterGroupView.html +++ b/docs/docs/FilterGroupView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -181,6 +181,93 @@

Members

+

+ + + + + collapsible :boolean +

+ + + + +
+ If set to true, then all filters within this group will be collapsible. +See FilterView#collapsible +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • false
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -539,7 +626,7 @@
Parameters:
Source:
@@ -659,7 +746,7 @@

Source:
diff --git a/docs/docs/FilterGroupsView.html b/docs/docs/FilterGroupsView.html index 5444dc4c4..bd3856402 100644 --- a/docs/docs/FilterGroupsView.html +++ b/docs/docs/FilterGroupsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -245,6 +245,93 @@

+

+ + + + + collapsible :boolean +

+ + + + +
+ If set to true, then all filters within this group will be collapsible. +See FilterView#collapsible +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • false
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -451,7 +538,7 @@

Source:
@@ -627,6 +714,88 @@

Type:
+

+ + + + + initialQuery :string +

+ + + + +
+ The initial query to use when the view is first rendered. This is a text value +that will be set on the general `text` Solr field. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -958,7 +1127,7 @@
Parameters:
Source:
@@ -1131,7 +1300,7 @@

Parameters:
Source:
@@ -1293,7 +1462,7 @@
Parameters:
Source:
@@ -1383,7 +1552,7 @@

Source:
@@ -1478,7 +1647,7 @@

Source:
@@ -1619,7 +1788,7 @@

Parameters:
Source:
@@ -1762,7 +1931,7 @@
Parameters:
Source:
@@ -2002,7 +2171,7 @@
Properties
Source:
@@ -2092,7 +2261,151 @@

Source:
+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + renderAllFilter(searchFor) +

+ + + + + + +
+ Renders an "All" filter that will search the general `text` Solr field +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
searchFor + + +string + + + + The initial value of the "All" filter. This +will get set on the filter model and trigger a change event. Optional.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2186,7 +2499,7 @@

Source:
@@ -2281,7 +2594,7 @@

Source:
@@ -2500,7 +2813,7 @@

Properties:
Source:
@@ -2751,7 +3064,7 @@
Properties:
Source:
diff --git a/docs/docs/FilterView.html b/docs/docs/FilterView.html index 8a4a43db8..708135de6 100644 --- a/docs/docs/FilterView.html +++ b/docs/docs/FilterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -181,6 +181,348 @@

Members

+

+ + + + + collapseToggleClass :string +

+ + + + +
+ The class used for the button that toggles the collapsed state of the filter. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapse-toggle"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsed :boolean +

+ + + + +
+ The current state of the filter, if it is FilterView#collapsible. +Whatever this value is set to at initialization, will be how the filter is +initially rendered. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • true
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsedClass :string +

+ + + + +
+ The class to add to the filter when it is collapsed. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapsed"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsible :boolean +

+ + + + +
+ Whether the filter is collapsible. If true, the filter will have a button that +toggles the collapsed state. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -735,7 +1077,7 @@
Type:
Source:
@@ -821,7 +1163,7 @@

Source:
@@ -982,7 +1324,7 @@

Parameters:
Source:
@@ -1121,7 +1463,7 @@
Parameters:
Source:
@@ -1289,7 +1631,7 @@
Parameters:
Source:
@@ -1444,7 +1786,7 @@
Parameters:
Source:
@@ -1589,7 +1931,7 @@
Parameters:
Source:
@@ -1780,7 +2122,7 @@
Parameters:
Source:
@@ -1924,7 +2266,168 @@
Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + toggleCollapse(collapseopt) +

+ + + + + + +
+ Toggle the collapsed state of the filter. If collapse is a boolean, then set the +collapsed state to that value. Otherwise, set it to the opposite of whichever +state is currently set. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
collapse + + +boolean + + + + + + <optional>
+ + + + + +
Whether to collapse the filter. If not provided, the +filter will be collapsed if it is currently expanded, and vice versa.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2019,7 +2522,7 @@

Source:
@@ -2166,7 +2669,7 @@

Parameters:
Source:
diff --git a/docs/docs/Filters.html b/docs/docs/Filters.html index ef363f379..86577086a 100644 --- a/docs/docs/Filters.html +++ b/docs/docs/Filters.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -120,7 +120,7 @@

Source:
@@ -193,8 +193,9 @@

- If the search results must always match one of the ids in the id filters, -then the id filters will be added to the query with an AND operator. + If the search results must always match one of the ids in the id +filters, then the id filters will be added to the query with an AND +operator.
@@ -242,7 +243,93 @@

Type:
Source:
+ + + + + + + +
+ + + + + + + + +

+ + + + + type :string +

+ + + + +
+ The name of this type of collection +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "Filters"
  • +
+ + + +
Source:
+
@@ -284,8 +371,9 @@

- Creates and adds a Filter to this collection that filters datasets -to only those that the logged-in user has permission to change permission of. + Creates and adds a Filter to this collection that filters datasets to +only those that the logged-in user has permission to change permission +of.
@@ -329,7 +417,7 @@

Source:
@@ -379,8 +467,8 @@

- Creates and adds a Filter to this collection that filters datasets -to only those that the logged-in user has permission to write to. + Creates and adds a Filter to this collection that filters datasets to +only those that the logged-in user has permission to write to.
@@ -424,7 +512,7 @@

Source:
@@ -518,7 +606,7 @@

Source:
@@ -547,7 +635,8 @@

Returns:
- - Returns the query string fragment for a catalog search + - Returns the query string fragment for a catalog +search
@@ -590,7 +679,270 @@

- Given a Solr field name, determines if that field is set as a filter option + Given a Solr field name, determines if that field is set as a filter +option +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getAllOfType(type) → {Array.<Filter>} +

+ + + + + + +
+ Get all filters in this collection that are of a given filter type. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
type + + +string + + + + The filter type to get, e.g. "BooleanFilter". If +not set, all filters will be returned.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of filter models +
+ + + +
+
+ Type +
+
+ +Array.<Filter> + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeohashLevels() → {Array.<string>} +

+ + + + + + +
+ Returns the geohash levels that are set on any SpatialFilter models in +this collection. If no SpatialFilter models are found, or no geohash +levels are set, an empty array is returned.
@@ -634,7 +986,7 @@

Source:
@@ -659,6 +1011,29 @@

+

Returns:
+ + +
+ An array of geohash levels in the format +["geohash_1", "geohash_2", ...] +
+ + + +
+
+ Type +
+
+ +Array.<string> + + +
+
+ + @@ -684,8 +1059,8 @@

- Get a query string for a group of Filters. -The Filters will be ANDed together, unless a different operator is given. + Get a query string for a group of Filters. The Filters will be ANDed +together, unless a different operator is given.
@@ -810,7 +1185,8 @@

Parameters:
- The operator to use between filter models + The operator to use between filter +models @@ -851,7 +1227,7 @@
Parameters:
Source:
@@ -923,8 +1299,9 @@

- Searches the Filter models in this collection and returns any that have at -least one field that matches any of the ID query fields, such as by id, seriesId, or the isPartOf relationship. + Searches the Filter models in this collection and returns any that have +at least one field that matches any of the ID query fields, such as by +id, seriesId, or the isPartOf relationship.
@@ -968,7 +1345,7 @@

Source:
@@ -1102,7 +1479,7 @@

Source:
@@ -1192,8 +1569,8 @@

- Searches the Filter models in this collection and returns all have no fields -matching any of the ID query fields. + Searches the Filter models in this collection and returns all have no +fields matching any of the ID query fields.
@@ -1237,7 +1614,7 @@

Source:
@@ -1327,8 +1704,8 @@

- Builds the query string to send to the query engine. Iterates over each filter -in the collection and adds to the query string. + Builds the query string to send to the query engine. Iterates over each +filter in the collection and adds to the query string.
@@ -1400,7 +1777,8 @@

Parameters:
- The operator to use to combine multiple filters in this filter group. Must be AND or OR. + The operator to use to combine multiple +filters in this filter group. Must be AND or OR. @@ -1441,7 +1819,7 @@
Parameters:
Source:
@@ -1680,9 +2058,10 @@
Properties:
- Set to true to indicate that these filters -or filterGroups are part of a UIFilterGroup (aka custom Portal search filter). -Otherwise, it's assumed that this model is in a Collection model definition. + Set to true to indicate that these +filters or filterGroups are part of a UIFilterGroup (aka custom Portal +search filter). Otherwise, it's assumed that this model is in a +Collection model definition. @@ -1705,9 +2084,9 @@
Properties:
- A FilterGroupType or UIFilterGroupType XML -element from a portal or collection document. If provided, the XML will be -parsed and the Filters models extracted + A FilterGroupType or +UIFilterGroupType XML element from a portal or collection document. If +provided, the XML will be parsed and the Filters models extracted @@ -1730,9 +2109,9 @@
Properties:
- If set to true, a catalog search phrase -will be appended to the search query that limits the results to un-obsoleted -metadata. + If set to true, a catalog search +phrase will be appended to the search query that limits the results to +un-obsoleted metadata. @@ -1771,7 +2150,7 @@
Properties:
Source:
@@ -1822,8 +2201,8 @@

Creates the type of Filter Model based on the given filter type. This -function is typically not called directly. It is used by Backbone.js when adding -a new model to the collection. +function is typically not called directly. It is used by Backbone.js +when adding a new model to the collection.
@@ -1875,7 +2254,8 @@

Parameters:
- A literal object that contains the attributes to pass to the model + A literal object that contains the attributes +to pass to the model @@ -1898,7 +2278,8 @@
Parameters:
- A literal object of additional options to pass to the model + A literal object of additional options to +pass to the model @@ -2014,7 +2395,7 @@
Properties:
Source:
@@ -2100,8 +2481,8 @@

- Parses a or element from a collection or portal -document and sets the resulting models on this collection. + Parses a or element from a collection or +portal document and sets the resulting models on this collection.
@@ -2153,8 +2534,8 @@

Parameters:
- A FilterGroupType or UIFilterGroupType XML - element from a portal or collection document + A FilterGroupType or UIFilterGroupType + XML element from a portal or collection document @@ -2177,10 +2558,10 @@
Parameters:
- Set to true to indicate that these filters - or filterGroups are part of a UIFilterGroup (aka custom Portal search filter). - Otherwise, it's assumed that the filters are part of a Collection model - definition. + Set to true to indicate that these + filters or filterGroups are part of a UIFilterGroup (aka custom Portal + search filter). Otherwise, it's assumed that the filters are part of a + Collection model definition. @@ -2221,7 +2602,7 @@
Parameters:
Source:
@@ -2293,9 +2674,8 @@

- Remove filters from the collection that are -lacking fields, values, and in the case of a numeric filter, -a min and max value. + Remove filters from the collection that are lacking fields, values, and +in the case of a numeric filter, a min and max value.
@@ -2367,8 +2747,8 @@

Parameters:
- Set to true to also remove empty filters -from within any and all nested filterGroups. + Set to true to also remove empty +filters from within any and all nested filterGroups. @@ -2409,7 +2789,7 @@
Parameters:
Source:
@@ -2459,7 +2839,8 @@

- Removes Filter models from this collection if they match the given field + Removes Filter models from this collection if they match the given +field
@@ -2511,7 +2892,8 @@

Parameters:
- The field whose matching filters that should be removed from this collection + The field whose matching filters that should be +removed from this collection @@ -2552,7 +2934,7 @@
Parameters:
Source:
@@ -2602,8 +2984,8 @@

- Remove a Filter from the Filters collection silently, and -replace it with a new model. + Remove a Filter from the Filters collection silently, and replace it +with a new model.
@@ -2678,7 +3060,8 @@

Parameters:
- Attributes for the replacement model. Use the filterType attribute to replace with a different type of Filter. + Attributes for the replacement model. Use the +filterType attribute to replace with a different type of Filter. @@ -2719,7 +3102,7 @@
Parameters:
Source:
@@ -2748,7 +3131,8 @@
Returns:
- Returns the replacement Filter model, which is already part of the Filters collection. + Returns the replacement Filter model, which +is already part of the Filters collection.
@@ -2791,8 +3175,8 @@

- visibleIndexOf - Get the index of a given model, excluding any -filters that are marked as invisible. + visibleIndexOf - Get the index of a given model, excluding any filters +that are marked as invisible.
@@ -2853,7 +3237,8 @@

Parameters:
- The filter model for which to get the visible index + The +filter model for which to get the visible index @@ -2894,7 +3279,7 @@
Parameters:
Source:
@@ -2923,7 +3308,8 @@
Returns:
- An integer representing the filter model's position in the list of visible filters. + An integer representing the filter model's position in +the list of visible filters.
diff --git a/docs/docs/FiltersMapConnector.html b/docs/docs/FiltersMapConnector.html new file mode 100644 index 000000000..179889787 --- /dev/null +++ b/docs/docs/FiltersMapConnector.html @@ -0,0 +1,1856 @@ + + + + + MetacatUI Dev Docs: Class: FiltersMapConnector + + + + + + + + + + + + + + +
+ +

Class: FiltersMapConnector

+ + + + + + +
+ +
+ +

FiltersMapConnector()

+ +
A model that creates listeners between a Map model and a +collection of Filters. The Map will update any spatial filters in the +collection with map extent and zoom level changes. This connector does not +assume anything about how the map or filters will be displayed in the UI or +why those components need to be connected.
+ + + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new FiltersMapConnector() +

+ + + + + + + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + +
    +
  • Backbone.Model
  • +
+ + + + + + + + + + + + + + + +

Members

+ + + +

+ + + + + type :string +

+ + + + +
+ The type of Backbone.Model this is. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "FiltersMapConnector"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + addSpatialFilterIfNeeded(add) +

+ + + + + + +
+ Adds a new SpatialFilter to the Filters collection if no spatial +filters are found and 'add' is true. This will trigger a collection +update, which will re-run the findAndSetSpatialFilters function. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
add + + +boolean + + + + Whether to add a SpatialFilter if none are found +in the collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + connect() +

+ + + + + + +
+ Starts listening to the Map model for changes in the +'currentViewExtent' attribute, and calls the updateSpatialFilters +function when changes are detected. This method needs to be called for +the connector to work. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + defaults() +

+ + + + + + + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
filtersList + + +Array.<Filter> + + + + An array of Filter models to +optionally add to the Filters collection
filters + + +Filters + + + + A Filters collection to connect to the Map
spatialFilters + + +Array.<SpatialFilter> + + + + An array of SpatialFilter +models present in the Filters collection.
map + + +Map + + + + The Map model that will update the spatial filters
isConnected + + +boolean + + + + Whether the connector is currently +listening to the Map model for changes. Set automatically when the +connector is started or stopped.
onMoveEnd + + +function + + + + A function to call when the map is +finished moving. This function will be called with the connector as +'this'.
+ + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + disconnect(resetSpatialFilteropt) +

+ + + + + + +
+ Stops all Filter-Map listeners, including listeners on the Filters +collection and the Map model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
resetSpatialFilter + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Whether to reset the +spatial filter values to their defaults. This will remove any spatial +constraints from the search.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + findAndSetSpatialFilters(addopt) +

+ + + + + + +
+ Finds and sets the spatial filters within the Filters collection. Stops +any existing listeners, adds a new listener for collection updates, and +adds a spatial filter if needed. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
add + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Whether to add a SpatialFilter if none +are found in the collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + initialize(attr, options) +

+ + + + + + +
+ Set up the model connections. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +object + + + + The attributes passed to the model, must include +a Filters collection and a Map model.
options + + +object + + + + The options passed to the model. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
addSpatialFilter + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Whether to add a +SpatialFilter to the Filters collection if none are found. The +connector won't work without a SpatialFilter, but it will listen for +updates to the Filters collection and connect to any SpatialFilters +that are added.
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + listenOnceToFiltersUpdates() +

+ + + + + + +
+ Adds a listener to the Filters collection for updates, to re-run the +findAndSetSpatialFilters function. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + removeSpatialFilter() +

+ + + + + + +
+ Removes all SpatialFilter models from the Filters collection and +destroys them. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + resetSpatialFilter() +

+ + + + + + +
+ Reset the spatial filter values to their defaults. This will remove +any spatial constraints from the search. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setSpatialFilters() +

+ + + + + + +
+ Sets the SpatialFilter models found within the Filters collection to +the 'spatialFilters' attribute. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateSpatialFilters() +

+ + + + + + +
+ Updates the spatial filters with the current map extent and zoom level. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/FiltersSearchConnector.html b/docs/docs/FiltersSearchConnector.html index 53f52f651..b7a0538d7 100644 --- a/docs/docs/FiltersSearchConnector.html +++ b/docs/docs/FiltersSearchConnector.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,9 +48,10 @@

Class: FiltersSearchConnector

FiltersSearchConnector()

-
A model that creates listeners between a Filters collection and a SearchResults. It does not assume anything -about how the search results or filters will be displayed in the UI or why those components need to be connected. It simply -sends a new search when the filters have been changed.
+
A model that creates listeners between a Filters collection and +a SearchResults. It does not assume anything about how the search results +or filters will be displayed in the UI or why those components need to be +connected. It simply sends a new search when the filters have been changed.
@@ -122,7 +123,7 @@

Source:
@@ -179,10 +180,198 @@

Extends

+

Members

+ + + +

+ + + + + type :string +

+ + + + +
+ The type of Backbone.Model this is. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "FiltersSearchConnector
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

Methods

+ + + + + + +

+ + + + + connect() +

+ + + + + + +
+ Sets listeners on the Filters and SearchResults to trigger a search +when the search changes +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.22.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -240,13 +429,13 @@
Properties:
- filtersList + filters -Array.<Filter> +Filters @@ -256,20 +445,20 @@
Properties:
- An array of Filter models to optionally add to the Filters collection + A Filters collection to use for this search - filters + searchResults -Filters +SolrResults @@ -279,20 +468,21 @@
Properties:
- A Filters collection to use for this search + The SolrResults collection that +the search results will be stored in - searchResults + isConnected -SolrResults +boolean @@ -302,7 +492,9 @@
Properties:
- The SolrResults collection that the search results will be stored in + Whether or not the model has listeners +set between the Filters and SearchResults. Set this with the +connect and disconnect methods. @@ -341,7 +533,7 @@
Properties:
Source:
@@ -377,12 +569,12 @@
Properties:
-

- +

+ - startListening() + disconnect()

@@ -391,7 +583,7 @@

- Sets listeners on the Filters and SearchResults to trigger a search when the search changes + Stops listening to changes in the Filters and SearchResults
@@ -412,7 +604,7 @@

Since:
-
  • 2.22.0
+
  • 2.25.0
@@ -438,7 +630,7 @@

Source:
@@ -479,7 +671,7 @@

- triggerSearch() + triggerSearch(resetPage)

@@ -488,8 +680,9 @@

- Get Results from the Solr index by combining the Filter query string fragments -in each Filter instance in the Search collection and querying Solr. + Get Results from the Solr index by combining the Filter query string +fragments in each Filter instance in the Search collection and querying +Solr.
@@ -500,6 +693,56 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
resetPage + + +boolean + + + + Whether or not to reset the page number +to 0. Defaults to false.
+ + @@ -536,7 +779,7 @@

Source:
diff --git a/docs/docs/FooterView.html b/docs/docs/FooterView.html index 5dfae6c71..6509f58b7 100644 --- a/docs/docs/FooterView.html +++ b/docs/docs/FooterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Geohash.html b/docs/docs/Geohash.html index e61cb6308..6fd6e6af2 100644 --- a/docs/docs/Geohash.html +++ b/docs/docs/Geohash.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,8 +48,7 @@

Class: Geohash

Geohash()

-
A Geohash Model represents a geohash layer in a map. NOTE: This is a WIP -and not yet supported.
+
A Geohash Model represents a single geohash.
@@ -98,7 +97,7 @@

Since:
-
  • 2.18.0
+
  • 2.25.0
@@ -124,7 +123,7 @@

Source:
@@ -164,7 +163,7 @@

Extends

@@ -197,7 +196,9 @@

- Default attributes for MapAsset models + Default attributes for Geohash models. Note that attributes like +precision, bounds, etc. are all calculated on the fly during the get +method.
@@ -234,8 +235,6 @@

Properties:
- Default - Description @@ -246,25 +245,13 @@
Properties:
- type + hashString -'Cesium3DTileset' -| - -'BingMapsImageryProvider' -| - -'IonImageryProvider' -| - -'WebMapTileServiceImageryProvider' -| - -'CesiumTerrainProvider' +string @@ -279,25 +266,21 @@
Properties:
- - - - - The format of the data. Must be one of the supported types. + The hashString of the geohash. - label + properties -string +Object @@ -306,575 +289,2386 @@
Properties:
+ <optional>
+ - - - - - A user friendly name for this asset, to be displayed -in a map. + An object containing arbitrary +properties associated with the geohash. (e.g. count values from +SolrResults) + + - - - icon - - - - -string - - +
- - - - <optional>
- + - - - + - - - - '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M1.2 13.7 3.6 3.5l7.2 8.7zM5 3.3c2 .3 3.5.4 4.4.4H13l3 6.3-4 1.8-7-8.5Zm9.1.6 2.8 6 4.5-2.2a23 23 0 0 1-.7-4c0-.8-1.2-.7-2-.7l-4.6.9ZM1 15l11-1.9c1.2-.3 2.7-1 4.2-2l2.5 5.2c-1.2.3-3.6.4-7.3.4-2.8 0-7.3 0-9.4-.8a2 2 0 0 1-1-.9Zm16.4-4.2 4-1.8 1.3 5.5c0 .4.1 1-.4 1.2l-2.5.5-2.4-5.4ZM1.7 17l-.5 2.6c0 .7.2 1 1 1.3a64.1 64.1 0 0 0 19.8 0c.4-.3 1-.5.7-1.6l-.5-2.3a52.6 52.6 0 0 1-20.6 0Z"/></svg>' - - - + - A PID for an SVG saved as a dataObject, or an SVG string. The SVG will be used -as an icon that will be displayed next to the label in the layers list. It -should be an SVG file that has no fills, borders, or styles set on it (since -the icon will be shaded dynamically by the maps CSS using a fill attribute). It -must use a viewbox property rather than a height and width. - + - - - description - + - - - -string + + - - + - - - - <optional>
- + - - - + - - - - '' - - - + - A brief description about the asset, e.g. -which area it covers, the resolution, etc. - + +
Source:
+
+ - - - attribution - + - - - -string + +
- - - - - - <optional>
- - - - + + - - - '' - - - +

+ + - A credit or attribution to display along -with this map resource. - + + type :string +

- - - - moreInfoLink - - - - -string +
+ The name of this type of model +
- - - - - - <optional>
- - - +
Type:
+
    +
  • +string - - - - '' - - - - A link to show in a map where a user can -find more information about this resource. - +
  • +
- - - - downloadLink - - - - -string - - +
- - - - <optional>
- + - - - + - - - - '' - - - + - A link to show in a map where a user can -go to download the source data. - + - - - id - + - - - -string + + - - + - - - - <optional>
- + - - - + - - - - '' - - - + - If this asset's data is archived in a DataONE -repository, the ID of the data package. - + +
Source:
+
+ - - - selected - + - - - -Boolean + +
- - - - - - <optional>
- - - - + + - - - false - - - +

+ + - Set to true when this asset has been -selected by the user in the layer list. - + + type :string +

- - - - opacity - - - - -Number +
+ The name of this type of model. This will be updated to +'CesiumVectorData' upon initialization. +
- - - - - - <optional>
- - - +
Type:
+
    +
  • +string - - - - 1 - - - - A number between 0 and 1 indicating the -opacity of the layer on the map, with 0 representing fully transparent and 1 -representing fully opaque. This applies to raster (imagery) and vector assets, -not to terrain assets. - +
  • +
+ + + + + +
- - - visible - + - - - -Boolean + + - - + - - - - <optional>
- + - - - + - - - - true - - - + - Set to true if the layer is visible on the -map, false if it is hidden. This applies to raster (imagery) and vector assets, -not to terrain assets. - + - - - colorPalette - + - - - -AssetColorPalette + + +
Source:
+
+ - - + - - - - <optional>
- + + + +
- - - - - - - - - The color or colors mapped to -attributes of this asset. This applies to raster/imagery and vector assets. For -imagery, the colorPalette will be used to create a legend. For vector assets -(e.g. 3Dtilesets), it will also be used to style the features. - + + + - - - featureTemplate - + +

Methods

- + - -MapConfig#FeatureTemplate + - - + +

+ + - - - - <optional>
- +
+ addProperty(key, value) +

+ - - - + - - - - - - Configuration for -content and layout of the Feature Info panel - the panel that shows information -about a selected feature from a vector asset (FeatureInfoView). - +
+ Set a property on the geohash. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + - + - - - - - + - + - - - - - + + +
NameTypeDescription
customPropertieskey -MapConfig#CustomProperties +string - - <optional>
- - - -
- - Configuration that -allows for the definition of custom feature properties, potentially based on -other properties. For example, a custom property could be a formatted version -of an existing date property.The key of the property to set.
notificationvalue -MapConfig#Notification +* - - <optional>
- - - -
- - A custom badge and message to -display about the layer in the Layer list. For example, this could highlight -the layer if it is new, give a warning if they layer is under development, etc.The value of the property to set.
- - - status - - - - -'ready' -| -'error' -| -null - - +
- - - - <optional>
- + - - - + - - - - null - - - + - Set to 'ready' when the -resource is loaded and ready to be rendered in a map view. Set to 'error' when -the asset is not supported, or there was a problem requesting the resource. - + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + createCesiumModel(recreateopt) +

+ + + + + + +
+ Create the Cesium model for the geohashes. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
recreate + + +Boolean + + + + + + <optional>
+ + + + + +
+ + false + + Set to true to recreate the +Cesium model.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + geodeticToECEF(coord) → {Array} +

+ + + + + + +
+ Convert geodetic coordinates to Earth-Centered, Earth-Fixed (ECEF) +coordinates. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
coord + + +Object + + + + The geodetic coordinates, an array of longitude +and latitude.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The ECEF coordinates. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + + + + + + + + + +

+ + + + + get(attr) → {*} +

+ + + + + + +
+ Overwrite the get method to calculate bounds, point, precision, and +arbitrary properties on the fly. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + The attribute to get the value of.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The value of the attribute. +
+ + + +
+
+ Type +
+
+ +* + + +
+
+ + + + + + + + + + + + + +

+ + + + + getBounds() → {Array|null} +

+ + + + + + +
+ Get the bounds of the geohash "tile". +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array containing the bounds of the geohash. +
+ + + +
+
+ Type +
+
+ +Array +| + +null + + +
+
+ + + + + + + + + + + + + +

+ + + + + getCZML(limitToExtentopt) → {Object} +

+ + + + + + +
+ Returns the CZML representation of the geohashes. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
limitToExtent + + +Boolean + + + + + + <optional>
+ + + + + +
+ + true + + Set to false to return the +CZML for all geohashes, not just those in the current extent.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The CZML representation of the geohashes. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getChildGeohashes(keepPropertiesopt) → {Array.<Geohash>} +

+ + + + + + +
+ Get the 32 child geohashes of the geohash. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
keepProperties + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + If true, the child geohashes +will have the same properties as the parent geohash.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of Geohash models. +
+ + + +
+
+ Type +
+
+ +Array.<Geohash> + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeoData(geometry) → {Object|null} +

+ + + + + + +
+ Get the data from this model that is needed to create geometries for various +formats of geospacial data, like GeoJSON and CZML. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
geometry + + +string + + + + The type of geometry to get. Can be "rectangle", +"point", or "both".
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with the keys "rectangle", "point", and +"properties". +
+ + + +
+
+ Type +
+
+ +Object +| + +null + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeoJSON(limitToExtentopt) → {Object} +

+ + + + + + +
+ Returns the GeoJSON representation of the geohashes. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
limitToExtent + + +Boolean + + + + + + <optional>
+ + + + + +
+ + true + + Set to false to return the +GeoJSON for all geohashes, not just those in the current extent.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The GeoJSON representation of the geohashes. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeohashGroup() +

+ + + + + + +
+ Get all geohashes that belong in the same complete group of +32 geohashes. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getGeohashes(limitToExtentopt) → {Geohashes} +

+ + + + + + +
+ Get the geohash collection and optionally reduce it to only those +geohashes that are within the current map extent, and to no more than +the specified amount. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
limitToExtent + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Whether to limit the geohashes +to those that are within the current map extent.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The geohashes to display. +
+ + + +
+
+ Type +
+
+ +Geohashes + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeohashesForExtent() → {Geohashes} +

+ + + + + + +
+ Get the geohashes that are currently in the map's extent. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The geohashes in the current extent. +
+ + + +
+
+ Type +
+
+ +Geohashes + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGroupID(level) → {string} +

+ + + + + + +
+ Get the group ID of the geohash at the specified level. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
level + + +number + + + + The number of levels to go up from the current geohash.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The group ID of the geohash at the specified level. +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getParentGeohash(keepPropertiesopt) → {Geohash|null} +

+ + + + + + +
+ Get the parent geohash of the geohash. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -909,17 +2705,14 @@
Properties:
+ +
- -
Inherited From:
-
@@ -943,7 +2736,7 @@
Properties:
Source:
@@ -959,34 +2752,75 @@
Properties:
+ + + + + + + + + +
Returns:
+ + +
+ A Geohash model or null if the geohash is empty. +
+ + + +
+
+ Type +
+
+ +Geohash +| + +null + + +
+
+ + + + + + + -

- - - - type :string -

+ + + +

+ + + + getPoint() → {Object|null} +

+ + +
- The name of this type of model + Get the center point of the geohash.
-
Type:
-
    -
  • - -string -
  • -
+ + + @@ -1001,11 +2835,6 @@
Type:
-
Overrides:
-
- @@ -1026,7 +2855,7 @@
Type:
Source:
@@ -1042,92 +2871,76 @@
Type:
- - - -

Methods

- - - - -

- - - - addCustomProperties(properties) → {Object} -

- - -
- Given a set of properties from a Feature from this Map Asset model, add any -custom properties to the properties object and return it. +
Returns:
+ + +
+ Returns object with latitude and longitude keys.
+
+
+ Type +
+
+ +Object +| +null +
+
+ -
Parameters:
- -
NameTypeAttributesDefaultDescription
statusDetailskeepProperties -string +boolean @@ -887,19 +2681,21 @@
Properties:
+ +
- null + false Any further details about the status, -especially when there was an error.If true, the parent geohash +will have the same properties as this child geohash.
- - - - - - + - + - - - + +

+ + -

+ + getPrecision() → {number} + - - - - + + + + +
+ Get the associated precision level for the current camera height. +Required that a mapModel be set on the model. If one is not set, then +the minimum precision from the geohash collection will be returned. +
- - - - - - - -
NameTypeDescription
properties - - -Object - - A set of key-value pairs representing the existing -properties of a feature from this asset.
@@ -1140,14 +2953,9 @@
Parameters:
Since:
-
  • 2.19.0
+
  • 2.25.0
- -
Inherited From:
-
@@ -1171,7 +2979,7 @@
Parameters:
Source:
@@ -1200,7 +3008,7 @@
Returns:
- The properties object with any custom properties added. + The precision level.
@@ -1211,7 +3019,7 @@
Returns:
-Object +number
@@ -1229,12 +3037,12 @@
Returns:
-

- +

+ - determineGeohashLevel(altitude) + getPrecision() → {number|null}

@@ -1243,8 +3051,7 @@

- This function will return the appropriate geohash level to use for mapping -geohash tiles on the map at the specified altitude (zoom level). + Get the precision of the geohash.
@@ -1255,55 +3062,6 @@

-

Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
altitude - - -Number - - - - The distance from the surface of the earth in meters
- - @@ -1337,7 +3095,7 @@
Parameters:
Source:
@@ -1366,11 +3124,26 @@
Returns:
- The geohash level, an integer between 0 and 9. + The precision of the geohash.
+
+
+ Type +
+
+ +number +| + +null + + +
+
+ @@ -1383,12 +3156,12 @@
Returns:
-

- +

+ - featureIsSelected(feature) → {boolean} + getProperty(key) → {*}

@@ -1397,9 +3170,7 @@

- Given a feature object from a Feature model, checks if it is part of the -selectedFeatures collection. See featureObject property from -Feature#defaults. + Get a property from the geohash.
@@ -1435,13 +3206,13 @@

Parameters:
- feature + key -* +string @@ -1451,8 +3222,7 @@
Parameters:
- An object that a Map widget uses to represent this feature -in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature + The key of the property to get. @@ -1470,11 +3240,6 @@
Parameters:
- -
Inherited From:
-
@@ -1498,7 +3263,7 @@
Parameters:
Source:
@@ -1527,8 +3292,7 @@
Returns:
- Returns true if the given feature is part of the -selectedFeatures collection in this asset + The value of the property.
@@ -1539,7 +3303,7 @@
Returns:
-boolean +*
@@ -1548,89 +3312,38 @@
Returns:
- - - - - - - - - -

- - - - - featureIsVisible(properties) → {boolean} -

- - - - - - -
- This function checks whether a feature from the MapAsset is visible on the map -based on the properties of the feature and the MapAsset's filter settings. -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - + + + - - - + - +

+ + -

- - - + + getPropertyOfInterest() → {string} + + + + + + + +
+ Get the property that we want the geohashes to display, e.g. count. +
- - - - - - - -
NameTypeDescription
properties - - -Object - - The properties of the feature to be filtered. (See -the 'properties' attribute of Feature#defaults.)
@@ -1642,12 +3355,10 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -1671,7 +3382,7 @@
Parameters:
Source:
@@ -1700,9 +3411,7 @@
Returns:
- Returns true if the feature passes all the filters, or if -there are no filters set for this MapAsset. Returns false if the feature fails -any of the filters. + The property of interest.
@@ -1713,7 +3422,7 @@
Returns:
-boolean +string
@@ -1731,12 +3440,12 @@
Returns:
-

- +

+ - fetchIcon(pid) + initialize(assetConfigopt)

@@ -1745,8 +3454,7 @@

- Fetches an SVG given a pid, sanitizes it, then updates the model's icon -attribute with the new and SVG string (after sanitizing it) + Executed when a new CesiumGeohash model is created.
@@ -1770,6 +3478,8 @@

Parameters:
Type + Attributes + @@ -1782,23 +3492,34 @@
Parameters:
- pid + assetConfig -string +MapConfig#MapAssetConfig + + + <optional>
+ + + + + + + - + The initial values of +the attributes, which will be set on the model. @@ -1816,11 +3537,6 @@
Parameters:
- -
Inherited From:
-
@@ -1844,7 +3560,7 @@
Parameters:
Source:
@@ -1880,12 +3596,12 @@
Parameters:
-

- +

+ - formatDateProperty(config, properties) → {string} + isEmpty() → {boolean}

@@ -1894,8 +3610,8 @@

- Given a definition for a new date property, and the properties that already -exist on a specific feature, returns a new string with the formatted date. + Checks if the geohash is empty. It is considered empty if it has no +hashString set.
@@ -1906,80 +3622,6 @@

-

Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
config - - -MapConfig#CustomDateProperty - - - - An object that defines the new -date property to create
properties - - -Object - - - - key-value pairs representing existing properties in -a Feature
- - @@ -1989,15 +3631,7 @@
Parameters:
-
Since:
-
  • 2.19.0
- - -
Inherited From:
-
@@ -2021,7 +3655,7 @@
Parameters:
Source:
@@ -2050,8 +3684,7 @@
Returns:
- The value for the new date property, formatted as defined by -config, for the given feature + true if the geohash is empty, false otherwise.
@@ -2062,7 +3695,7 @@
Returns:
-string +boolean
@@ -2080,12 +3713,12 @@
Returns:
-

- +

+ - formatStringProperty(config, properties) → {string} + isParentOf(hashString)

@@ -2094,11 +3727,7 @@

- For a given set of Feature properties and a definition for a new sting -property, returns the value of the custom property. Note that since only static -strings are supported so far, this function essentially just returns the value -of config.value. This function exists to allow support of dynamic strings in -the future (e.g. combining strings from existing properties) + Checks if this geohash contains the given geohash
@@ -2134,37 +3763,13 @@

Parameters:
- config - - - - - -MapConfig#CustomStringProperty - - - - - - - - - - The object the defines the new -custom property - - - - - - - properties + hashString -Object +string @@ -2174,8 +3779,7 @@
Parameters:
- key-value pairs representing existing properties in -a Feature + The hashString of the geohash to check. @@ -2192,15 +3796,7 @@
Parameters:
-
Since:
-
  • 2.19.0
- - -
Inherited From:
-
@@ -2224,7 +3820,7 @@
Parameters:
Source:
@@ -2249,28 +3845,6 @@
Parameters:
-
Returns:
- - -
- The new string for the given Feature property -
- - - -
-
- Type -
-
- -string - - -
-
- - @@ -2282,12 +3856,12 @@
Returns:
-

- +

+ - getColor(properties) → {AssetColor#Color} + isProperty(key) → {boolean}

@@ -2296,8 +3870,7 @@

- Given properties of a Feature model from this MapAsset, returns the color -associated with that feature. + Checks if the geohash has a property with the given key.
@@ -2333,13 +3906,13 @@

Parameters:
- properties + key -Object +string @@ -2349,9 +3922,7 @@
Parameters:
- The properties of the feature to get the color for; -An object containing key-value mapping of property names to properties. (See -the 'properties' attribute of Feature#defaults.) + The key to check for. @@ -2369,11 +3940,6 @@
Parameters:
- -
Inherited From:
-
@@ -2397,7 +3963,7 @@
Parameters:
Source:
@@ -2426,8 +3992,8 @@
Returns:
- The color associated with the given set of -properties. + True if the geohash has a property with the given +key, false otherwise.
@@ -2438,7 +4004,7 @@
Returns:
-AssetColor#Color +boolean
@@ -2456,12 +4022,12 @@
Returns:
-

- +

+ - getGeohashes(south, west, north, east, precision, boundingBoxes) + removeProperty(key)

@@ -2469,6 +4035,10 @@

+
+ Remove a property from the geohash. +
+ @@ -2502,13 +4072,13 @@

Parameters:
- south + key -Number +string @@ -2518,114 +4088,144 @@
Parameters:
- The south-most coordinate of the area to get geohashes -for + The key of the property to remove. + + - - - west - - - - -Number - - - - +
- The west-most coordinate of the area to get geohashes for - + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + +
+ + + + + + + + + + + + + + + + - - - north - - - - -Number + - - + - + +

+ + - The north-most coordinate of the area to get geohashes -for - + + replaceGeohashes(geohashes) +

+ - - - east - - - - -Number +
+ Replace the collection of geohashes to display on the map with a new +set. +
- - - - - The east-most coordinate of the area to get geohashes for - - - - - precision - - - - -Number - - +
Parameters:
+ - + + + + + + - + - - + + + + + + + + - + + @@ -2653,6 +4253,9 @@
Parameters:
+
Since:
+
  • 2.25.0
+ @@ -2677,7 +4280,7 @@
Parameters:
Source:
@@ -2713,12 +4316,12 @@
Parameters:
-

- +

+ - isSVG(str) → {Boolean} + selectGeohashes(geohash)

@@ -2727,7 +4330,8 @@

- Simple test to see if a string is an SVG + Find the geohash Entity on the map and add it to the selected +features.
@@ -2763,7 +4367,7 @@

Parameters:
- + + @@ -2796,12 +4400,10 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -2825,7 +4427,7 @@
Parameters:
Source:
@@ -2850,29 +4452,6 @@
Parameters:
-
Returns:
- - -
- Returns true if the string starts with ``, regardless of case -
- - - -
-
- Type -
-
- -Boolean - - -
-
- - @@ -2884,12 +4463,12 @@
Returns:
-

- +

+ - isVisible() → {boolean} + startListening()

@@ -2898,8 +4477,8 @@

- Checks that the visible attribute is set to true and that the opacity attribute -is greater than zero. If both conditions are met, returns true. + Update and re-render the geohashes when the collection of geohashes +changes.
@@ -2919,12 +4498,10 @@

- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -2948,7 +4525,7 @@

Source:
@@ -2973,28 +4550,6 @@

-

Returns:
- - -
- Returns true if the MapAsset has opacity > 0 and is visible. -
- - - -
-
- Type -
-
- -boolean - - -
-
- - @@ -3006,12 +4561,12 @@
Returns:
-

- +

+ - resetStatus() + stopListeners()

@@ -3020,8 +4575,7 @@

- Resets the Map Asset's status and statusDetails attributes to their default -values. + Stop the model from listening to itself for changes.
@@ -3042,14 +4596,9 @@

Since:
-
  • X.X.X
+
  • 2.25.0
- -
Inherited From:
-
@@ -3073,7 +4622,7 @@

Source:
@@ -3109,12 +4658,12 @@

-

- +

+ - sanitizeIcon(icon, callback) + toCZML(label) → {Object}

@@ -3123,7 +4672,7 @@

- Takes an SVG string and returns it with only the allowed tags and attributes + Get the geohash as a CZML Feature.
@@ -3159,36 +4708,13 @@

Parameters:
- - - - - - - - - - - - - - - - - + + @@ -3217,11 +4742,6 @@
Parameters:
- -
Inherited From:
-
@@ -3245,7 +4765,7 @@
Parameters:
Source:
@@ -3270,6 +4790,30 @@
Parameters:
+
Returns:
+ + +
+ A CZML Feature representing the geohash, including +a polygon of the geohash area and a label with the value of the +property specified by the label parameter. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + @@ -3281,12 +4825,12 @@
Parameters:
-

- +

+ - updateIcon(icon) + toGeoJSON() → {Object}

@@ -3295,8 +4839,7 @@

- Sanitizes an SVG string and updates the model's 'icon' attribute the sanitized -string. Also sets the 'iconStatus' attribute to 'success'. + Get the geohash as a GeoJSON Feature.
@@ -3307,55 +4850,6 @@

-

Parameters:
- - -
NameTypeAn integer between 1 and 9 representing the geohash
Description
boundingBoxesgeohashes -Boolean +Array.<Geohash> +| + +Array.<Object> @@ -2635,8 +4235,8 @@
Parameters:
-
Set to true to return the bounding box for each -geohash level to showThe new set of geohash models to +display or attributes for the new geohash models.
strgeohash @@ -2779,7 +4383,7 @@
Parameters:
-
The string to checkThe geohash to select.
icon - - -string - - - - The SVG icon string to sanitize
callbacklabel -function +* @@ -3198,8 +4724,7 @@
Parameters:
-
Function to call once the icon has been sanitized. -Will pass the sanitized icon string.The key for the property to display as a label.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
icon - - -string - - - - An SVG string to use for the MapAsset icon
- - @@ -3366,11 +4860,6 @@
Parameters:
- -
Inherited From:
-
@@ -3394,7 +4883,7 @@
Parameters:
Source:
@@ -3419,6 +4908,28 @@
Parameters:
+
Returns:
+ + +
+ A GeoJSON Feature representing the geohash. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + @@ -3430,12 +4941,12 @@
Parameters:
-

- +

+ - whenReady() → {Promise} + updateColorRangeValues()

@@ -3444,7 +4955,8 @@

- Checks if the asset information has been fetched and is ready to use. + For the property of interest (e.g. count) Get the min and max values +from the geohashes collection and update the color palette.
@@ -3464,12 +4976,10 @@

- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -3493,7 +5003,7 @@

Source:
@@ -3518,28 +5028,6 @@

-

Returns:
- - -
- Returns a promise that resolves to this model when ready. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - diff --git a/docs/docs/Geohashes.html b/docs/docs/Geohashes.html new file mode 100644 index 000000000..370a9ea12 --- /dev/null +++ b/docs/docs/Geohashes.html @@ -0,0 +1,5773 @@ + + + + + MetacatUI Dev Docs: Class: Geohashes + + + + + + + + + + + + + + +
+ +

Class: Geohashes

+ + + + + + +
+ +
+ +

Geohashes()

+ +
A collection of adjacent geohashes, potentially at mixed +precision levels.
+ + + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new Geohashes() +

+ + + + + + + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + +
    +
  • Backbone.Collection
  • +
+ + + + + + + + + + + + + + + +

Members

+ + + +

+ + + + + model :Geohash +

+ + + + +
+ The model class for this collection +
+ + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + type :string +

+ + + + +
+ The name of this type of collection +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + addGeohashesByBounds(bounds, consolidateopt, maxGeohashesopt, overwriteopt, minPrecisionopt, maxPrecisionopt) +

+ + + + + + +
+ Add geohashes to the collection based on a bounding box. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
bounds + + +Object + + + + + + + + + + + + Bounding box with north, south, east, and west +properties.
consolidate + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Whether to consolidate the +geohashes into the smallest set of geohashes that cover the same area. +This will be performed before creating the new models in order to +improve performance.
maxGeohashes + + +number + + + + + + <optional>
+ + + + + +
+ + Infinity + + The maximum number of +geohashes to add to the collection. This will limit the precision of +the geohashes for larger bounding boxes. Depending on constraints such +as the min and max precision, and the size of the bounding box, the +actual number of geohashes added may sometimes exceed this number.
overwrite + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Whether to overwrite the current +collection.
minPrecision + + +number + + + + + + <optional>
+ + + + + +
+ + The minimum precision of the +geohashes to add to the collection, defaults to the min precision +level set on the collection.
maxPrecision + + +number + + + + + + <optional>
+ + + + + +
+ + The maximum precision of the +geohashes to add to the collection, defaults to the max precision +level set on the collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + addGeohashesByHashString(hashStrings, overwriteopt) +

+ + + + + + +
+ Add geohashes to the collection based on an array of geohash +hashStrings. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
hashStrings + + +Array.<string> + + + + + + + + + + + + Array of geohash hashStrings.
overwrite + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Whether to overwrite the current +collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + boundsAreValid(bounds) → {boolean} +

+ + + + + + +
+ Check that a bounds object is valid for the purposes of other methods +in this Collection. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bounds + + +Object + + + + Bounding box with north, south, east, and west +properties.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Whether the bounds object is valid. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + comparator(model) → {number} +

+ + + + + + +
+ Add a comparator to sort the geohashes by length. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
model + + +Geohash + + + + Geohash model to compare.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Length of the geohash. +
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + + + + + + + + + +

+ + + + + consolidate() +

+ + + + + + +
+ Consolidate this collection: Merge complete groups of geohashes into a +single, lower precision "parent" geohash. Groups are complete if all 32 +"child" geohashes that make up the "parent" geohash are in the +collection. Add and remove events will not be triggered during +consolidation. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + coversEarth() → {boolean} +

+ + + + + + +
+ Returns true if the geohashes in this model cover the entire earth. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ True if the geohashes cover the entire earth. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + getAllHashStrings(precision) → {Array.<string>} +

+ + + + + + +
+ Returns a list of hashStrings in this collection. Optionally provide a +precision to only return hashes of that length. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
precision + + +Number + + + + Geohash precision level.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Array of geohash hashStrings. +
+ + + +
+
+ Type +
+
+ +Array.<string> + + +
+
+ + + + + + + + + + + + + +

+ + + + + getAttr(attr) +

+ + + + + + +
+ Get an array of all the values for a given property in the geohash +models in this collection. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + The key of the property in the properties object +in each geohash model.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getBoundingBoxArea(bounds) → {Number} +

+ + + + + + +
+ Get the area of a bounding box in degrees. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bounds + + +Object + + + + Bounding box with north, south, east, and west +properties.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The area of the bounding box in degrees. +
+ + + +
+
+ Type +
+
+ +Number + + +
+
+ + + + + + + + + + + + + +

+ + + + + getCompleteGroups() → {Object} +

+ + + + + + +
+ Get the geohash groups in this collection that are complete, i.e. have +32 child geohashes. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Object with groupIDs as keys and arrays of Geohash +models as values. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getContainingGeohash(hashString) → {Geohash} +

+ + + + + + +
+ Find the geohash from this collection that contains the provided +geohash hashString. If the hashString is already in the collection, +return that geohash. Otherwise, find the geohash that contains the +hashString. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hashString + + +string + + + + Geohash hashString.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Parent geohash. +
+ + + +
+
+ Type +
+
+ +Geohash + + +
+
+ + + + + + + + + + + + + +

+ + + + + getFewestHashStringsForBounds(bounds, minPrecisionopt, maxPrecisionopt, maxGeohashesopt) → {Array.<string>} +

+ + + + + + +
+ Get the fewest number of geohashes that can be used to cover a given +bounding box. This will return the optimal set of potentially +mixed-precision geohashes that cover the bounding box at the highest +precision possible without exceeding the maximum number of geohashes. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
bounds + + +Object + + + + + + + + + + + + Bounding box with north, south, east, and west +properties.
minPrecision + + +Number + + + + + + <optional>
+ + + + + +
+ + The minimum precision level to +consider when calculating the optimal set of geohashes. Defaults to the +min precision level set on the collection.
maxPrecision + + +Number + + + + + + <optional>
+ + + + + +
+ + The maximum precision level to +consider when calculating the optimal set of geohashes. Defaults to the +max precision level set on the collection.
maxGeohashes + + +Number + + + + + + <optional>
+ + + + + +
+ + Infinity + + The maximum number of +geohashes to add to the collection. This will limit the precision of +the geohashes for larger bounding boxes. Depending on constraints such +as the min and max precision, and the size of the bounding box, the +actual number of geohashes added may sometimes exceed this number.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Array of geohash hashStrings. +
+ + + +
+
+ Type +
+
+ +Array.<string> + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeohashArea(precision) → {number} +

+ + + + + + +
+ Get the area in degrees squared of a geohash "tile" for a given +precision level. The area is considered the product of the geohash's +latitude and longitude error margins. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
precision + + +number + + + + The precision level to get the area for.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The area in degrees squared. +
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeohashAreas(minPrecision, maxPrecision) → {Object} +

+ + + + + + +
+ For a range of precisions levels, get the area in degrees squared for +geohash "tiles" at each precision level. See getGeohashArea. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
minPrecision + + +Number + + + + The minimum precision level for which to +calculate the area, defaults to the min precision level set on the +collection.
maxPrecision + + +Number + + + + The maximum precision level for which to +calculate the area, defaults to the max precision level set on the +collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with the precision level as the key and the +area in degrees as the value. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGroups(levelopt) → {Object} +

+ + + + + + +
+ Group the geohashes in the collection by their groupID. Their groupID +is the hashString of the parent geohash, i.e. the hashString of the +geohash with the last character removed. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
level + + +number + + + + + + <optional>
+ + + + + +
+ + 1 + + The level of the parent geohash to use to +group the geohashes. Defaults to 1, i.e. the parent geohash is one +level up.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Object with groupIDs as keys and arrays of Geohash +models as values. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getHashStringsForBounds(bounds, precision) → {Array.<string>} +

+ + + + + + +
+ Creates hashStrings for geohashes that are within the provided bounding +boxes at the given precision. The returned hashStrings are not +necessarily in the collection. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bounds + + +Object + + + + Bounding box with north, south, east, and west +properties.
precision + + +number + + + + Geohash precision level.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Array of geohash hashStrings. +
+ + + +
+
+ Type +
+
+ +Array.<string> + + +
+
+ + + + + + + + + + + + + +

+ + + + + getMaxPrecision(area, maxGeohashes, absMinopt, absMaxopt) → {Number} +

+ + + + + + +
+ Given a bounding box, estimate the maximum geohash precision that can +be used to cover the area without exceeding a specified number of +geohashes. The goal is to find the smallest and most precise geohashes +possible without surpassing the maximum allowed number of geohashes. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
area + + +Number + + + + + + + + + + The area of the bounding box in degrees squared.
maxGeohashes + + +Number + + + + + + + + + + The maximum number of geohashes that can +be used to cover the area.
absMin + + +Number + + + + + + <optional>
+ + + + + +
The absolute minimum precision level to +consider. Defaults to the min set on the collection).
absMax + + +Number + + + + + + <optional>
+ + + + + +
The absolute maximum precision level to +consider. Defaults to the max set on the collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The maximum precision level that can be used to cover +the area without surpassing the given number of geohashes. +
+ + + +
+
+ Type +
+
+ +Number + + +
+
+ + + + + + + + + + + + + +

+ + + + + getMinPrecision(area, absMin, absMax) → {Number} +

+ + + + + + +
+ Calculate the smallest possible geohash precision level that has +geohash "tiles" larger than a given area. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
area + + +Number + + + + The area of the bounding box in degrees squared.
absMin + + +Number + + + + The absolute minimum precision level to +consider. Defaults to the min set on the collection.
absMax + + +Number + + + + The absolute maximum precision level to +consider. Defaults to the max set on the collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The minimum precision level that can be used to cover +the area with a single geohash. +
+ + + +
+
+ Type +
+
+ +Number + + +
+
+ + + + + + + + + + + + + +

+ + + + + getOptimalPrecisionRange(bounds, maxGeohashes, absMin, absMax) → {Array} +

+ + + + + + +
+ Get the optimal range of precision levels to consider using for a given +bounding box. See getMaxPrecision and getMinPrecision. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bounds + + +Object + + + + Bounding box with north, south, east, and west +properties.
maxGeohashes + + +Number + + + + The maximum number of geohashes that can +be used to cover the area.
absMin + + +Number + + + + The absolute minimum precision level to +consider. Defaults to the min set on the collection.
absMax + + +Number + + + + The absolute maximum precision level to +consider. Defaults to the max set on the collection.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array with the min and max precision levels to +consider. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + + + + + + + + + +

+ + + + + getPrecisions() +

+ + + + + + +
+ Get the unique geohash precision levels present in the collection. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getSubsetByBounds(bounds) → {Geohashes} +

+ + + + + + +
+ Get a subset of geohashes from this collection that are within the +provided bounding box. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bounds + + +Object + + + + Bounding box with north, south, east, and west +properties.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Subset of geohashes. +
+ + + +
+
+ Type +
+
+ +Geohashes + + +
+
+ + + + + + + + + + + + + +

+ + + + + includes(target) → {boolean} +

+ + + + + + +
+ Check if a geohash is in the collection. This will only consider +geohash hashStrings, not properties or any other attributes on the +Geohash models. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
target + + +Geohash + + + + Geohash model or geohash hashString.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Whether the target is part of this collection. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize(models, options) +

+ + + + + + +
+ Initialize the collection and set the min and max precision levels. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
models + + +Array.<Geohash> + + + + Array of Geohash models.
options + + +Object + + + + Options to pass to the collection. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
maxPrecision + + +number + + + + + + <optional>
+ + + + + +
+ + 9 + + The maximum precision level +to use when adding geohashes to the collection.
minPrecision + + +number + + + + + + <optional>
+ + + + + +
+ + 1 + + The minimum precision level +to use when adding geohashes to the collection.
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + isCompleteRootLevel() → {boolean} +

+ + + + + + +
+ Returns true if the set of geohashes in this model collection are the +32 geohashes at precision 1, i.e. [0-9a-v] +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ True if there are 32 geohashes with one character +each. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + isEmpty() → {boolean} +

+ + + + + + +
+ Checks if the geohashes in this model are empty or if there are no +models +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ True if this collection is empty. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + splitBoundingBox(bounds) → {Array.<Object>} +

+ + + + + + +
+ Splits a given bounding box if it crosses the prime meridian. Returns +an array of bounding boxes. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bounds + + +Object + + + + Bounding box object with north, south, east, +and west properties.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Array of bounding box objects. +
+ + + +
+
+ Type +
+
+ +Array.<Object> + + +
+
+ + + + + + + + + + + + + +

+ + + + + toCZML(labelopt) → {Array} +

+ + + + + + +
+ Return the geohashes as a CZML document, where each geohash is +represented as a CZML Polygon (rectangle) and a CZML Label. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
label + + +string + + + + + + <optional>
+ + + + + +
The key for the property that should be +displayed with a label for each geohash, e.g. "count"
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ CZML document. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + + + + + + + + + +

+ + + + + toGeoJSON() → {Object} +

+ + + + + + +
+ Return the geohashes as a GeoJSON FeatureCollection, where each geohash +is represented as a GeoJSON Polygon (rectangle). +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ GeoJSON FeatureCollection. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + toGeoJSONPoints() → {Object} +

+ + + + + + +
+ Return the geohashes as a GeoJSON FeatureCollection, where each geohash +is represented as a GeoJSON Point. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ GeoJSON FeatureCollection. +
+ + + +
+
+ Type +
+
+ +Object + + +
+
+ + + + + + + + + + + + + +

+ + + + + validatePrecision(precision, fixopt) → {number|Array.<number>} +

+ + + + + + +
+ Ensure that a precision or list of precisions is valid. A valid precision +is a positive number in the range of the MIN_PRECISION and MAX_PRECISION +set on the collection. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
precision + + +number +| + +Array.<number> + + + + + + + + + + + + Precision level or array of +precision levels.
fix + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + Whether to fix the precision by setting it +to the min or max precision if it is out of range. If false, then the function +will throw an error if the precision is invalid.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The precision level or array of precision +levels, corrected if needed and if fix is true. +
+ + + +
+
+ Type +
+
+ +number +| + +Array.<number> + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/GoogleAnalytics.html b/docs/docs/GoogleAnalytics.html new file mode 100644 index 000000000..4721d5475 --- /dev/null +++ b/docs/docs/GoogleAnalytics.html @@ -0,0 +1,1841 @@ + + + + + MetacatUI Dev Docs: Class: GoogleAnalytics + + + + + + + + + + + + + + +
+ +

Class: GoogleAnalytics

+ + + + + + +
+ +
+ +

GoogleAnalytics()

+ +
A model that connects with an analytics service to record user +interactions with the app
+ + + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new GoogleAnalytics() +

+ + + + + + + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Members

+ + + +

+ + + + + track :function +

+ + + + +
+ The main function for sending analytics events to the service. +
+ + + +
Type:
+
    +
  • + +function + + +
  • +
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + type :string +

+ + + + +
+ The name of this Model +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + createExceptionDescription(message, id) → {string} +

+ + + + + + +
+ Given a message and an optional ID, create a description of an +exception event that can be sent to an analytics service. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + +string + + + + A description of the exception
id + + +string + + + + The ID for the associated package or object
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ A description of the exception event +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + defaults() → {object} +

+ + + + + + +
+ Default attributes for this model +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getKey() → {string} +

+ + + + + + +
+ Get the key for the analytics service. This is the ID that is used to +initialize the analytics service. +
+ + + + + + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The key for the analytics service +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getVersion() → {string} +

+ + + + + + +
+ Get the version number of the MetacatUI app. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The version number of the MetacatUI app +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize() +

+ + + + + + +
+ Creates a new Analytics model +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + ready() → {boolean} +

+ + + + + + +
+ Check if analytics service is enabled and ready to use. +
+ + + + + + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ True if the service is enabled in the app and the +track method is available. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + setupAnalytics() +

+ + + + + + +
+ Set up the analytics service. +
+ + + + + + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + trackEvent(category, action, label, value) +

+ + + + + + +
+ Send the details of an event to an analytics service. The function will +do nothing if an analytics service is not enabled. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
category + + +string + + + + The category of the event
action + + +string + + + + The action of the event
label + + +string + + + + The label of the event
value + + +string + + + + The value of the event
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + trackException(message, id, fatal) +

+ + + + + + +
+ Send the details of an exception event to an analytics service. This +will automatically include the MetacatUI version number in the event +details. The function will do nothing if an analytics service is not +enabled. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + +string + + + + A description of the exception
id + + +string + + + + The ID for the associated package or object
fatal + + +boolean + + + + Whether the exception was fatal
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + trackPageView(path, title) +

+ + + + + + +
+ Send the details of a page view to an analytics service. The function +will do nothing if an analytics service is not enabled. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
path + + +string + + + + The path of the page
title + + +string + + + + The title of the page
+ + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/GroupListView.html b/docs/docs/GroupListView.html index 18567d832..9f55edee4 100644 --- a/docs/docs/GroupListView.html +++ b/docs/docs/GroupListView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ImageUploaderView.html b/docs/docs/ImageUploaderView.html index 04cfbe9d1..01c0fc824 100644 --- a/docs/docs/ImageUploaderView.html +++ b/docs/docs/ImageUploaderView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LayerDetailView.html b/docs/docs/LayerDetailView.html index 4ebaf3e20..5c9efea1e 100644 --- a/docs/docs/LayerDetailView.html +++ b/docs/docs/LayerDetailView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LayerDetailsView.html b/docs/docs/LayerDetailsView.html index c53d9860a..abff96be2 100644 --- a/docs/docs/LayerDetailsView.html +++ b/docs/docs/LayerDetailsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LayerInfoView.html b/docs/docs/LayerInfoView.html index 0ff189ac4..7ec7e577c 100644 --- a/docs/docs/LayerInfoView.html +++ b/docs/docs/LayerInfoView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LayerItemView.html b/docs/docs/LayerItemView.html index 377ac09ef..39ca19dfe 100644 --- a/docs/docs/LayerItemView.html +++ b/docs/docs/LayerItemView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LayerListView.html b/docs/docs/LayerListView.html index 8ef8d7ee6..465213712 100644 --- a/docs/docs/LayerListView.html +++ b/docs/docs/LayerListView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -135,7 +135,7 @@

Source:
@@ -256,7 +256,7 @@

Type:
Source:
@@ -334,7 +334,7 @@
Type:
Source:
@@ -412,7 +412,7 @@
Type:
Source:
@@ -490,7 +490,7 @@
Type:
Source:
@@ -568,7 +568,7 @@
Type:
Source:
@@ -715,7 +715,7 @@
Parameters:
Source:
@@ -809,7 +809,7 @@

Source:
diff --git a/docs/docs/LayerNavigationView.html b/docs/docs/LayerNavigationView.html index 4fa4de8eb..31463e001 100644 --- a/docs/docs/LayerNavigationView.html +++ b/docs/docs/LayerNavigationView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LayerOpacityView.html b/docs/docs/LayerOpacityView.html index e8222f301..da05d2c27 100644 --- a/docs/docs/LayerOpacityView.html +++ b/docs/docs/LayerOpacityView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LegendView.html b/docs/docs/LegendView.html index ec6f7e228..092464338 100644 --- a/docs/docs/LegendView.html +++ b/docs/docs/LegendView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -1272,7 +1272,7 @@
Properties:
Source:
@@ -1710,7 +1710,7 @@
Parameters:
Source:
@@ -1855,7 +1855,7 @@
Parameters:
Source:
@@ -1999,7 +1999,7 @@
Parameters:
Source:
diff --git a/docs/docs/LogsSearch.html b/docs/docs/LogsSearch.html index 70948b7e4..355be89d1 100644 --- a/docs/docs/LogsSearch.html +++ b/docs/docs/LogsSearch.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/LookupModel.html b/docs/docs/LookupModel.html index 082ea678b..c5dbd3b00 100644 --- a/docs/docs/LookupModel.html +++ b/docs/docs/LookupModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Map.html b/docs/docs/Map.html index 3563dd5eb..8a068d846 100644 --- a/docs/docs/Map.html +++ b/docs/docs/Map.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MapAsset.html b/docs/docs/MapAsset.html index 594d935ab..d9c75852f 100644 --- a/docs/docs/MapAsset.html +++ b/docs/docs/MapAsset.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -753,6 +753,46 @@
Properties:
+ + + featureType + + + + + +Cesium.Entity +| + +Cesium.3DTilesetFeature + + + + + + + + + <optional>
+ + + + + + + + + + + + + For vector +and 3d tileset assets, the object type that cesium uses to represent features +from the asset. Null for imagery and terrain assets. + + + + customProperties @@ -1163,7 +1203,7 @@
Parameters:
Source:
@@ -1221,6 +1261,178 @@
Returns:
+

+ + + + + containsFeature(feature) → {boolean} +

+ + + + + + +
+ Given a feature object from a Feature model, checks if it is part of the +selectedFeatures collection. See featureObject property from +Feature#defaults. For vector and 3d tile models only. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +* + + + + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the given feature is part of the +selectedFeatures collection in this asset +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + +

@@ -1237,7 +1449,7 @@

@@ -1331,7 +1543,7 @@

Parameters:
Source:
@@ -1499,7 +1711,7 @@

Parameters:
Source:
@@ -1667,7 +1879,7 @@
Parameters:
Source:
@@ -1839,7 +2051,7 @@
Parameters:
Source:
@@ -2037,7 +2249,7 @@
Parameters:
Source:
@@ -2205,7 +2417,7 @@
Parameters:
Source:
@@ -2264,12 +2476,12 @@
Returns:
-

- +

+ - isSVG(str) → {Boolean} + getFeatureAttributes(feature) → {Object}

@@ -2278,7 +2490,8 @@

- Simple test to see if a string is an SVG + Given a feature object from a Feature model, returns the attributes +needed to create a Feature model. For vector and 3d tile models only.
@@ -2314,13 +2527,13 @@

Parameters:
- str + feature -string +* @@ -2330,7 +2543,8 @@
Parameters:
- The string to check + An object that a Map widget uses to represent this feature +in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature @@ -2371,7 +2585,7 @@
Parameters:
Source:
@@ -2400,8 +2614,9 @@
Returns:
- Returns true if the string starts with ``, regardless of case + An object with properties, mapAsset, featureID, featureObject, +and label properties. Returns null if the feature is not the correct type +for this asset model.
@@ -2412,7 +2627,7 @@
Returns:
-Boolean +Object
@@ -2430,12 +2645,12 @@
Returns:
-

- +

+ - isVisible() → {boolean} + isSVG(str) → {Boolean}

@@ -2444,8 +2659,7 @@

- Checks that the visible attribute is set to true and that the opacity attribute -is greater than zero. If both conditions are met, returns true. + Simple test to see if a string is an SVG
@@ -2456,25 +2670,74 @@

+

Parameters:
+ + + + + + + + + -
+ - +
+ + + - + + + + - + - + + + + + + + + + +
NameTypeDescription
str + + +string - - + + The string to check
+ + + + + + +
+ + + + + + + + + + + + + + @@ -2489,7 +2752,125 @@

Source:
+ + + + + + + +

+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns true if the string starts with ``, regardless of case +
+ + + +
+
+ Type +
+
+ +Boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + isVisible() → {boolean} +

+ + + + + + +
+ Checks that the visible attribute is set to true and that the opacity attribute +is greater than zero. If both conditions are met, returns true. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2609,7 +2990,7 @@

Source:
@@ -2776,7 +3157,7 @@

Parameters:
Source:
@@ -2871,7 +3252,7 @@

Source:
@@ -3015,7 +3396,160 @@

Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + usesFeatureType(feature) → {boolean} +

+ + + + + + +
+ Checks if a feature from the map (a Cesium object) is the type of +feature that this map asset model contains. For example, if a +Cesium3DTilesetFeature is passed to this function, this function +will return true if it is a Cesium3DTileset model, and false if it +is a CesiumVectorData model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Cesium3DTilesetFeature +| + +Cesium.Entity + + + +
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -3040,6 +3574,29 @@
Parameters:
+
Returns:
+ + +
+ true if the feature is an instance of the feature +type set on the asset model, false otherwise. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -3109,7 +3666,7 @@

Source:
diff --git a/docs/docs/MapAssets.html b/docs/docs/MapAssets.html index 94f1d4c10..98a788b9c 100644 --- a/docs/docs/MapAssets.html +++ b/docs/docs/MapAssets.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,9 +48,9 @@

Class: MapAssets

MapAssets()

-
A MapAssets collection is a group of MapAsset models - models that -provide the information required to render geo-spatial data on a map, including -imagery (raster), vector, and terrain data.
+
A MapAssets collection is a group of MapAsset models - models +that provide the information required to render geo-spatial data on a map, +including imagery (raster), vector, and terrain data.
@@ -125,7 +125,7 @@

Source:
@@ -192,6 +192,400 @@

Methods

+

+ + + + + addAsset(asset, mapModelopt) → {MapAsset} +

+ + + + + + +
+ Add a new MapAsset model to this collection. This is useful if adding +the collection from a Map model, since this method will attach the Map +model to the MapAsset model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
asset + + +MapConfig#MapAssetConfig +| + +MapAsset + + + + + + + + + + The configuration +object for the MapAsset model, or the MapAsset model itself.
mapModel + + +MapModel + + + + + + <optional>
+ + + + + +
The Map model that contains this +collection. This is optional, but if provided, it will be attached to +the MapAsset model.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Returns the MapAsset model that was added to the +collection. +
+ + + +
+
+ Type +
+
+ +MapAsset + + +
+
+ + + + + + + + + + + + + +

+ + + + + findAssetWithFeature(feature) → {MapAsset} +

+ + + + + + +
+ Find the map asset model that contains a feature selected directly from +the map view widget. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
feature + + +Cesium.Entity +| + +Cesium.Cesium3DTilesetFeature + + + + The +feature selected from the map view widget.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Returns the MapAsset model that contains the +feature. +
+ + + +
+
+ Type +
+
+ +MapAsset + + +
+
+ + + + + + + + + + + + +

@@ -206,8 +600,8 @@

- Get a list of MapAsset models from this collection that are of a -given type. + Get a list of MapAsset models from this collection that are of a given +type.
@@ -312,7 +706,7 @@

Parameters:
Source:
@@ -371,6 +765,180 @@

Returns:
+

+ + + + + getFeatureAttributes(features) → {Array.<Object>} +

+ + + + + + +
+ Given features selected from the map view widget, get the attributes +required to create new Feature models. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
features + + +Cesium.Entity +| + +Array.<Cesium.Cesium3DTilesetFeature> + + + + The +feature selected from the map view widget.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Returns an array of attributes that can be used +to create new Feature models. +
+ + + +
+
+ Type +
+
+ +Array.<Object> + + +
+
+ + + + + + + + + + + + +

@@ -429,7 +997,7 @@

Source:
@@ -480,8 +1048,8 @@

Creates the type of Map Asset based on the given type. This function is -typically not called directly. It is used by Backbone.js when adding a new -model to the collection. +typically not called directly. It is used by Backbone.js when adding a +new model to the collection.
@@ -533,8 +1101,9 @@

Parameters:
- An object that configured the -source the asset data, as well as metadata and display properties of the asset. + An object that +configured the source the asset data, as well as metadata and display +properties of the asset. @@ -575,7 +1144,7 @@

Parameters:
Source:
@@ -656,8 +1225,9 @@

- Set the parent map model on each of the MapAsset models in this collection. -This must be the Map model that contains this asset collection. + Set the parent map model on each of the MapAsset models in this +collection. This must be the Map model that contains this asset +collection.
@@ -709,7 +1279,8 @@

Parameters:
- The map model to set on each of the MapAsset models + The map model to set on each of the MapAsset +models @@ -750,7 +1321,7 @@
Parameters:
Source:
diff --git a/docs/docs/MapConfig.html b/docs/docs/MapConfig.html index d3aec0ba7..61648ec0a 100644 --- a/docs/docs/MapConfig.html +++ b/docs/docs/MapConfig.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -58,10 +58,10 @@

MapConfig

-
Configuration options for a MapModel that control the appearance of the -map, the data/imagery displayed, and which UI components are rendered. A -MapConfig object can be used when initializing a Map model, e.g. `new -Map(myMapConfig)`
+
Configuration options for a MapModel that control the +appearance of the map, the data/imagery displayed, and which UI +components are rendered. A MapConfig object can be used when +initializing a Map model, e.g. `new Map(myMapConfig)`
@@ -125,9 +125,10 @@
Properties:
- A set of coordinates that -give the (3D) starting point of the Viewer. This position is also where the -"home" button in the Cesium widget will navigate to when clicked. + A set of +coordinates that give the (3D) starting point of the Viewer. This +position is also where the "home" button in the Cesium widget will +navigate to when clicked. @@ -162,10 +163,10 @@
Properties:
- A collection of imagery, -tiles, vector data, etc. to display on the map. Layers wil be displayed in the -order they appear. The array of the layer MapAssetConfigs are passed to a -MapAssets collection. + A collection of +imagery, tiles, vector data, etc. to display on the map. Layers wil be +displayed in the order they appear. The array of the layer +MapAssetConfigs are passed to a MapAssets collection. @@ -200,12 +201,12 @@
Properties:
- Configuration for one or more digital -elevation models (DEM) for the surface of the earth. Note: Though multiple -terrains are supported, currently only the first terrain is used in the -CesiumWidgetView and there is not yet a UI for switching terrains in the map. -The array of the terrain MapAssetConfigs are passed to a MapAssets -collection. + Configuration for +one or more digital elevation models (DEM) for the surface of the +earth. Note: Though multiple terrains are supported, currently only the +first terrain is used in the CesiumWidgetView and there is not yet a UI +for switching terrains in the map. The array of the terrain +MapAssetConfigs are passed to a MapAssets collection. @@ -242,9 +243,86 @@
Properties:
- Whether or not to show the side bar -with layer list, etc. If true, the MapView will render a -ToolbarView. + Whether or not to show the +side bar with layer list, etc. If true, the MapView will render +a ToolbarView. + + + + + + + showLayerList + + + + + +Boolean + + + + + + + + + <optional>
+ + + + + + + + + + true + + + + + Whether or not to show the +layer list in the toolbar. If true, the ToolbarView will +render a LayerListView. + + + + + + + showHomeButton + + + + + +Boolean + + + + + + + + + <optional>
+ + + + + + + + + + true + + + + + Whether or not to show the +home button in the toolbar. @@ -281,9 +359,9 @@
Properties:
- Whether or not the toolbar -is open when the map is initialized. Set to false by default, so -that the toolbar is hidden by default. + Whether or not the toolbar is +open when the map is initialized. Set to false by default, so that the +toolbar is hidden by default. @@ -320,8 +398,9 @@
Properties:
- Whether or not to show a scale bar. -If true, the MapView will render a ScaleBarView. + Whether or not to show a +scale bar. If true, the MapView will render a +ScaleBarView. @@ -358,10 +437,10 @@
Properties:
- Whether or not to allow users to -click on map features to show more information about them. If true, the -MapView will render a FeatureInfoView and will initialize -"picking" in the CesiumWidgetView. + Whether or not to allow +users to click on map features to show more information about them. If +true, the MapView will render a FeatureInfoView and +will initialize "picking" in the CesiumWidgetView. @@ -400,7 +479,7 @@
Properties:
Source:
@@ -482,8 +561,8 @@

- Coordinates that describe a camera position for Cesium. Requires at least a -longitude and latitude. + Coordinates that describe a camera position for Cesium. Requires at +least a longitude and latitude.
@@ -675,7 +754,8 @@

Properties:
- The rotation about the negative y axis (degrees) + The rotation about the negative y axis +(degrees) @@ -706,7 +786,8 @@
Properties:
- The rotation about the positive x axis (degrees) + The rotation about the positive x axis +(degrees) @@ -745,7 +826,7 @@
Properties:
Source:
@@ -1023,11 +1104,11 @@

- The ColorPaletteConfig specifies a color scale that is mapped to some attribute -of a MapAsset. For vector assets, like 3D tilesets, this palette is -used to conditionally color features on a map. For any type of asset, including -imagery, it can be used to generate a legend. The ColorPaletteConfig is passed -to a AssetColorPalette model. + The ColorPaletteConfig specifies a color scale that is mapped to some +attribute of a MapAsset. For vector assets, like 3D tilesets, +this palette is used to conditionally color features on a map. For any +type of asset, including imagery, it can be used to generate a legend. +The ColorPaletteConfig is passed to a AssetColorPalette model.
@@ -1112,16 +1193,17 @@

Properties:
- NOTE: Currently only categorical and continuous -palettes are supported. -- Categorical: the color conditions will be interpreted such that one color - represents a single value (e.g. a discrete palette). -- Continuous: each color in the colors attribute will represent a point in a - gradient. The point in the gradient will be associated with the number set - with the color, and numbers in between points will be set to an interpolated - color. -- Classified: the numbers set in the colors attribute will be interpreted as - maximums. Continuous properties will be forced into discrete bins. + NOTE: Currently only categorical and +continuous palettes are supported. +- Categorical: the color conditions will be interpreted such that one + color represents a single value (e.g. a discrete palette). +- Continuous: each color in the colors attribute will represent a point + in a gradient. The point in the gradient will be associated with the + number set with the color, and numbers in between points will be set + to an interpolated color. +- Classified: the numbers set in the colors attribute will be + interpreted as maximums. Continuous properties will be forced into + discrete bins. @@ -1154,10 +1236,10 @@
Properties:
- The name (ID) of the property in the asset layer's -attribute table to color the vector data by (or for imagery data that does not -have an attribute table, just the name of the attribute that these colors -represent). + The name (ID) of the property in the asset +layer's attribute table to color the vector data by (or for imagery +data that does not have an attribute table, just the name of the +attribute that these colors represent). @@ -1192,8 +1274,8 @@
Properties:
- A user-friendly name to display instead of the -actual property name. + A user-friendly name to display instead of +the actual property name. @@ -1226,11 +1308,12 @@
Properties:
- The colors to use in the color -palette, along with the conditions associated with each color (i.e. the -properties of the feature that must be true to use the given color). The array -of ColorConfig objects are passed to a AssetColors collection, which in -turn passes each ColorConfig to a AssetColor model. + The colors to use in the +color palette, along with the conditions associated with each color +(i.e. the properties of the feature that must be true to use the given +color). The array of ColorConfig objects are passed to a +AssetColors collection, which in turn passes each ColorConfig +to a AssetColor model. @@ -1269,7 +1352,7 @@
Properties:
Source:
@@ -1465,7 +1548,7 @@
Properties:
Source:
@@ -1547,7 +1630,7 @@
Type:
Source:
@@ -1722,7 +1805,7 @@
Properties:
Source:
@@ -1957,7 +2040,7 @@
Properties:
Source:
@@ -2096,6 +2179,9 @@
Properties:
| 'USGSImageryTopo' +| + +'OpenStreetMapImageryProvider' @@ -2728,7 +2814,7 @@
Properties:
Source:
@@ -2946,7 +3032,7 @@
Properties:
Source:
@@ -3177,7 +3263,7 @@
Properties:
Source:
diff --git a/docs/docs/MapModel.html b/docs/docs/MapModel.html index a8c8a9f3a..47afd94f9 100644 --- a/docs/docs/MapModel.html +++ b/docs/docs/MapModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,8 +48,8 @@

Class: MapModel

MapModel()

-
The Map Model contains all of the settings and options for a required to -render a map view.
+
The Map Model contains all of the settings and options for a +required to render a map view.
@@ -124,7 +124,7 @@

Source:
@@ -197,8 +197,8 @@

- Overrides the default Backbone.Model.defaults() function to specify default -attributes for the Map + Overrides the default Backbone.Model.defaults() function to specify +default attributes for the Map
@@ -247,7 +247,8 @@

Properties:
- homePosition + [homePosition={longitude: -65, +latitude: 56, height: 10000000, heading: 1, pitch: -90, roll: 0}] @@ -262,8 +263,6 @@
Properties:
- <optional>
- @@ -272,14 +271,13 @@
Properties:
- {longitude: -65, latitude: 56, height: 10000000, heading: 1, pitch: -90, roll: 0} - - A set of coordinates that give the -(3D) starting point of the Viewer. This position is also where the "home" -button in the Cesium viewer will navigate to when clicked. + A set +of coordinates that give the (3D) starting point of the Viewer. This +position is also where the "home" button in the Cesium viewer will +navigate to when clicked. @@ -316,8 +314,8 @@
Properties:
- The terrain options to -show in the map. + The terrain +options to show in the map. @@ -354,8 +352,8 @@
Properties:
- The imagery and vector data -to render in the map. + The imagery and +vector data to render in the map. @@ -392,11 +390,11 @@
Properties:
- Particular features -from one or more layers that are highlighted/selected on the map. The -'selectedFeatures' attribute is updated by the map widget (cesium) with a -Feature model when a user selects a geographical feature on the map (e.g. by -clicking) + Particular +features from one or more layers that are highlighted/selected on the +map. The 'selectedFeatures' attribute is updated by the map widget +(cesium) with a Feature model when a user selects a geographical +feature on the map (e.g. by clicking) @@ -433,8 +431,84 @@
Properties:
- Whether or not to show the side bar -with layer list, etc. True by default. + Whether or not to show the +side bar with layer list and other tools. True by default. + + + + + + + showLayerList + + + + + +Boolean + + + + + + + + + <optional>
+ + + + + + + + + + true + + + + + Whether or not to include +the layer list in the toolbar. True by default. + + + + + + + showHomeButton + + + + + +Boolean + + + + + + + + + <optional>
+ + + + + + + + + + true + + + + + Whether or not to show the +home button in the toolbar. True by default. @@ -471,9 +545,9 @@
Properties:
- Whether or not the toolbar -is open when the map is initialized. Set to false by default, so -that the toolbar is hidden by default. + Whether or not the toolbar is +open when the map is initialized. Set to false by default, so that the +toolbar is hidden by default. @@ -510,7 +584,8 @@
Properties:
- Whether or not to show a scale bar. + Whether or not to show a +scale bar. @@ -547,15 +622,16 @@
Properties:
- Whether or not to allow users to -click on map features to show more information about them. + Whether or not to allow +users to click on map features to show more information about them. - currentPosition + [currentPosition={ longitude: null, latitude: null, +height: null}] @@ -570,8 +646,6 @@
Properties:
- <optional>
- @@ -580,14 +654,13 @@
Properties:
- { longitude: null, latitude: null, height: null} - - An object updated by the map widget to show the longitude, latitude, and -height (elevation) at the position of the mouse on the map. Note: The -CesiumWidgetView does not yet update the height property. + An object updated by the map widget to show the +longitude, latitude, and height (elevation) at the position of the +mouse on the map. Note: The CesiumWidgetView does not yet update the +height property. @@ -624,17 +697,18 @@
Properties:
- An object -updated by the map widget that gives two equivalent measurements based on the -map's current position and zoom level: The number of pixels on the screen that -equal the number of meters on the map/globe. + An +object updated by the map widget that gives two equivalent measurements +based on the map's current position and zoom level: The number of +pixels on the screen that equal the number of meters on the map/globe. - currentViewExtent + [currentViewExtent={ north: null, east: null, south: +null, west: null }] @@ -644,6 +718,42 @@
Properties:
+ + + + + + + + + + + + + + + + + An object updated by the map widget that gives the +extent of the current visible area as a bounding box in +longitude/latitude coordinates, as well as the height/altitude in +meters. + + + + + + + clickFeatureAction + + + + + +String + + + @@ -659,13 +769,15 @@
Properties:
- { north: null, east: null, south: null, west: null } + "showDetails" - An object updated by the map widget that gives the extent of the current -visible area as a bounding box in longitude/latitude coordinates. + The default +action to take when a user clicks on a feature on the map. The +available options are "showDetails" (show the feature details in the +sidebar) or "zoom" (zoom to the feature's location). @@ -704,7 +816,93 @@
Properties:
Source:
+ + + + + + + +
+ + + + + + + + +

+ + + + + type :String +

+ + + + +
+ The type of model this is. +
+ + + +
Type:
+
    +
  • + +String + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "MapModel"
  • +
+ + + +
Source:
+
@@ -732,12 +930,12 @@

Methods

-

- +

+ - initialize(config) + addAsset(layer) → {MapAsset}

@@ -746,7 +944,9 @@

- Run when a new Map is created. + Add a layer or other asset to the map. This is the best way to add a +layer to the map because it will ensure that this map model is set on +the layer model.
@@ -782,13 +982,16 @@

Parameters:
- config + layer -MapConfig +Object +| + +MapAsset @@ -798,9 +1001,8 @@
Parameters:
- An object specifying configuration options for the -map. If any config option is not specified, the default will be used instead -(see MapModel#defaults). + A map asset model or object with +attributes to set on a new map asset model. @@ -817,6 +1019,9 @@
Parameters:
+
Since:
+
  • 2.25.0
+ @@ -841,7 +1046,7 @@
Parameters:
Source:
@@ -866,6 +1071,468 @@
Parameters:
+
Returns:
+ + +
+ The new layer model. +
+ + + +
+
+ Type +
+
+ +MapAsset + + +
+
+ + + + + + + + + + + + + +

+ + + + + convertFeatures(features) → {Array.<Feature>} +

+ + + + + + +
+ Convert an array of feature objects to an array of Feature models. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
features + + +Cesium.Entity +| + +Cesium.Cesium3DTileFeature +| + +Array.<Feature> + + + + An +array of feature objects selected directly from the map view, or
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of Feature models. +
+ + + +
+
+ Type +
+
+ +Array.<Feature> + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize(config) +

+ + + + + + +
+ Run when a new Map is created. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
config + + +MapConfig + + + + An object specifying configuration options +for the map. If any config option is not specified, the default will be +used instead (see MapModel#defaults).
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + resetLayers() → {MapAssets} +

+ + + + + + +
+ Reset the layers to the default layers. This will set a new MapAssets +collection on the layer attribute. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The new layers collection. +
+ + + +
+
+ Type +
+
+ +MapAssets + + +
+
+ + @@ -891,8 +1558,8 @@

- Set or unset the selected Features on the map model. A selected feature is a -polygon, line, point, or other element of vector data that is in focus on the + Set or unset the selected Features. A selected feature is a polygon, +line, point, or other element of vector data that is in focus on the map (e.g. because a user clicked it to show more details.)
@@ -964,10 +1631,10 @@

Parameters:
- An array of Feature models or objects with -attributes to set on new Feature models. If no features argument is passed to -this function, then any currently selected feature will be removed (as long as -replace is set to true) + An array of Feature models or +objects with attributes to set on new Feature models. If no features +argument is passed to this function, then any currently selected +feature will be removed (as long as replace is set to true) @@ -1006,9 +1673,10 @@
Parameters:
- If true, any currently selected features will -be replaced with the newly selected features. If false, then the newly selected -features will be added to any that are currently selected. + If true, any currently selected +features will be replaced with the newly selected features. If false, +then the newly selected features will be added to any that are +currently selected. @@ -1049,7 +1717,7 @@
Parameters:
Source:
diff --git a/docs/docs/MapSearchConnector.html b/docs/docs/MapSearchConnector.html new file mode 100644 index 000000000..2ae4b49f8 --- /dev/null +++ b/docs/docs/MapSearchConnector.html @@ -0,0 +1,2601 @@ + + + + + MetacatUI Dev Docs: Class: MapSearchConnector + + + + + + + + + + + + + + +
+ +

Class: MapSearchConnector

+ + + + + + +
+ +
+ +

MapSearchConnector()

+ +
A model that updates the counts on a Geohash layer in a Map +model when the search results from a search model are reset.
+ + + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new MapSearchConnector() +

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + +
    +
  • Backbone.Model
  • +
+ + + + + + + + + + + + + + + +

Members

+ + + +

+ + + + + type :string +

+ + + + +
+ The type of Backbone.Model this is. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "MapSearchConnector"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + connect() +

+ + + + + + +
+ Connect the Map to the Search. When a new search is performed, the +Search will set the new facet counts on the GeoHash layer in the Map. +When the view extent on the map has changed, the geohash facet on the +search will be updated to reflect the new height/altitude of the view. +This will trigger a new search, which will update the counts on the +GeoHash layer in the Map. When connected, the Geohash layer will also +be hidden during search requests, and while the user is panning/zooming +the map. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + createGeohash() → {CesiumGeohash} +

+ + + + + + +
+ Create a new Geohash layer and add it to the Layers collection. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • Layers#event:add
  • +
+ + + + + + + + + + + +
Returns:
+ + +
+ The new Geohash layer or null if there is no +Layers collection set on this model. +
+ + + +
+
+ Type +
+
+ +CesiumGeohash + + +
+
+ + + + + + + + + + + + + +

+ + + + + createLayers() → {Layers} +

+ + + + + + +
+ Create a new Layers collection and set it on the Map model. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The new Layers collection. +
+ + + +
+
+ Type +
+
+ +Layers + + +
+
+ + + + + + + + + + + + + +

+ + + + + defaults() +

+ + + + + + + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
searchResults + + +SolrResults + + + +
map + + +Map + + + +
onMoveEnd + + +function + + + + A function to call when the map is +finished moving. This function will be called with the connector as +'this'.
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + disconnect() +

+ + + + + + +
+ Disconnect the Map from the Search. Stops listening to the Search +results collection. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + facetCountsToGeohashAttrs(counts) → {Array} +

+ + + + + + +
+ Given the counts results in the format returned by the SolrResults +model, return an array of objects with a geohash and a count property, +formatted for the CesiumGeohash layer. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
counts + + +Array + + + + The facet counts from the SolrResults model. +Given as an array of alternating keys and values.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of objects with a geohash and a count +property. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + + + + + + + + + +

+ + + + + findAndSetGeohashLayer(addopt) → {CesiumGeohash} +

+ + + + + + +
+ Find the Geohash layer in the Map model's layers collection and +optionally create one if it doesn't exist. This will also create and +set a map and a layers collection from that map if they don't exist. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
add + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If true, create a new Geohash layer if +one doesn't exist.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • Layers#event:add
  • +
+ + + + + + + + + + + +
Returns:
+ + +
+ The Geohash layer in the Map model's layers +collection or null if there is no Layers collection set on this model +and `add` is false. +
+ + + +
+
+ Type +
+
+ +CesiumGeohash + + +
+
+ + + + + + + + + + + + + +

+ + + + + findGeohash() → {CesiumGeohash} +

+ + + + + + +
+ Find the first Geohash layer in the Map model's layers collection. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The first Geohash layer in the Map model's +layers collection or null if there is no Layers collection set on this +model or no Geohash layer in the collection. +
+ + + +
+
+ Type +
+
+ +CesiumGeohash + + +
+
+ + + + + + + + + + + + + +

+ + + + + findLayers() → {Layers} +

+ + + + + + +
+ Find the Layers collection from the Map model. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The Layers collection from the Map model or null if +there is no Map model set on this model. +
+ + + +
+
+ Type +
+
+ +Layers + + +
+
+ + + + + + + + + + + + + +

+ + + + + getGeohashCounts() → {Array} +

+ + + + + + +
+ Look in the Search results for the facet counts for the Geohash layer. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of objects with a geohash and a count +property or null if there are no Search results or no facet counts. +
+ + + +
+
+ Type +
+
+ +Array + + +
+
+ + + + + + + + + + + + + +

+ + + + + hideGeoHashLayer() +

+ + + + + + +
+ Make the geoHashLayer invisible temporarily. This will override the +visible property on the layer until the showGeoHashLayer method is +called. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • CesiumGeohash#change:visible
  • +
+ + + + + + + + + + + + + + + + + + + + + + +

+ + + + + initialize(attrs, optionsopt, addGeohashLayeropt) +

+ + + + + + +
+ Initialize the model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
attrs + + +Object + + + + + + + + + + + + The attributes for this model.
attributes.searchResults + + +SolrResults +| + +Object + + + + + + <optional>
+ + + + + +
+ + The +SolrResults model to use for this connector or a JSON object with +options to create a new SolrResults model. If not provided, a new +SolrResults model will be created.
attributes.map + + +Map +| + +Object + + + + + + <optional>
+ + + + + +
+ + The Map model to use for this +connector or a JSON object with options to create a new Map model. If +not provided, a new Map model will be created.
options + + +Object + + + + + + <optional>
+ + + + + +
+ + The options for this model.
addGeohashLayer + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If true, a Geohash layer will +be added to the Map model if there is not already a Geohash layer in +the Map model's Layers collection. If false, no Geohash layer will be +added. A geohash layer is required for this connector to work.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + onMoveEnd() +

+ + + + + + +
+ Functions to perform when the map has finished moving. This is separated into its own method +so that external models can manipulate the behavior of this function. +See MapSearchFiltersConnector#onMoveEnd +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + selectGeohash(searchResult) +

+ + + + + + +
+ Highlight the geohashes for the given search result on the map, or +remove highlighting if the search result is not selected. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
searchResult + + +SolrResult + + + + The search result to highlight.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + showGeoHashLayer() +

+ + + + + + +
+ Make the geoHashLayer visible again after hiding it with the +hideGeoHashLayer method. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • CesiumGeohash#change:visible
  • +
+ + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateFacet() +

+ + + + + + +
+ Update the facet on the Search results to match the current Geohash +level. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • SolrResults#change:facet
  • +
+ + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateGeohashCounts() +

+ + + + + + +
+ Update the Geohash layer in the Map model with the new facet counts +from the Search results. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + +
Fires:
+
    +
  • CesiumGeohash#change:counts
  • + +
  • CesiumGeohash#change:totalCount
  • +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/MapSearchFiltersConnector.html b/docs/docs/MapSearchFiltersConnector.html new file mode 100644 index 000000000..a16ac98cd --- /dev/null +++ b/docs/docs/MapSearchFiltersConnector.html @@ -0,0 +1,2735 @@ + + + + + MetacatUI Dev Docs: Class: MapSearchFiltersConnector + + + + + + + + + + + + + + +
+ +

Class: MapSearchFiltersConnector

+ + + + + + +
+ +
+ +

MapSearchFiltersConnector()

+ +
A model that handles connecting the Map model, the SolrResults +model, and the Filters model, e.g. for a CatalogSearchView.
+ + + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new MapSearchFiltersConnector() +

+ + + + + + + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + +
    +
  • Backbone.Model
  • +
+ + + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + connect() +

+ + + + + + +
+ Set all necessary listeners between the Map, SearchResults, and Filters +so that they work together. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + connectFiltersMap() +

+ + + + + + +
+ Connect or re-connect the filters to the map. This will enable the map +to start updating any spatial filters in the filters collection with +the extent of the map view. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + coordinateMoveEndSearch() +

+ + + + + + +
+ Coordinate behaviour between the two map related sub-connectors when +the map extent changes. This is necessary to reduce the number of +search queries. We keep the moveEnd behaviour within the sub-connectors +so that each sub-connector still functions independently from this +coordinating connector. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + defaults() +

+ + + + + + +
+ The default values for this model. +
+ + + + + + + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
map + + +Map + + + +
searchResults + + +SolrResults + + + +
filters + + +Filters + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + disconnect(resetSpatialFilteropt) +

+ + + + + + +
+ Disconnect all listeners between the Map, SearchResults, and Filters. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
resetSpatialFilter + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + If true, the spatial +filter will be reset to the default value, which will effectively +remove any spatial constraints from the search.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + disconnectFiltersMap(resetSpatialFilteropt) +

+ + + + + + +
+ Disconnect the filters from the map. This stops the map from updating +any spatial filters in the filters collection with the extent of the +map view. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
resetSpatialFilter + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + If true, the spatial +filter will be reset to the default value, which will effectively +remove any spatial constraints from the search.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getConnectors() → {Array.<Backbone.Model>} +

+ + + + + + +
+ Get all the connectors associated with this connector. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of connector models. +
+ + + +
+
+ Type +
+
+ +Array.<Backbone.Model> + + +
+
+ + + + + + + + + + + + + +

+ + + + + getMapConnectors() → {Array.<Backbone.Model>} +

+ + + + + + +
+ Get all the connectors associated with the Map. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An array of connector models. +
+ + + +
+
+ Type +
+
+ +Array.<Backbone.Model> + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize(attrs, options) +

+ + + + + + +
+ Initialize the model. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +Object + + + + The attributes for this model.
options + + +Object + + + + The options for this model. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
map + + +Map +| + +Object + + + + + + <optional>
+ + + + + +
+ + The Map model to use for this +connector or a JSON object with options to create a new Map model. If +not provided, the default from the appModel will be used. See +AppModel#catalogSearchMapOptions.
searchResults + + +SolrResults +| + +Object + + + + + + <optional>
+ + + + + +
+ + The SolrResults +model to use for this connector or a JSON object with options to create +a new SolrResults model. If not provided, a new SolrResults model will +be created.
filterGroups + + +Array.<FilterGroup> +| + +FilterGroup + + + + + + <optional>
+ + + + + +
+ + An array +of FilterGroup models or JSON objects with options to create new +FilterGroup models. If a single FilterGroup is passed, it will be +wrapped in an array. If not provided, the default from the appModel +will be used. See AppModel#defaultFilterGroups.
addGeohashLayer + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If set to true, a Geohash +layer will be added to the Map model if one is not already present. If +set to false, no Geohash layer will be added. A geohash layer is +required for the Search-Map connector to work.
addSpatialFilter + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If set to true, a spatial +filter will be added to the Filters model if one is not already +present. If set to false, no spatial filter will be added. A spatial +filter is required for the Filters-Map connector to work.
catalogSearch + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + If set to true, a +catalog search phrase in the Filters will be appended to the search +query that limits the results to un-obsoleted metadata. See +Filters#createCatalogSearchQuery.If set to true, a catalog +search phrase will be appended to the search query that limits the +results to un-obsoleted metadata.
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + isConnected() → {boolean} +

+ + + + + + +
+ Check if all connectors are connected. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ True if all connectors are connected, false if any +are disconnected. +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + removeSpatialFilter() +

+ + + + + + +
+ Remove the spatial filter from the Filters model. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + resetMoveEndSearch() +

+ + + + + + +
+ Undo the coordination of the two map related sub-connectors when the +map extent changes. Reset the moveEnd behaviour of the sub-connectors +to their defaults. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + +
See:
+
+
    +
  • coordinateMoveEndSearch
  • +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setConnectors(addGeohashLayeropt, addSpatialFilteropt) +

+ + + + + + +
+ Set all the connectors required to connect the Map, SearchResults, and +Filters. This does not connect them (see connect()). +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
addGeohashLayer + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If set to true, a Geohash +layer will be added to the Map model if one is not already present. If +set to false, no Geohash layer will be added. A geohash layer is +required for the Search-Map connector to work.
addSpatialFilter + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If set to true, a spatial +filter will be added to the Filters model if one is not already +present. If set to false, no spatial filter will be added. A spatial +filter is required for the Filters-Map connector to work.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setFilters(filters, catalogSearchopt) +

+ + + + + + +
+ Set the Filters model for this connector. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
filters + + +Array + + + + + + + + + + + + An array of FilterGroup models or JSON objects +with options to create new FilterGroup models. If a single FilterGroup +is passed, it will be wrapped in an array.
catalogSearch + + +boolean + + + + + + <optional>
+ + + + + +
+ + true + + If true, the Filters model will +be created with the catalogSearch option set to true.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setMap(map) +

+ + + + + + +
+ Set the Map model for this connector. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
map + + +Map +| + +Object + + + + The Map model to use for this connector or +a JSON object with options to create a new Map model.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + setSearchResults(searchResults) +

+ + + + + + +
+ Set the SearchResults model for this connector. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
searchResults + + +SolrResults +| + +Object + + + + The SolrResults model to +use for this connector or a JSON object with options to create a new +SolrResults model.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/MapView.html b/docs/docs/MapView.html index 2b8663783..310ef9e96 100644 --- a/docs/docs/MapView.html +++ b/docs/docs/MapView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -1151,7 +1151,7 @@

Source:
@@ -1268,7 +1268,7 @@

Source:
@@ -1386,7 +1386,7 @@

Source:
@@ -1503,7 +1503,7 @@

Source:
@@ -1620,7 +1620,7 @@

Source:
diff --git a/docs/docs/MarkdownEditorView.html b/docs/docs/MarkdownEditorView.html index df393976a..0f4c2d784 100644 --- a/docs/docs/MarkdownEditorView.html +++ b/docs/docs/MarkdownEditorView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MarkdownView.html b/docs/docs/MarkdownView.html index bc4e8d75d..82c68df16 100644 --- a/docs/docs/MarkdownView.html +++ b/docs/docs/MarkdownView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MdqRunView.html b/docs/docs/MdqRunView.html index 28991d346..9da8264a8 100644 --- a/docs/docs/MdqRunView.html +++ b/docs/docs/MdqRunView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MetacatUI.html b/docs/docs/MetacatUI.html index 6feafb224..4d6dc8bb3 100644 --- a/docs/docs/MetacatUI.html +++ b/docs/docs/MetacatUI.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -187,7 +187,7 @@
Type:
Source:
@@ -266,7 +266,7 @@
Type:
Source:
@@ -508,7 +508,7 @@
Type:
Source:
diff --git a/docs/docs/MetadataView.html b/docs/docs/MetadataView.html index d14ea8410..dd21677b8 100644 --- a/docs/docs/MetadataView.html +++ b/docs/docs/MetadataView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MetricModalView.html b/docs/docs/MetricModalView.html index 5264ae019..908e4756e 100644 --- a/docs/docs/MetricModalView.html +++ b/docs/docs/MetricModalView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MetricView.html b/docs/docs/MetricView.html index bf19cf663..485d0af72 100644 --- a/docs/docs/MetricView.html +++ b/docs/docs/MetricView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -730,7 +730,7 @@

Source:
@@ -918,7 +918,7 @@

Source:
@@ -1012,7 +1012,7 @@

Source:
diff --git a/docs/docs/Metrics.html b/docs/docs/Metrics.html index e9492ec01..8365ef8ff 100644 --- a/docs/docs/Metrics.html +++ b/docs/docs/Metrics.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/MetricsChartView.html b/docs/docs/MetricsChartView.html index a5e22ebb2..c2f482036 100644 --- a/docs/docs/MetricsChartView.html +++ b/docs/docs/MetricsChartView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/NavbarView.html b/docs/docs/NavbarView.html index 595b466d3..1e69277c7 100644 --- a/docs/docs/NavbarView.html +++ b/docs/docs/NavbarView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/NodeSelect.html b/docs/docs/NodeSelect.html index e5a10bdd0..a2d86f4d1 100644 --- a/docs/docs/NodeSelect.html +++ b/docs/docs/NodeSelect.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/NumericFilter.html b/docs/docs/NumericFilter.html index 23e39d173..bceb52990 100644 --- a/docs/docs/NumericFilter.html +++ b/docs/docs/NumericFilter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/NumericFilterView.html b/docs/docs/NumericFilterView.html index 645a07a47..48af9eabe 100644 --- a/docs/docs/NumericFilterView.html +++ b/docs/docs/NumericFilterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -181,6 +181,368 @@

Members

+

+ + + + + collapseToggleClass :string +

+ + + + +
+ The class used for the button that toggles the collapsed state of the filter. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapse-toggle"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsed :boolean +

+ + + + +
+ The current state of the filter, if it is FilterView#collapsible. +Whatever this value is set to at initialization, will be how the filter is +initially rendered. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • true
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsedClass :string +

+ + + + +
+ The class to add to the filter when it is collapsed. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapsed"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsible :boolean +

+ + + + +
+ Whether the filter is collapsible. If true, the filter will have a button that +toggles the collapsed state. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -849,7 +1211,7 @@
Type:
Source:
@@ -940,7 +1302,7 @@

Source:
@@ -1106,7 +1468,7 @@

Parameters:
Source:
@@ -1250,7 +1612,7 @@
Parameters:
Source:
@@ -1423,7 +1785,7 @@
Parameters:
Source:
@@ -1583,7 +1945,7 @@
Parameters:
Source:
@@ -1733,7 +2095,7 @@
Parameters:
Source:
@@ -1827,7 +2189,7 @@

Source:
@@ -2023,7 +2385,7 @@

Parameters:
Source:
@@ -2172,7 +2534,173 @@
Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + toggleCollapse(collapseopt) +

+ + + + + + +
+ Toggle the collapsed state of the filter. If collapse is a boolean, then set the +collapsed state to that value. Otherwise, set it to the opposite of whichever +state is currently set. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
collapse + + +boolean + + + + + + <optional>
+ + + + + +
Whether to collapse the filter. If not provided, the +filter will be collapsed if it is currently expanded, and vice versa.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2570,7 +3098,7 @@
Parameters:
Source:
diff --git a/docs/docs/ObjectFormat.html b/docs/docs/ObjectFormat.html index 25c50c36d..13edb83d9 100644 --- a/docs/docs/ObjectFormat.html +++ b/docs/docs/ObjectFormat.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ObjectFormatSelect.html b/docs/docs/ObjectFormatSelect.html index d5341e251..b4511927a 100644 --- a/docs/docs/ObjectFormatSelect.html +++ b/docs/docs/ObjectFormatSelect.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ObjectFormats.html b/docs/docs/ObjectFormats.html index e50ef900c..ffa25c4db 100644 --- a/docs/docs/ObjectFormats.html +++ b/docs/docs/ObjectFormats.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorDataView.html b/docs/docs/PortEditorDataView.html index dda7f3052..8d7c9bad8 100644 --- a/docs/docs/PortEditorDataView.html +++ b/docs/docs/PortEditorDataView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorImageView.html b/docs/docs/PortEditorImageView.html index 72b8d6d5a..058eac41c 100644 --- a/docs/docs/PortEditorImageView.html +++ b/docs/docs/PortEditorImageView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorLogosView.html b/docs/docs/PortEditorLogosView.html index a2702daae..1698c0a00 100644 --- a/docs/docs/PortEditorLogosView.html +++ b/docs/docs/PortEditorLogosView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorMdSectionView.html b/docs/docs/PortEditorMdSectionView.html index 50c5c9c0e..37bc9e88d 100644 --- a/docs/docs/PortEditorMdSectionView.html +++ b/docs/docs/PortEditorMdSectionView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorSectionView.html b/docs/docs/PortEditorSectionView.html index f25c61ae4..6063e6f8a 100644 --- a/docs/docs/PortEditorSectionView.html +++ b/docs/docs/PortEditorSectionView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorSectionsView.html b/docs/docs/PortEditorSectionsView.html index 2c639ded8..15ab96de3 100644 --- a/docs/docs/PortEditorSectionsView.html +++ b/docs/docs/PortEditorSectionsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortEditorSettingsView.html b/docs/docs/PortEditorSettingsView.html index 4f61d4688..44908916d 100644 --- a/docs/docs/PortEditorSettingsView.html +++ b/docs/docs/PortEditorSettingsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalDataView.html b/docs/docs/PortalDataView.html index 0d9edacc5..90b1e152d 100644 --- a/docs/docs/PortalDataView.html +++ b/docs/docs/PortalDataView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalEditorView.html b/docs/docs/PortalEditorView.html index 98ee69df8..11c46bccf 100644 --- a/docs/docs/PortalEditorView.html +++ b/docs/docs/PortalEditorView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalHeaderView.html b/docs/docs/PortalHeaderView.html index 5b6373f77..fe814a2be 100644 --- a/docs/docs/PortalHeaderView.html +++ b/docs/docs/PortalHeaderView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalImage.html b/docs/docs/PortalImage.html index 513c8c011..640e46f90 100644 --- a/docs/docs/PortalImage.html +++ b/docs/docs/PortalImage.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalListView.html b/docs/docs/PortalListView.html index f1bfa80bd..cb06084b8 100644 --- a/docs/docs/PortalListView.html +++ b/docs/docs/PortalListView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalLogosView.html b/docs/docs/PortalLogosView.html index 7af513cd3..bfa3339bd 100644 --- a/docs/docs/PortalLogosView.html +++ b/docs/docs/PortalLogosView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalMembersView.html b/docs/docs/PortalMembersView.html index a5839f127..ffff9f613 100644 --- a/docs/docs/PortalMembersView.html +++ b/docs/docs/PortalMembersView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalModel.html b/docs/docs/PortalModel.html index 4b21be09a..df4b9fe76 100644 --- a/docs/docs/PortalModel.html +++ b/docs/docs/PortalModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -752,7 +752,7 @@

Source:
@@ -851,7 +851,7 @@

Source:
@@ -1254,7 +1254,7 @@

Parameters:
Source:
@@ -1558,7 +1558,7 @@
Properties:
Source:
@@ -2192,7 +2192,7 @@
Parameters:
Source:
@@ -2578,7 +2578,7 @@

Source:
@@ -3482,7 +3482,7 @@

Parameters:
Source:
@@ -3633,7 +3633,7 @@
Parameters:
Source:
@@ -3754,7 +3754,7 @@

Source:
@@ -3875,7 +3875,7 @@

Source:
@@ -4393,7 +4393,7 @@

Source:
@@ -4748,7 +4748,7 @@

Parameters:
Source:
@@ -5014,7 +5014,7 @@
Properties:
Source:
@@ -5113,7 +5113,7 @@

Source:
@@ -5588,7 +5588,7 @@

Parameters:
Source:
@@ -5712,7 +5712,7 @@

Source:
@@ -5882,7 +5882,7 @@

Parameters:
Source:
@@ -5999,7 +5999,7 @@

Source:
@@ -6121,7 +6121,7 @@

Source:
@@ -6238,7 +6238,7 @@

Source:
@@ -6362,7 +6362,7 @@

Source:
@@ -6532,7 +6532,7 @@

Parameters:
Source:
@@ -6879,7 +6879,7 @@
Parameters:
Source:
@@ -8264,7 +8264,7 @@
Parameters:
Source:
@@ -8462,7 +8462,7 @@

Source:
@@ -9091,7 +9091,7 @@

Source:
@@ -9308,7 +9308,7 @@

Source:
@@ -9461,7 +9461,7 @@

Parameters:
Source:
@@ -10183,7 +10183,7 @@
Parameters:
Source:
@@ -10425,7 +10425,7 @@
Parameters:
Source:
@@ -10524,7 +10524,7 @@

Source:
@@ -10803,7 +10803,7 @@

Source:
diff --git a/docs/docs/PortalSectionModel.html b/docs/docs/PortalSectionModel.html index de623da94..19073ea1c 100644 --- a/docs/docs/PortalSectionModel.html +++ b/docs/docs/PortalSectionModel.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalSectionView.html b/docs/docs/PortalSectionView.html index a9ded2ca1..fd15a70ee 100644 --- a/docs/docs/PortalSectionView.html +++ b/docs/docs/PortalSectionView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalUsagesView.html b/docs/docs/PortalUsagesView.html index a249c5d1c..7d612f4a5 100644 --- a/docs/docs/PortalUsagesView.html +++ b/docs/docs/PortalUsagesView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalView.html b/docs/docs/PortalView.html index bce385dd0..a79881478 100644 --- a/docs/docs/PortalView.html +++ b/docs/docs/PortalView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -1629,7 +1629,7 @@
Parameters:
Source:
@@ -1772,7 +1772,7 @@
Parameters:
Source:
@@ -1867,7 +1867,7 @@

Source:
@@ -2011,7 +2011,7 @@

Parameters:
Source:
@@ -2154,7 +2154,7 @@
Parameters:
Source:
@@ -2323,7 +2323,7 @@
Parameters:
Source:
@@ -2439,7 +2439,7 @@

Source:
@@ -2533,7 +2533,7 @@

Source:
@@ -2676,7 +2676,7 @@

Parameters:
Source:
@@ -2913,7 +2913,7 @@
Parameters:
Source:
@@ -3008,7 +3008,7 @@

Source:
@@ -3407,7 +3407,7 @@

Source:
@@ -3576,7 +3576,7 @@

Parameters:
Source:
@@ -3670,7 +3670,7 @@

Source:
@@ -3827,7 +3827,7 @@

Parameters:
Source:
@@ -3922,7 +3922,7 @@
Parameters:
Source:
@@ -4172,7 +4172,7 @@

Source:
diff --git a/docs/docs/PortalVisualizationsView.html b/docs/docs/PortalVisualizationsView.html index 24bd42bde..0f17448cc 100644 --- a/docs/docs/PortalVisualizationsView.html +++ b/docs/docs/PortalVisualizationsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/PortalsSearchView.html b/docs/docs/PortalsSearchView.html index e127217b9..4c60cd1fd 100644 --- a/docs/docs/PortalsSearchView.html +++ b/docs/docs/PortalsSearchView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Project.html b/docs/docs/Project.html index 8be898615..53f3c2793 100644 --- a/docs/docs/Project.html +++ b/docs/docs/Project.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ProjectList.html b/docs/docs/ProjectList.html index 34c0f2268..c9037c278 100644 --- a/docs/docs/ProjectList.html +++ b/docs/docs/ProjectList.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ProjectView.html b/docs/docs/ProjectView.html index 7f5550d45..238f038da 100644 --- a/docs/docs/ProjectView.html +++ b/docs/docs/ProjectView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QualityCheck.html b/docs/docs/QualityCheck.html index 5f572a4c0..12ba56537 100644 --- a/docs/docs/QualityCheck.html +++ b/docs/docs/QualityCheck.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QualityReport.html b/docs/docs/QualityReport.html index 972a265aa..f39a1ee2d 100644 --- a/docs/docs/QualityReport.html +++ b/docs/docs/QualityReport.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QueryBuilderView.html b/docs/docs/QueryBuilderView.html index 7c98fd636..1f865c215 100644 --- a/docs/docs/QueryBuilderView.html +++ b/docs/docs/QueryBuilderView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QueryField.html b/docs/docs/QueryField.html index b743d4424..24e38dcd5 100644 --- a/docs/docs/QueryField.html +++ b/docs/docs/QueryField.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QueryFieldSelectView.html b/docs/docs/QueryFieldSelectView.html index 03f211219..58b432c46 100644 --- a/docs/docs/QueryFieldSelectView.html +++ b/docs/docs/QueryFieldSelectView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QueryFields.html b/docs/docs/QueryFields.html index ef1ea28b1..6833ccab7 100644 --- a/docs/docs/QueryFields.html +++ b/docs/docs/QueryFields.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/QueryRuleView.html b/docs/docs/QueryRuleView.html index a4062a09d..f51361481 100644 --- a/docs/docs/QueryRuleView.html +++ b/docs/docs/QueryRuleView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Quota.html b/docs/docs/Quota.html index 1fc459c14..6d23d589c 100644 --- a/docs/docs/Quota.html +++ b/docs/docs/Quota.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Quotas.html b/docs/docs/Quotas.html index 57bcfe383..c07a0c3d5 100644 --- a/docs/docs/Quotas.html +++ b/docs/docs/Quotas.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/RegisterCitationView.html b/docs/docs/RegisterCitationView.html index fa2bfb930..4fa34828a 100644 --- a/docs/docs/RegisterCitationView.html +++ b/docs/docs/RegisterCitationView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ScaleBarView.html b/docs/docs/ScaleBarView.html index 550a692ad..199984810 100644 --- a/docs/docs/ScaleBarView.html +++ b/docs/docs/ScaleBarView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/ScienceMetadata.html b/docs/docs/ScienceMetadata.html index 8d5dcfb4b..74f4e9cb1 100644 --- a/docs/docs/ScienceMetadata.html +++ b/docs/docs/ScienceMetadata.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -253,7 +253,7 @@

Source:
@@ -352,7 +352,7 @@

Source:
@@ -512,7 +512,7 @@

Parameters:
Source:
@@ -816,7 +816,7 @@
Properties:
Source:
@@ -996,7 +996,7 @@
Parameters:
Source:
@@ -1119,7 +1119,7 @@

Source:
@@ -1218,7 +1218,7 @@

Source:
@@ -1529,7 +1529,7 @@

Parameters:
Source:
@@ -1680,7 +1680,7 @@
Parameters:
Source:
@@ -1801,7 +1801,7 @@

Source:
@@ -1922,7 +1922,7 @@

Source:
@@ -2021,7 +2021,7 @@

Source:
@@ -2181,7 +2181,7 @@

Parameters:
Source:
@@ -2447,7 +2447,7 @@
Properties:
Source:
@@ -2546,7 +2546,7 @@

Source:
@@ -2712,7 +2712,7 @@

Parameters:
Source:
@@ -2836,7 +2836,7 @@

Source:
@@ -3006,7 +3006,7 @@

Parameters:
Source:
@@ -3123,7 +3123,7 @@

Source:
@@ -3245,7 +3245,7 @@

Source:
@@ -3362,7 +3362,7 @@

Source:
@@ -3486,7 +3486,7 @@

Source:
@@ -3656,7 +3656,7 @@

Parameters:
Source:
@@ -4003,7 +4003,7 @@
Parameters:
Source:
@@ -4254,7 +4254,7 @@
Parameters:
Source:
@@ -4353,7 +4353,7 @@

Source:
@@ -4551,7 +4551,7 @@

Source:
@@ -4668,7 +4668,7 @@

Source:
@@ -4768,7 +4768,7 @@

Source:
@@ -4921,7 +4921,7 @@

Parameters:
Source:
@@ -5371,7 +5371,7 @@
Parameters:
Source:
@@ -5519,7 +5519,7 @@
Parameters:
Source:
@@ -5618,7 +5618,7 @@

Source:
@@ -5717,7 +5717,7 @@

Source:
diff --git a/docs/docs/ScienceMetadataView.html b/docs/docs/ScienceMetadataView.html index a38c52193..5354c5b35 100644 --- a/docs/docs/ScienceMetadataView.html +++ b/docs/docs/ScienceMetadataView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/Search.html b/docs/docs/Search.html index f8da932e8..2dbc84784 100644 --- a/docs/docs/Search.html +++ b/docs/docs/Search.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/SearchResultView.html b/docs/docs/SearchResultView.html new file mode 100644 index 000000000..9eb003f17 --- /dev/null +++ b/docs/docs/SearchResultView.html @@ -0,0 +1,1877 @@ + + + + + MetacatUI Dev Docs: Class: SearchResultView + + + + + + + + + + + + + + +
+ +

Class: SearchResultView

+ + + + + + +
+ +
+ +

SearchResultView()

+ +
A single result item view
+ + + + + +
+

Screenshot

+ + + +
+ + + + +
+ +
+
+ + + + +

Constructor

+ + + +

+ + + + + new SearchResultView() +

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +

Extends

+ + + + +
    +
  • Backbone.View
  • +
+ + + + + + + + + + + + + + + +

Members

+ + + +

+ + + + + className :string +

+ + + + +
+ The HTML classes to use for this view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + events :Object +

+ + + + +
+ The events this view will listen to and the associated function to +call. +
+ + + +
Type:
+
    +
  • + +Object + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + loadingTemplate :string +

+ + + + +
+ The HTML template to use when showing that a result item is loading +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + metricStatTemplate :underscore.template +

+ + + + +
+ The HTML template to use for the metrics statics +
+ + + +
Type:
+
    +
  • + +underscore.template + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + tagName :string +

+ + + + +
+ The tag name for the view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + template :underscore.template +

+ + + + +
+ The HTML template to use for this view's main element +
+ + + +
Type:
+
    +
  • + +underscore.template + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

+ + + + + clear() +

+ + + + + + +
+ Remove the item, destroy the model from *localStorage* and delete its +view. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + download(e) +

+ + + + + + +
+ Downloads the data package for a result item that was clicked on +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
e + + +* + + + + The click event
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + getOpenURLCOinS() → {HTMLSpanElement} +

+ + + + + + +
+ Create ContextObjects in Spans (COinS) for the item. COinS is a method +to embed bibliographic metadata in the HTML code of web pages. This +allows bibliographic software to publish machine-readable bibliographic +items and client reference management software to retrieve +bibliographic metadata. (from wikipedia) +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - The span element containing the COinS data +
+ + + +
+
+ Type +
+
+ +HTMLSpanElement + + +
+
+ + + + + + + + + + + + + +

+ + + + + initialize(options) +

+ + + + + + +
+ Initialize the view. The SearchResultView listens for changes to its +model, re-rendering. Since there's a one-to-one correspondence between +a **SolrResult** and a **SearchResultView** in this app, we set a +direct reference on the model for convenience. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +* + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + loading() +

+ + + + + + +
+ Show the loading view +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + onClose() +

+ + + + + + +
+ Functions to perform when the view is closed +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + render() → {SearchResultView} +

+ + + + + + +
+ Render or re-render the result item. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ Returns this view +
+ + + +
+
+ Type +
+
+ +SearchResultView + + +
+
+ + + + + + + + + + + + + +

+ + + + + routeToMetadata(e) +

+ + + + + + +
+ Navigates the app to the metadata page for a result item that was +clicked on +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
e + + +* + + + + The click event
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + toggleSelected() +

+ + + + + + +
+ Toggles the selected state of the model +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + toggleShowOnMap(e) +

+ + + + + + +
+ Toggles the showOnMap state of the model when the user hovers over +or leaves the map marker icon +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
e + + +Event + + + + The mouseover or mouseout event
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/docs/SearchResultsPagerView.html b/docs/docs/SearchResultsPagerView.html index 44a9a4d59..3b92dce2d 100644 --- a/docs/docs/SearchResultsPagerView.html +++ b/docs/docs/SearchResultsPagerView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -127,7 +127,7 @@

Source:
@@ -188,6 +188,84 @@

Members

+

+ + + + + className :string +

+ + + + +
+ The classes to use for this view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -248,7 +326,7 @@
Type:
Source:
@@ -278,7 +356,8 @@

- A SolrResults collection that contains the page data that this Pager displays. + A SolrResults collection that contains the page data that this Pager +displays.
@@ -326,7 +405,164 @@

Type:
Source:
+ + + + + + + +
+ + + + + + + + +

+ + + + + tagName :string +

+ + + + +
+ The HTML tag to use for this view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + template :string +

+ + + + +
+ The HTML to display when no search results are found. This will be +updated by the view. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -354,12 +590,12 @@

Methods

-

- +

+ - linkTemplate(data) → {string} + handleClick(evt)

@@ -368,7 +604,7 @@

- Constructs and returns the HTML template string for a single page link in the pager + Handles clicks on the pager links
@@ -404,13 +640,13 @@

Parameters:
- data + evt -object +Event @@ -461,7 +697,7 @@
Parameters:
Source:
@@ -486,24 +722,6 @@
Parameters:
-
Returns:
- - - - -
-
- Type -
-
- -string - - -
-
- - @@ -515,12 +733,12 @@
Returns:
-

- +

+ - render() + hide()

@@ -529,7 +747,7 @@

- Renders the Pager View + Hides the pager
@@ -549,6 +767,9 @@

+
Since:
+
  • 2.25.0
+ @@ -573,7 +794,7 @@

Source:
@@ -609,12 +830,12 @@

-

- +

+ - renderPages() + linkTemplate(data) → {string}

@@ -623,7 +844,8 @@

- Render the page numbers and links. + Constructs and returns the HTML template string for a single page link +in the pager
@@ -634,15 +856,555 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + +object + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + loading() +

+ + + + + + +
+ Shows the loading version of the pager +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + removeLoading() +

+ + + + + + +
+ Removes the loading version of the pager +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + render() +

+ + + + + + +
+ Renders the Pager View +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + renderPages() +

+ + + + + + +
+ Render the page numbers and links. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + show() +

+ + + + + + +
+ Shows the pager +
+ + + + + + + + + + -
+
Since:
+
  • 2.25.0
+ @@ -667,7 +1429,7 @@

Source:
@@ -717,8 +1479,9 @@

- Constructs and returns a URL string to use for the given page in this pager. It assumes that the URL uses -a ".../page/X" structure. To provide a custom URL, override this function. + Constructs and returns a URL string to use for the given page in this +pager. It assumes that the URL uses a ".../page/X" structure. To +provide a custom URL, override this function.
@@ -814,7 +1577,7 @@

Parameters:
Source:
diff --git a/docs/docs/SearchResultsView.html b/docs/docs/SearchResultsView.html index 85e9ee5a4..e68ed9055 100644 --- a/docs/docs/SearchResultsView.html +++ b/docs/docs/SearchResultsView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,7 +48,7 @@

Class: SearchResultsView

SearchResultsView()

-
SearchResultsView
+
A view of search results.
@@ -244,7 +244,7 @@
Type:
Source:
@@ -274,7 +274,8 @@

- The events this view will listen to and the associated function to call. + The events this view will listen to and the associated function to +call.
@@ -322,7 +323,88 @@

Type:
Source:
+ + + + + + + +
+ + + + + + + + +

+ + + + + metricsModel :MetricsModel +

+ + + + +
+ The metrics model that will be passed to the search result view +
+ + + +
Type:
+
    +
  • + +MetricsModel + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -403,7 +485,7 @@
Type:
Source:
@@ -481,7 +563,7 @@
Type:
Source:
@@ -559,7 +641,7 @@
Type:
Source:
@@ -637,7 +719,7 @@
Type:
Source:
@@ -679,7 +761,8 @@

- Renders all SolrResults from the SearchResultsView#searchResults collection. + Renders all SolrResults from the +SearchResultsView#searchResults collection.
@@ -723,7 +806,7 @@

Source:
@@ -866,7 +949,7 @@

Parameters:
Source:
@@ -958,7 +1041,7 @@
Parameters:
-SearchResultView +SearchResultView @@ -1009,7 +1092,7 @@
Parameters:
Source:
@@ -1103,7 +1186,7 @@

Source:
@@ -1139,12 +1222,12 @@

-

- +

+ - loading() + empty()

@@ -1153,7 +1236,7 @@

- Renders a skeleton of this view that communicates to the user that it is loading. + Removes all child elements from this view.
@@ -1197,7 +1280,7 @@

Source:
@@ -1233,12 +1316,12 @@

-

- +

+ - setSearchResults() → {SolrResults} + loading()

@@ -1247,7 +1330,8 @@

- Creates and sets the SearchResultsView#searchResults property. + Renders a skeleton of this view that communicates to the user that it +is loading.
@@ -1291,7 +1375,7 @@

Source:
@@ -1316,25 +1400,103 @@

-

Returns:
- -
-
- Type -
-
+ + -SolrResults + + -
-
+ +

+ + + + + removeListeners() +

+ + + + + + +
+ Removes listeners set by the SearchResultsView#startListening +method. This is important to prevent zombie listeners from being +created. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + @@ -1345,12 +1507,12 @@
Returns:
-

- +

+ - showNoResults() + render()

@@ -1359,7 +1521,7 @@

- Shows a message when no search results have been found. + Render the view.
@@ -1403,7 +1565,7 @@

Source:
@@ -1439,12 +1601,12 @@

-

- +

+ - startListening() + setSearchResults() → {SolrResults}

@@ -1453,7 +1615,7 @@

- Sets listeners on the SearchResultsView#searchResults to change what is displayed in this view. + Creates and sets the SearchResultsView#searchResults property.
@@ -1497,7 +1659,7 @@

Source:
@@ -1522,6 +1684,613 @@

+

Returns:
+ + + + +
+
+ Type +
+
+ +SolrResults + + +
+
+ + + + + + + + + + + + + +

+ + + + + setUpMetrics() → {MetricsModel} +

+ + + + + + +
+ Creates a new MetricsModel if the app is configured to display metrics. +Sets the metrics model on this view. The metrics model is used to +display views, citations, and downloads for each search result. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +MetricsModel + + +
+
+ + + + + + + + + + + + + +

+ + + + + showError(searchResults, response) +

+ + + + + + +
+ When there is an error fetching the search results, show an alert +message to the user. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
searchResults + + +SolrResults + + + + The collection of search results
response + + +Object + + + + The response from the server
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + showNoResults() +

+ + + + + + +
+ Shows a message when no search results have been found. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + startListening() +

+ + + + + + +
+ Sets listeners on the SearchResultsView#searchResults to change +what is displayed in this view. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + updateMetrics() → {MetricsModel} +

+ + + + + + +
+ Updates the metrics model with the PIDs of the search results and +fetches the metrics. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +MetricsModel + + +
+
+ + diff --git a/docs/docs/SearchableSelectView.html b/docs/docs/SearchableSelectView.html index aecc67fba..c1f996a50 100644 --- a/docs/docs/SearchableSelectView.html +++ b/docs/docs/SearchableSelectView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/SemanticFilterView.html b/docs/docs/SemanticFilterView.html index aca8c9da6..9d552cc0f 100644 --- a/docs/docs/SemanticFilterView.html +++ b/docs/docs/SemanticFilterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -195,6 +195,368 @@

Members

+

+ + + + + collapseToggleClass :string +

+ + + + +
+ The class used for the button that toggles the collapsed state of the filter. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapse-toggle"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsed :boolean +

+ + + + +
+ The current state of the filter, if it is FilterView#collapsible. +Whatever this value is set to at initialization, will be how the filter is +initially rendered. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • true
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsedClass :string +

+ + + + +
+ The class to add to the filter when it is collapsed. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "collapsed"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + collapsible :boolean +

+ + + + +
+ Whether the filter is collapsible. If true, the filter will have a button that +toggles the collapsed state. +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -784,7 +1146,7 @@
Type:
Source:
@@ -980,7 +1342,7 @@

Source:
@@ -1146,7 +1508,7 @@

Parameters:
Source:
@@ -1290,7 +1652,7 @@
Parameters:
Source:
@@ -1463,7 +1825,7 @@
Parameters:
Source:
@@ -1623,7 +1985,7 @@
Parameters:
Source:
@@ -2103,7 +2465,7 @@
Parameters:
Source:
@@ -2252,7 +2614,173 @@
Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + toggleCollapse(collapseopt) +

+ + + + + + +
+ Toggle the collapsed state of the filter. If collapse is a boolean, then set the +collapsed state to that value. Otherwise, set it to the opposite of whichever +state is currently set. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
collapse + + +boolean + + + + + + <optional>
+ + + + + +
Whether to collapse the filter. If not provided, the +filter will be collapsed if it is currently expanded, and vice versa.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -2352,7 +2880,7 @@

Source:
@@ -2504,7 +3032,7 @@

Parameters:
Source:
diff --git a/docs/docs/SignInView.html b/docs/docs/SignInView.html index e1c69b370..dc97b2905 100644 --- a/docs/docs/SignInView.html +++ b/docs/docs/SignInView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/SolrResult.html b/docs/docs/SolrResult.html index 04d8ff97d..213f5df3f 100644 --- a/docs/docs/SolrResult.html +++ b/docs/docs/SolrResult.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -296,7 +296,7 @@
Parameters:
Source:
@@ -400,7 +400,7 @@

Source:
diff --git a/docs/docs/SolrResults.html b/docs/docs/SolrResults.html index 5a4800fef..b890b1bac 100644 --- a/docs/docs/SolrResults.html +++ b/docs/docs/SolrResults.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -177,6 +177,96 @@

Extends

+

Members

+ + + +

+ + + + + type :string +

+ + + + +
+ The name of this type of collection. +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + +
Default Value:
+
    +
  • "SolrResults"
  • +
+ + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

Methods

@@ -248,7 +338,7 @@

Source:
@@ -363,7 +453,7 @@

Source:
@@ -475,7 +565,7 @@

Source:
@@ -590,7 +680,7 @@

Source:
@@ -705,7 +795,7 @@

Source:
@@ -823,7 +913,7 @@

Source:
@@ -877,6 +967,125 @@

Returns:
+

+ + + + + getPIDs() → {Array.<string>} +

+ + + + + + +
+ Get the list of PIDs for the search results +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - The list of PID strings for the search results +
+ + + +
+
+ Type +
+
+ +Array.<string> + + +
+
+ + + + + + + + + + + + +

@@ -938,7 +1147,7 @@

Source:
@@ -1053,7 +1262,7 @@

Source:
@@ -1169,7 +1378,7 @@

Source:
@@ -1281,7 +1490,7 @@

Source:
@@ -1375,7 +1584,7 @@

Source:
@@ -1518,7 +1727,7 @@

Parameters:
Source:
diff --git a/docs/docs/SorterView.html b/docs/docs/SorterView.html index aceec3bf0..43f262fc6 100644 --- a/docs/docs/SorterView.html +++ b/docs/docs/SorterView.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,10 +48,21 @@

Class: SorterView

SorterView()

-
A view that displays a sort controller and sets the sort order on the attached SolrResults collection.
+
A view that displays a sort controller and sets the sort order +on the attached SolrResults collection.
+ + +
+

Screenshot

+ + + +
+ + @@ -184,6 +195,163 @@

Members

+

+ + + + + className :string +

+ + + + +
+ The HTML classes to use for this view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

+ + + + + events :Object +

+ + + + +
+ The events this view will listen to and the associated function to +call. +
+ + + +
Type:
+
    +
  • + +Object + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + +

@@ -196,7 +364,8 @@

- A reference to the SolrResults collection that this sorter displays and controls. + A reference to the SolrResults collection that this sorter +displays and controls.
@@ -244,7 +413,85 @@

Type:
Source:
+ + + + + + + +

+ + + + + + + + +

+ + + + + tagName :string +

+ + + + +
+ The HTML tag to use for this view's element +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -266,6 +513,200 @@
Type:

Methods

+ + + + + + +

+ + + + + hide() +

+ + + + + + +
+ Hides the view +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + hideIfNoResults() +

+ + + + + + +
+ Hides the view if there are no search results. +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -330,7 +771,7 @@

Source:
@@ -380,7 +821,8 @@

- Sets the sort order on the SolrResults when the sort is changed in the UI. + Sets the sort order on the SolrResults when the sort is changed +in the UI.
@@ -473,7 +915,104 @@

Parameters:
Source:
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + show() +

+ + + + + + +
+ Shows the view +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
diff --git a/docs/docs/SpatialFilter.html b/docs/docs/SpatialFilter.html index 3bca27f33..653149fe9 100644 --- a/docs/docs/SpatialFilter.html +++ b/docs/docs/SpatialFilter.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -48,9 +48,8 @@

Class: SpatialFilter

SpatialFilter()

-
A SpatialFilter represents a spatial constraint on the query to be executed, -and stores the geohash strings for all of the geohash tiles that coincide with the -search bounding box at the given zoom level.
+
A SpatialFilter represents a spatial constraint on the query to +be executed.
@@ -122,7 +121,7 @@

Source:
@@ -276,12 +275,12 @@

Methods

-

- +

+ - defaults() + coversEarth() → {boolean}

@@ -290,7 +289,7 @@

- Inherits all default properties of Filter + Returns true if the bounds set on the filter covers the entire earth
@@ -305,154 +304,150 @@

-

Properties:
+
- - - - - - + +
Since:
+
  • 2.25.0
+ - + - + - + - - - + - - - - - + - + - + - + +
Source:
+
+ - - + - - - - + + - - - - - - - - - - - - - - - + +
Returns:
+ + + + +
+
+ Type +
+
+ +boolean + + +
+
- - - - - + - + - - + +

+ + + + createBaseFilter(precisions, hashStrings) → {Filter} +

- - - - + - +
+ Creates a Filter model that represents the geohashes at a given +precision level for a specific set of geohashes +
- - - - + + + + + +
Parameters:
+ + +
NameTypeDescription
geohashes - - -Array.<string> + + - - The array of geohashes used to spatially constrain the search
groupedGeohashes - - -object - - The same geohash values, grouped by geohash level (e.g. 1,2,3...). Complete geohash groups (of 32) are consolidated to the level above.
east - - -number - - The easternmost longitude of the represented bounding box
west - - -number - - The westernmost longitude of the represented bounding box
north - - -number - - The northernmost latitude of the represented bounding box
+ + + + + + + + + + + + + + + + + - + + - + + @@ -495,19 +490,19 @@
Properties:
+ +
- +
Since:
+
  • 2.25.0
-
Overrides:
-
+ @@ -529,7 +524,7 @@
Properties:
Source:
@@ -554,6 +549,28 @@
Properties:
+
Returns:
+ + +
+ The filter model +
+ + + +
+
+ Type +
+
+ +Filter + + +
+
+ + @@ -565,12 +582,12 @@
Properties:
-

- +

+ - escapeSpecialChar(term) → {string} + defaults()

@@ -579,8 +596,7 @@

- Escapes Solr query reserved characters so that search terms can include - those characters without throwing an error. + Inherits all default properties of Filter
@@ -591,10 +607,15 @@

-

Parameters:
+ + + + +
Properties:
+ -
NameTypeDescription
southprecisions -number +Array.<number> @@ -462,20 +457,20 @@
Properties:
-
The southernmost latitude of the represented bounding boxThe geohash precision levels, e.g. [4, 5]
geohashLvelhashStrings -number +Array.<string> @@ -485,7 +480,7 @@
Properties:
-
The default precision level of the geohash-based searchThe geohashes, e.g. ["9q8yy", "9q8yz"]
+
@@ -611,33 +632,1046 @@
Parameters:
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
east + + +number + + + + The easternmost longitude of the search area
west + + +number + + + + The westernmost longitude of the search area
north + + +number + + + + The northernmost latitude of the search area
south + + +number + + + + The southernmost latitude of the search area
height + + +number + + + + The height at which to calculate the geohash +precision for the search area
maxGeohashValues + + +number + + + + The maximum number of geohash +values to use in the filter. If the number of geohashes exceeds this +value, the precision will be reduced until the number of geohashes is +less than or equal to this value.
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + escapeSpecialChar(term) → {string} +

+ + + + + + +
+ Escapes Solr query reserved characters so that search terms can include + those characters without throwing an error. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
term + + +string + + + + The search term or phrase to escape
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - The search term or phrase, after special characters are escaped +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getBounds() → {object} +

+ + + + + + +
+ Convert the coordinate attributes to a bounds object +
+ + + + + + + + + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ An object with north, south, east, and west props +
+ + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + + + + + + + + + +

+ + + + + getQuery(consolidateopt) → {string} +

+ + + + + + +
+ Builds a query string that represents this spatial filter +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
consolidate + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + Whether to consolidate the set of +geohashes to the smallest set that covers the same area (i.e. merges +geohashes together when there are complete groups of 32). This is false +by default because geohashes are already consolidated when they are +added as the spatial filter is used right now.
+ + + + + + +
+ + + + +
Since:
+
  • 2.25.0
+ + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The query fragment +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + + + + + + +

+ + + + + getValueQuerySubstring(valuesopt) → {string} +

+ + + + + + +
+ Constructs a query substring for each of the values set on this model +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
values + + +Array.<string> + + + + + + <optional>
+ + + + + +
The values to use in this query substring. +If not provided, the values set on the model are used.
+ + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ The query substring +
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + +
Example
+ +
values: ["walker", "jones"]
+  Returns: "(walker%20OR%20jones)"
+ + + + + + + + + +

+ + + + + hasChangedValues() → {boolean} +

+ + + + + + +
+ Checks if this Filter has values different than the default values. +
+ + + + + + + + + + + + + +
+ + + + + + +
Inherited From:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - Returns true if this Filter has values set on it, otherwise will return false +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + + + + + + + + + + + + +

+ + + + + hasCoordinates() → {boolean} +

+ + - - - term - - - - -string + +
+ Returns true if the filter has a valid set of coordinates +
+ - - - - - The search term or phrase to escape - - - - @@ -649,12 +1683,10 @@
Parameters:
- +
Since:
+
  • 2.25.0
-
Inherited From:
-
+ @@ -678,7 +1710,7 @@
Parameters:
Source:
@@ -707,7 +1739,7 @@
Returns:
- - The search term or phrase, after special characters are escaped + True if the filter has coordinates
@@ -718,7 +1750,7 @@
Returns:
-string +boolean
@@ -736,12 +1768,12 @@
Returns:
-

- +

+ - getQuery() + initialize()

@@ -750,7 +1782,7 @@

- Builds a query string that represents this spatial filter + Initialize the model, calling super
@@ -776,7 +1808,7 @@

Overrides:
@@ -799,7 +1831,7 @@

Source:
@@ -824,16 +1856,6 @@

-

Returns:
- - -
- queryFragment - the query string representing the geohash constraints -
- - - - @@ -845,12 +1867,12 @@
Returns:
-

- +

+ - getValueQuerySubstring(valuesopt) → {string} + isCoordinateQuery(fieldsopt) → {Boolean}

@@ -859,7 +1881,8 @@

- Constructs a query substring for each of the values set on this model + Check whether a set of query fields contain only fields that specify latitude and/or +longitude
@@ -897,7 +1920,7 @@

Parameters:
- values + fields @@ -923,8 +1946,8 @@
Parameters:
- The values to use in this query substring. -If not provided, the values set on the model are used. + A list of fields to check for coordinate fields. If not +provided, the fields set on the model will be used. @@ -941,11 +1964,14 @@
Parameters:
+
Since:
+
  • 2.21.0
+
Inherited From:
@@ -970,7 +1996,7 @@
Parameters:
Source:
@@ -999,7 +2025,8 @@
Returns:
- The query substring + Returns true if every field is a field that specifies latitude or +longitude
@@ -1010,7 +2037,7 @@
Returns:
-string +Boolean
@@ -1021,12 +2048,6 @@
Returns:
-
Example
- -
values: ["walker", "jones"]
-  Returns: "(walker%20OR%20jones)"
- - @@ -1034,12 +2055,12 @@
Example
-

- +

+ - groupGeohashes() + isDateQuery(value) → {boolean}

@@ -1048,9 +2069,7 @@

- Consolidates geohashes into groups based on their geohash level - and updates the model with those groups. The fields and values attributes - on this model are also updated with the geohashes. + Returns true if the given value or value set on this filter is a date range query
@@ -1061,6 +2080,55 @@

+

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +string + + + + The string to test
+ + @@ -1071,6 +2139,11 @@

+ +
Inherited From:
+
@@ -1094,7 +2167,7 @@

Source:
@@ -1119,6 +2192,24 @@

+

Returns:
+ + + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -1130,12 +2221,12 @@

-

- +

+ - hasChangedValues() → {boolean} + isEmpty() → {boolean}

@@ -1144,7 +2235,7 @@

- Checks if this Filter has values different than the default values. + isEmpty - Checks whether this Filter has any values or fields set
@@ -1168,7 +2259,7 @@

Inherited From:
@@ -1193,7 +2284,7 @@

Source:
@@ -1222,7 +2313,7 @@

Returns:
- - Returns true if this Filter has values set on it, otherwise will return false + returns true if the Filter's values and fields are empty
@@ -1251,12 +2342,12 @@
Returns:
-

- +

+ - initialize() + isIdFilter()

@@ -1265,7 +2356,8 @@

- Initialize the model, calling super + Checks if any of the fields in this Filter match one of the +AppConfig#queryIdentifierFields
@@ -1285,13 +2377,14 @@

- +
Since:
+
  • 2.17.0
-
Overrides:
-

Source: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.js<path d="M384 352h-1l-39-65a64 64 0 0 0 0-62l39-65h1a64 64 0 1 0-55-96H119a64 64 0 1 0-87 87v210a64 64 0 1 0 87 87h210a64 64 0 0 0 119-32c0-35-29-64-64-64zm-288 9V151a64 64 0 0 0 23-23h208l-38 64h-1a64 64 0 1 0 0 128h1l38 64H119a64 64 0 0 0-23-23zm176-105a16 16 0 1 1 32 0 16 16 0 0 1-32 0zM400 96a16 16 0 1 1-32 0 16 16 0 0 1 32 0zM64 80a16 16 0 1 1 0 32 16 16 0 0 1 0-32zM48 416a16 16 0 1 1 32 0 16 16 0 0 1-32 0zm336 16a16 16 0 1 1 0-32 16 16 0 0 1 0 32z"/></svg>' + icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M384 352h-1l-39-65a64 64 0 0 0 0-62l39-65h1a64 64 0 1 0-55-96H119a64 64 0 1 0-87 87v210a64 64 0 1 0 87 87h210a64 64 0 0 0 119-32c0-35-29-64-64-64zm-288 9V151a64 64 0 0 0 23-23h208l-38 64h-1a64 64 0 1 0 0 128h1l38 64H119a64 64 0 0 0-23-23zm176-105a16 16 0 1 1 32 0 16 16 0 0 1-32 0zM400 96a16 16 0 1 1-32 0 16 16 0 0 1 32 0zM64 80a16 16 0 1 1 0 32 16 16 0 0 1 0-32zM48 416a16 16 0 1 1 32 0 16 16 0 0 1-32 0zm336 16a16 16 0 1 1 0-32 16 16 0 0 1 0 32z"/></svg>', + outlineColor: null, + featureType: Cesium.Entity } ); }, @@ -146,6 +152,8 @@

Source: src/js/models/maps/assets/CesiumVectorData.js

Source: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.jsSource: src/js/models/maps/assets/CesiumVectorData.js { + const styles = this.getStyles(entity); + if (!styles) { + entity.show = false; + return; + } + entity.show = true; + for (const [type, styleFunction] of Object.entries(entityStyleMap)) { + if (entity[type]) { + styleFunction.call(this, entity, styles); } } + }, this); + }, - cesiumModel.entities.resumeEvents() + /** + * Update the styles for a polygon entity + * @param {Cesium.Entity} entity - The entity to update + * @param {Object} styles - Styles to apply, as returned by getStyles + * @since 2.25.0 + */ + stylePolygon: function (entity, styles) { + entity.polygon.material = styles.color + entity.polygon.outline = styles.outline; + entity.polygon.outlineColor = styles.outlineColor + entity.polygon.outlineWidth = styles.outline ? 2 : 0 + }, - // Let the map and/or other parent views know that a change has been made that - // requires the map to be re-rendered - model.trigger('appearanceChanged') + /** + * Update the styles for a point entity + * @param {Cesium.Entity} entity - The entity to update + * @param {Object} styles - Styles to apply, as returned by getStyles + * @since 2.25.0 + */ + stylePoint: function (entity, styles) { + entity.point.color = styles.color + entity.point.outlineColor = styles.outlineColor + entity.point.outlineWidth = styles.outline ? 2 : 0 + entity.point.pixelSize = styles.pointSize + }, + /** + * Update the styles for a polyline entity + * @param {Cesium.Entity} entity - The entity to update + * @param {Object} styles - Styles to apply, as returned by getStyles + * @since 2.25.0 + */ + stylePolyline: function (entity, styles) { + entity.polyline.material = styles.color + entity.polyline.width = styles.lineWidth + }, + + /** + * Update the styles for a billboard entity + * @param {Cesium.Entity} entity - The entity to update + * @param {Object} styles - Styles to apply, as returned by getStyles + * @since 2.25.0 + */ + styleBillboard: function (entity, styles) { + if (!this.pinBuilder) { + this.pinBuilder = new Cesium.PinBuilder() } - catch (error) { - console.log( - 'There was an error updating CesiumVectorData model styles' + - '. Error details: ' + error - ); + entity.billboard.image = this.pinBuilder.fromColor( + styles.color, styles.markerSize).toDataURL() + // To convert the automatically created billboards to points instead: + // entity.billboard = undefined; + // entity.point = new Cesium.PointGraphics(); + }, + + /** + * Update the styles for a label entity + * @param {Cesium.Entity} entity - The entity to update + * @param {Object} styles - Styles to apply, as returned by getStyles + * @since 2.25.0 + */ + styleLabel: function (entity, styles) { + // TODO... + }, + + /** + * Covert a Color model to a Cesium Color + * @param {Color} color A Color model + * @returns {Cesium.Color|null} A Cesium Color or null if the color is + * invalid + * @since 2.25.0 + */ + colorToCesiumColor: function (color) { + color = color?.get ? color.get("color") : color; + if(!color) return null + return new Cesium.Color( + color.red, color.green, color.blue, color.alpha + ) + }, + + /** + * Return the color for a feature based on the colorPalette and filters + * attributes. + * @param {Cesium.Entity} entity A Cesium Entity + * @returns {Cesium.Color|null} A Cesium Color or null if the color is + * invalid or alpha is 0 + * @since 2.25.0 + */ + colorForEntity: function (entity) { + const properties = this.getPropertiesFromFeature(entity); + const color = this.colorToCesiumColor(this.getColor(properties)); + const alpha = color.alpha * this.get("opacity"); + if (alpha === 0) return null; + color.alpha = alpha; + return this.colorToCesiumColor(color); + }, + + /** + * Return the styles for a selected feature + * @param {Cesium.Entity} entity A Cesium Entity + * @returns {Object} An object containing the styles for the feature + * @since 2.25.0 + */ + getSelectedStyles: function (entity) { + const highlightColor = this.colorToCesiumColor( + this.get("highlightColor") + ); + return { + "color": highlightColor || this.colorForEntity(entity), + "outlineColor": Cesium.Color.WHITE, + "outline": true, + "lineWidth": 7, + "markerSize": 34, + "pointSize": 17 + } + }, + + /** + * Return the styles for a feature + * @param {Cesium.Entity} entity A Cesium Entity + * @returns {Object} An object containing the styles for the feature + * @since 2.25.0 + */ + getStyles: function (entity) { + if(!entity) return null + if (this.featureIsSelected(entity)) { + return this.getSelectedStyles(entity) + } + const color = this.colorForEntity(entity); + if (!color) { return null } + const outlineColor = this.colorToCesiumColor( + this.get("outlineColor")?.get("color") + ); + return { + "color": color, + "outlineColor": outlineColor, + "outline": outlineColor ? true : false, + "lineWidth": 3, + "markerSize": 25, + "pointSize": 13, } }, @@ -439,7 +654,7 @@

Source: src/js/models/maps/assets/CesiumVectorData.js

-

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -126,6 +126,9 @@

Source: src/js/models/maps/assets/MapAsset.js

* @property {MapConfig#FeatureTemplate} [featureTemplate] Configuration for * content and layout of the Feature Info panel - the panel that shows information * about a selected feature from a vector asset ({@link FeatureInfoView}). + * @property {Cesium.Entity|Cesium.3DTilesetFeature} [featureType] For vector + * and 3d tileset assets, the object type that cesium uses to represent features + * from the asset. Null for imagery and terrain assets. * @property {MapConfig#CustomProperties} [customProperties] Configuration that * allows for the definition of custom feature properties, potentially based on * other properties. For example, a custom property could be a formatted version @@ -155,6 +158,7 @@

Source: src/js/models/maps/assets/MapAsset.js

colorPalette: null, customProperties: {}, featureTemplate: {}, + featureType: null, notification: {}, status: null, statusDetails: null @@ -168,7 +172,7 @@

Source: src/js/models/maps/assets/MapAsset.js

* description. * @typedef {Object} MapAssetConfig * @name MapConfig#MapAssetConfig - * @property {('Cesium3DTileset'|'BingMapsImageryProvider'|'IonImageryProvider'|'WebMapTileServiceImageryProvider'|'WebMapServiceImageryProvider'|'TileMapServiceImageryProvider'|'NaturalEarthII'|'CesiumTerrainProvider'|'GeoJsonDataSource'|'USGSImageryTopo')} type - + * @property {('Cesium3DTileset'|'BingMapsImageryProvider'|'IonImageryProvider'|'WebMapTileServiceImageryProvider'|'WebMapServiceImageryProvider'|'TileMapServiceImageryProvider'|'NaturalEarthII'|'CesiumTerrainProvider'|'GeoJsonDataSource'|'USGSImageryTopo'|'OpenStreetMapImageryProvider')} type - * A string indicating the format of the data. Some of these types correspond * directly to Cesium classes. The NaturalEarthII type is a special imagery layer * that automatically sets the cesiumOptions to load the Natural Earth II imagery @@ -394,7 +398,6 @@

Source: src/js/models/maps/assets/MapAsset.js

if (typeof this.updateAppearance === 'function') { const setSelectFeaturesListeners = function () { - const mapModel = this.get('mapModel') if (!mapModel) { return } const selectedFeatures = mapModel.get('selectedFeatures') @@ -410,7 +413,7 @@

Source: src/js/models/maps/assets/MapAsset.js

} setSelectFeaturesListeners.call(this) - this.listenTo(this, 'change:mapModel', setSelectFeaturesListeners) + this.stopListening(this, 'change:mapModel', setSelectFeaturesListeners) this.listenTo(this, 'change:mapModel', setSelectFeaturesListeners) } } @@ -425,7 +428,7 @@

Source: src/js/models/maps/assets/MapAsset.js

/** * Given a feature object from a Feature model, checks if it is part of the * selectedFeatures collection. See featureObject property from - * {@link Feature#defaults}. + * {@link Feature#defaults}. For vector and 3d tile models only. * @param {*} feature - An object that a Map widget uses to represent this feature * in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature * @returns {boolean} Returns true if the given feature is part of the @@ -437,6 +440,64 @@

Source: src/js/models/maps/assets/MapAsset.js

return map.get('selectedFeatures').containsFeature(feature) }, + /** + * Checks if a feature from the map (a Cesium object) is the type of + * feature that this map asset model contains. For example, if a + * Cesium3DTilesetFeature is passed to this function, this function + * will return true if it is a Cesium3DTileset model, and false if it + * is a CesiumVectorData model. + * @param {Cesium.Cesium3DTilesetFeature|Cesium.Entity} feature + * @returns {boolean} true if the feature is an instance of the feature + * type set on the asset model, false otherwise. + * @since 2.25.0 + */ + usesFeatureType: function(feature) { + const ft = this.get("featureType"); + if (!feature || !ft) return false + if (!feature instanceof ft) return false + return true + }, + + /** + * Given a feature object from a Feature model, checks if it is part of the + * selectedFeatures collection. See featureObject property from + * {@link Feature#defaults}. For vector and 3d tile models only. + * @param {*} feature - An object that a Map widget uses to represent this feature + * in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature + * @returns {boolean} Returns true if the given feature is part of the + * selectedFeatures collection in this asset + * @since 2.25.0 + */ + containsFeature: function (feature) { + if (!this.usesFeatureType(feature)) return false + if (!this.getCesiumModelFromFeature) return false + const cesiumModel = this.getCesiumModelFromFeature(feature) + if (!cesiumModel) return false + if (this.get('cesiumModel') == cesiumModel) return true + return false + }, + + /** + * Given a feature object from a Feature model, returns the attributes + * needed to create a Feature model. For vector and 3d tile models only. + * @param {*} feature - An object that a Map widget uses to represent this feature + * in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature + * @returns {Object} An object with properties, mapAsset, featureID, featureObject, + * and label properties. Returns null if the feature is not the correct type + * for this asset model. + */ + getFeatureAttributes: function (feature) { + if (!this.usesFeatureType(feature)) return null; + if (!this.getCesiumModelFromFeature) return null; + return { + properties: this.getPropertiesFromFeature(feature), + mapAsset: this, + featureID: this.getIDFromFeature(feature), + featureObject: feature, + label: this.getLabelFromFeature(feature), + } + }, + /** * Given a set of properties from a Feature from this Map Asset model, add any * custom properties to the properties object and return it. @@ -736,17 +797,13 @@

Source: src/js/models/maps/assets/MapAsset.js

try { const model = this const colorPalette = model.get('colorPalette') - if (colorPalette) { - return colorPalette.getColor(properties) - } else { - return new AssetColorPalette().getDefaultColor() - } + return ( + colorPalette?.getColor(properties) || + new AssetColorPalette().getDefaultColor() + ) } - catch (error) { - console.log( - 'There was an error getting a color for a MapAsset model' + - '. Error details: ' + error - ); + catch (e) { + console.log('Failed to a color in a MapAsset model', e); } }, @@ -775,6 +832,7 @@

Source: src/js/models/maps/assets/MapAsset.js

* @returns {boolean} Returns true if the MapAsset has opacity > 0 and is visible. */ isVisible: function () { + if(this.get('temporarilyHidden') === true) return false return this.get('visible') && this.get('opacity') > 0 }, diff --git a/docs/docs/src_js_models_metadata_ScienceMetadata.js.html b/docs/docs/src_js_models_metadata_ScienceMetadata.js.html index f242557db..f95ae1b4e 100644 --- a/docs/docs/src_js_models_metadata_ScienceMetadata.js.html +++ b/docs/docs/src_js_models_metadata_ScienceMetadata.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EML211.js.html b/docs/docs/src_js_models_metadata_eml211_EML211.js.html index b0d37cba8..4e6c87b60 100644 --- a/docs/docs/src_js_models_metadata_eml211_EML211.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EML211.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -1447,14 +1447,12 @@

Source: src/js/models/metadata/eml211/EML211.js

//Save the EML plain text copy copy.save(); - //Send this exception to Google Analytics - if(MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")){ - ga('send', 'exception', { - 'exDescription': "EML save error: " + errorMsg + " | Id: " + model.get("id") + - " | v. " + MetacatUI.metacatUIVersion + " | EML draft: " + copy.get("id"), - 'exFatal': true - }); - } + // Track the error + MetacatUI.analytics?.trackException( + `EML save error: ${errorMsg}, EML draft: ${copy.get("id")}`, + model.get("id"), + true + ); } } }, MetacatUI.appUserModel.createAjaxSettings()); diff --git a/docs/docs/src_js_models_metadata_eml211_EMLAnnotation.js.html b/docs/docs/src_js_models_metadata_eml211_EMLAnnotation.js.html index 1feda1e53..8c67f866b 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLAnnotation.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLAnnotation.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLAttribute.js.html b/docs/docs/src_js_models_metadata_eml211_EMLAttribute.js.html index 7f12de4b8..b5dcd69fe 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLAttribute.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLAttribute.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLDataTable.js.html b/docs/docs/src_js_models_metadata_eml211_EMLDataTable.js.html index 68611984a..eb0e9331c 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLDataTable.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLDataTable.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLEntity.js.html b/docs/docs/src_js_models_metadata_eml211_EMLEntity.js.html index 46bd60438..bf2bd1e50 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLEntity.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLEntity.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLGeoCoverage.js.html b/docs/docs/src_js_models_metadata_eml211_EMLGeoCoverage.js.html index b7a1671f9..a07b2a368 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLGeoCoverage.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLGeoCoverage.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLMeasurementScale.js.html b/docs/docs/src_js_models_metadata_eml211_EMLMeasurementScale.js.html index 78cea0f4f..0c8aa4ba9 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLMeasurementScale.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLMeasurementScale.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLMethods.js.html b/docs/docs/src_js_models_metadata_eml211_EMLMethods.js.html index b9a8108e3..ff76a7dc5 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLMethods.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLMethods.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLNonNumericDomain.js.html b/docs/docs/src_js_models_metadata_eml211_EMLNonNumericDomain.js.html index 41eac9a89..d0f55e357 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLNonNumericDomain.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLNonNumericDomain.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLNumericDomain.js.html b/docs/docs/src_js_models_metadata_eml211_EMLNumericDomain.js.html index 7e585a377..b7601ab0d 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLNumericDomain.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLNumericDomain.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLOtherEntity.js.html b/docs/docs/src_js_models_metadata_eml211_EMLOtherEntity.js.html index 71f024c5d..8809711b3 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLOtherEntity.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLOtherEntity.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLParty.js.html b/docs/docs/src_js_models_metadata_eml211_EMLParty.js.html index 186735097..4ad07ed7c 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLParty.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLParty.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLTaxonCoverage.js.html b/docs/docs/src_js_models_metadata_eml211_EMLTaxonCoverage.js.html index 0ad03b6d2..4c80af5cf 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLTaxonCoverage.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLTaxonCoverage.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLTemporalCoverage.js.html b/docs/docs/src_js_models_metadata_eml211_EMLTemporalCoverage.js.html index 85214a689..194b1bffc 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLTemporalCoverage.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLTemporalCoverage.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLText.js.html b/docs/docs/src_js_models_metadata_eml211_EMLText.js.html index 9a2ac3bad..9cd275408 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLText.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLText.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml211_EMLUnit.js.html b/docs/docs/src_js_models_metadata_eml211_EMLUnit.js.html index f174e4aae..67e37fadc 100644 --- a/docs/docs/src_js_models_metadata_eml211_EMLUnit.js.html +++ b/docs/docs/src_js_models_metadata_eml211_EMLUnit.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml220_EMLText.js.html b/docs/docs/src_js_models_metadata_eml220_EMLText.js.html index 02db08531..e0b454391 100644 --- a/docs/docs/src_js_models_metadata_eml220_EMLText.js.html +++ b/docs/docs/src_js_models_metadata_eml220_EMLText.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml_EMLMethodStep.js.html b/docs/docs/src_js_models_metadata_eml_EMLMethodStep.js.html index 678feb352..fd4b815e6 100644 --- a/docs/docs/src_js_models_metadata_eml_EMLMethodStep.js.html +++ b/docs/docs/src_js_models_metadata_eml_EMLMethodStep.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_metadata_eml_EMLSpecializedText.js.html b/docs/docs/src_js_models_metadata_eml_EMLSpecializedText.js.html index 63229898c..6f8577d85 100644 --- a/docs/docs/src_js_models_metadata_eml_EMLSpecializedText.js.html +++ b/docs/docs/src_js_models_metadata_eml_EMLSpecializedText.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_portals_PortalImage.js.html b/docs/docs/src_js_models_portals_PortalImage.js.html index 09cd421bf..647b1b286 100644 --- a/docs/docs/src_js_models_portals_PortalImage.js.html +++ b/docs/docs/src_js_models_portals_PortalImage.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_portals_PortalModel.js.html b/docs/docs/src_js_models_portals_PortalModel.js.html index d6e0f88ec..b3dee9e0d 100644 --- a/docs/docs/src_js_models_portals_PortalModel.js.html +++ b/docs/docs/src_js_models_portals_PortalModel.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_portals_PortalSectionModel.js.html b/docs/docs/src_js_models_portals_PortalSectionModel.js.html index 063226be3..44d4aa111 100644 --- a/docs/docs/src_js_models_portals_PortalSectionModel.js.html +++ b/docs/docs/src_js_models_portals_PortalSectionModel.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_portals_PortalVizSectionModel.js.html b/docs/docs/src_js_models_portals_PortalVizSectionModel.js.html index 95cfb712d..646ea650b 100644 --- a/docs/docs/src_js_models_portals_PortalVizSectionModel.js.html +++ b/docs/docs/src_js_models_portals_PortalVizSectionModel.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_projects_Project.js.html b/docs/docs/src_js_models_projects_Project.js.html index 829bf174c..593110934 100644 --- a/docs/docs/src_js_models_projects_Project.js.html +++ b/docs/docs/src_js_models_projects_Project.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_models_queryFields_QueryField.js.html b/docs/docs/src_js_models_queryFields_QueryField.js.html index a0c58c60c..f3f5437c2 100644 --- a/docs/docs/src_js_models_queryFields_QueryField.js.html +++ b/docs/docs/src_js_models_queryFields_QueryField.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_routers_router.js.html b/docs/docs/src_js_routers_router.js.html index e38142fb6..13d6c346b 100644 --- a/docs/docs/src_js_routers_router.js.html +++ b/docs/docs/src_js_routers_router.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -343,40 +343,33 @@

Source: src/js/routers/router.js

renderData: function (mode, query, page) { this.routeHistory.push("data"); + // Check for a page URL parameter + if(!page) MetacatUI.appModel.set("page", 0); + else MetacatUI.appModel.set('page', page - 1); + + // Check if we are using the new CatalogSearchView + if(!MetacatUI.appModel.get("useDeprecatedDataCatalogView")){ + require(["views/search/CatalogSearchView"], function(CatalogSearchView){ + MetacatUI.appView.catalogSearchView = new CatalogSearchView({ + initialQuery: query, + }); + MetacatUI.appView.showView(MetacatUI.appView.catalogSearchView); + }); + return; + } - ///Check for a page URL parameter - if((typeof page === "undefined") || !page) - MetacatUI.appModel.set("page", 0); - else if(page == 0) - MetacatUI.appModel.set('page', 0); - else - MetacatUI.appModel.set('page', page-1); - - //Check if we are using the new CatalogSearchView - if(!MetacatUI.appModel.get("useDeprecatedDataCatalogView")){ - require(["views/search/CatalogSearchView"], function(CatalogSearchView){ - MetacatUI.appView.catalogSearchView = new CatalogSearchView(); - MetacatUI.appView.showView(MetacatUI.appView.catalogSearchView); - }); - return; - } - - //Check for a query URL parameter - if((typeof query !== "undefined") && query){ + // Check for a query URL parameter + if ((typeof query !== "undefined") && query) { MetacatUI.appSearchModel.set('additionalCriteria', [query]); } - require(['views/DataCatalogView'], function(DataCatalogView){ - if(!MetacatUI.appView.dataCatalogView) - MetacatUI.appView.dataCatalogView = new DataCatalogView(); - - //Check for a search mode URL parameter - if((typeof mode !== "undefined") && mode) - MetacatUI.appView.dataCatalogView.mode = mode; - - MetacatUI.appView.showView(MetacatUI.appView.dataCatalogView); - }); - + require(['views/DataCatalogView'], function(DataCatalogView){ + if (!MetacatUI.appView.dataCatalogView) { + MetacatUI.appView.dataCatalogView = new DataCatalogView(); + } + if (mode) MetacatUI.appView.dataCatalogView.mode = mode; + MetacatUI.appView.showView(MetacatUI.appView.dataCatalogView); + }); }, /** diff --git a/docs/docs/src_js_views_AccessPolicyView.js.html b/docs/docs/src_js_views_AccessPolicyView.js.html index 4a7667247..222818e76 100644 --- a/docs/docs/src_js_views_AccessPolicyView.js.html +++ b/docs/docs/src_js_views_AccessPolicyView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_AccessRuleView.js.html b/docs/docs/src_js_views_AccessRuleView.js.html index 8e1ed6180..ec8a10434 100644 --- a/docs/docs/src_js_views_AccessRuleView.js.html +++ b/docs/docs/src_js_views_AccessRuleView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_AnnotationView.js.html b/docs/docs/src_js_views_AnnotationView.js.html index ce311d574..eaf9a4d93 100644 --- a/docs/docs/src_js_views_AnnotationView.js.html +++ b/docs/docs/src_js_views_AnnotationView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_AppView.js.html b/docs/docs/src_js_views_AppView.js.html index de49e18d0..b555f1058 100644 --- a/docs/docs/src_js_views_AppView.js.html +++ b/docs/docs/src_js_views_AppView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -128,6 +128,7 @@

Source: src/js/views/AppView.js

//Change the document title when the app changes the MetacatUI.appModel title at any time this.listenTo(MetacatUI.appModel, "change:title", this.changeTitle); + this.listenTo(MetacatUI.appModel, "change:description", this.changeDescription); this.checkIncompatibility(); }, @@ -149,11 +150,24 @@

Source: src/js/views/AppView.js

return this.el.querySelector(this.contentSelector); }, - //Changes the web document's title + /** + * Change the web document's title + */ changeTitle: function () { document.title = MetacatUI.appModel.get("title"); }, + /** + * Change the web document's description + * @since 2.25.0 + */ + changeDescription: function () { + $("meta[name=description]").attr( + "content", + MetacatUI.appModel.get("description") + ); + }, + /** Render the main view and/or re-render subviews. Delegate rendering and event handling to sub views. --- @@ -180,8 +194,7 @@

Source: src/js/views/AppView.js

$("head") .append( this.appHeadTemplate({ - theme: MetacatUI.theme, - googleAnalyticsKey: MetacatUI.appModel.get("googleAnalyticsKey"), + theme: MetacatUI.theme }) ) //Add the JSON-LD to the head element @@ -317,24 +330,11 @@

Source: src/js/views/AppView.js

// track the current view this.currentView = view; - this.sendAnalytics(); + MetacatUI.analytics?.trackPageView(); this.trigger("appRenderComplete"); }, - sendAnalytics: function () { - if ( - !MetacatUI.appModel.get("googleAnalyticsKey") || - typeof ga === "undefined" - ) - return; - - var page = window.location.pathname || "/"; - page = page.replace("#", ""); //remove the leading pound sign - - ga("send", "pageview", { page: page }); - }, - routeToMetadata: function (e) { e.preventDefault(); @@ -419,6 +419,7 @@

Source: src/js/views/AppView.js

* @property {boolean} [options.remove] If true, the user will be able to remove the alert with a "close" icon. * @property {boolean} [options.includeEmail] If true, the alert will include a link to the {@link AppConfig#emailContact} * @property {string} [options.emailBody] Specify an email body to use in the email link. + * @returns {Element} The alert element */ showAlert: function () { if (arguments.length > 1) { @@ -489,6 +490,7 @@

Source: src/js/views/AppView.js

$(options.container).prepend(alert); } } + return alert; }, /** diff --git a/docs/docs/src_js_views_CitationHeaderView.js.html b/docs/docs/src_js_views_CitationHeaderView.js.html index 0a12754dc..a3898c882 100644 --- a/docs/docs/src_js_views_CitationHeaderView.js.html +++ b/docs/docs/src_js_views_CitationHeaderView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_CitationListView.js.html b/docs/docs/src_js_views_CitationListView.js.html index 8af4a758d..0865150b2 100644 --- a/docs/docs/src_js_views_CitationListView.js.html +++ b/docs/docs/src_js_views_CitationListView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_CitationView.js.html b/docs/docs/src_js_views_CitationView.js.html index 200699edb..41da1227b 100644 --- a/docs/docs/src_js_views_CitationView.js.html +++ b/docs/docs/src_js_views_CitationView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_ColorPaletteView.js.html b/docs/docs/src_js_views_ColorPaletteView.js.html index 33b4efacb..a9bf66fe0 100644 --- a/docs/docs/src_js_views_ColorPaletteView.js.html +++ b/docs/docs/src_js_views_ColorPaletteView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_DataCatalogView.js.html b/docs/docs/src_js_views_DataCatalogView.js.html index e1ac39e90..0ade8ed4a 100644 --- a/docs/docs/src_js_views_DataCatalogView.js.html +++ b/docs/docs/src_js_views_DataCatalogView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -46,18 +46,14 @@

Source: src/js/views/DataCatalogView.js

/*global define */
 define(["jquery",
-        "jqueryui",
         "underscore",
         "backbone",
-        "bioportal",
         "collections/SolrResults",
         "models/Search",
-        "models/Stats",
         "models/MetricsModel",
         "common/Utilities",
         "views/SearchResultView",
         "views/searchSelect/AnnotationFilterView",
-        "views/maps/CesiumWidgetView",
         "text!templates/search.html",
         "text!templates/statCounts.html",
         "text!templates/pager.html",
@@ -68,8 +64,8 @@ 

Source: src/js/views/DataCatalogView.js

"nGeohash" ], function( - $, $ui, _, Backbone, Bioportal, SearchResults, SearchModel, StatsModel, - MetricsModel, Utilities, SearchResultView, AnnotationFilter, CesiumWidgetView, + $, _, Backbone, SearchResults, SearchModel, + MetricsModel, Utilities, SearchResultView, AnnotationFilter, CatalogTemplate, CountTemplate, PagerTemplate, MainContentTemplate, CurrentFilterTemplate, LoadingTemplate, gmaps, nGeohash ) { @@ -209,9 +205,6 @@

Source: src/js/views/DataCatalogView.js

// and event handling to sub views render: function () { - // Which type of map are we rendering, Google maps or Cesium maps? - this.mapType = MetacatUI.appModel.get("dataCatalogMap") || "google"; - // Use the global models if there are no other models specified at time of render if ((MetacatUI.appModel.get("searchHistory").length > 0) && (!this.searchModel || Object.keys(this.searchModel).length == 0) @@ -829,10 +822,8 @@

Source: src/js/views/DataCatalogView.js

// Trigger a new search this.triggerSearch(); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - ga("send", "event", "search", "filter, " + category, value); - } + // Track this event + MetacatUI.analytics?.trackEvent("search", "filter, " + category, value) }, // Update the UI year slider and input values @@ -1029,10 +1020,8 @@

Source: src/js/views/DataCatalogView.js

replace: true }); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - ga("send", "event", "search", "filter, Data Year", minVal + " to " + maxVal); - } + // Track this event + MetacatUI.analytics?.trackEvent("search", "filter, Data Year", minVal + " to " + maxVal); } else { // Add the filter elements @@ -1041,10 +1030,9 @@

Source: src/js/views/DataCatalogView.js

replace: true }); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - ga("send", "event", "search", "filter, Publication Year", minVal + " to " + maxVal); - } + // Track this event + MetacatUI.analytics?.trackEvent("search", "filter, Publication Year", minVal + " to " + maxVal); + } else { this.hideFilter($("#publish_year").attr("data-category"), true); } @@ -1054,10 +1042,9 @@

Source: src/js/views/DataCatalogView.js

replace: true }); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - ga("send", "event", "search", "filter, Data Year", minVal + " to " + maxVal); - } + // Track this event + MetacatUI.analytics?.trackEvent("search", "filter, Data Year", minVal + " to " + maxVal); + } else { this.hideFilter($("#data_year").attr("data-category"), true); } @@ -1171,10 +1158,9 @@

Source: src/js/views/DataCatalogView.js

// Trigger a new search this.triggerSearch(); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - ga("send", "event", "search", "filter, " + category, term); - } + // Track this event + MetacatUI.analytics?.trackEvent("search", "filter, " + category, term); + }, // Removes a specific filter term from the searchModel @@ -1889,7 +1875,7 @@

Source: src/js/views/DataCatalogView.js

renderMap: function () { // If gmaps isn't enabled or loaded with an error, use list mode - if (this.mapType === "google" && (!gmaps || this.mode == "list")) { + if (!gmaps || this.mode == "list") { this.ready = true; this.mode = "list"; return; @@ -1901,31 +1887,6 @@

Source: src/js/views/DataCatalogView.js

$("body").addClass("mapMode"); } - // Render Cesium maps, if that is the map type rendered. - if (this.mapType == "cesium") { - var mapContainer = $("#map-container").append("<div id='map-canvas'></div>"); - - var mapView = new CesiumWidgetView({ - el: mapContainer - }); - mapView.render(); - this.map = mapView; - - this.mapModel.set("map", this.map); - - this.map.showGeohashes() - - // Mark the view as ready to start a search - this.ready = true; - this.triggerSearch(); - this.allowSearch = false; - - // TODO / WIP : Implement the rest of the map search features... - return - } - - // Continue with rendering Google maps, if that is configured mapType - // Get the map options and create the map gmaps.visualRefresh = true; var mapOptions = this.mapModel.get("mapOptions"); @@ -2092,11 +2053,9 @@

Source: src/js/views/DataCatalogView.js

google.maps.event.trigger(this.mapModel.get("map"), "idle"); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - var action = isOn ? "on" : "off"; - ga("send", "event", "map", action); - } + // Track this event + MetacatUI.analytics?.trackEvent("map", (isOn ? "on" : "off")); + }, /** @@ -2215,12 +2174,6 @@

Source: src/js/views/DataCatalogView.js

**/ drawTiles: function () { - // This function is for Google maps only. The CesiumWidgetView draws its - // own tiles. - if (this.mapType !== "google") { - return - } - // Exit if maps are not in use if ((this.mode != "map") || (!gmaps)) { return false; @@ -2539,10 +2492,9 @@

Source: src/js/views/DataCatalogView.js

myFitBounds(viewRef.map, tileBounds); - // Send this event to Google Analytics - if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) { - ga("send", "event", "map", "clickTile", "geohash : " + tileObject.geohash); - } + // Track this event + MetacatUI.analytics?.trackEvent("map", "clickTile", "geohash : " + tileObject.geohash); + }); } diff --git a/docs/docs/src_js_views_DataCatalogViewWithFilters.js.html b/docs/docs/src_js_views_DataCatalogViewWithFilters.js.html index 23b470ab2..6c8e61ccd 100644 --- a/docs/docs/src_js_views_DataCatalogViewWithFilters.js.html +++ b/docs/docs/src_js_views_DataCatalogViewWithFilters.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -44,686 +44,729 @@

Source: src/js/views/DataCatalogViewWithFilters.js

-
define(["jquery",
-        "underscore",
-        "backbone",
-        "gmaps",
-        "collections/Filters",
-        "collections/SolrResults",
-        "models/filters/FilterGroup",
-        "models/filters/SpatialFilter",
-        "models/Stats",
-        "views/DataCatalogView",
-        "views/filters/FilterGroupsView",
-        "text!templates/dataCatalog.html",
-        "nGeohash"
-    ],
-    function($, _, Backbone, gmaps, Filters, SearchResults, FilterGroup, SpatialFilter, Stats,
-      DataCatalogView, FilterGroupsView,
-      template, nGeohash) {
-
-        /**
-         * @class DataCatalogViewWithFilters
-         * @classdesc A DataCatalogView that uses the Search collection
-         * and the Filter models for managing queries rather than the
-         * Search model and the filter literal objects used in the
-         * parent DataCatalogView.  This accommodates custom portal filters.
-         * This view is deprecated and will eventually be removed in a future version (likely 3.0.0)
-         * @classcategory Views
-         * @extends DataCatalogView
-         * @constructor
-         * @deprecated
-         */
-        var DataCatalogViewWithFilters = DataCatalogView.extend(
-          /** @lends DataCatalogViewWithFilters.prototype */{
-
-            el: null,
-
-            /**
-            * The HTML tag name for this view element
-            * @type {string}
-            */
-            tagName: "div",
-
-            /**
-            * The HTML class names for this view element
-            * @type {string}
-            */
-            className: "data-catalog",
-
-            /**
-            * The primary HTML template for this view
-            * @type {Underscore.template}
-            */
-            template: _.template(template),
-
-            /**
-             * A reference to the PortalEditorView
-             * @type {PortalEditorView}
-             */
-            editorView: undefined,
-
-            /**
-            * The sort order for the Solr query
-            * @type {string}
-            */
-            sortOrder: "dateUploaded+desc",
-
-            /**
-            * The jQuery selector for the FilterGroupsView container
-            * @type {string}
-            */
-            filterGroupsContainer: ".filter-groups-container",
-
-            /**
-            * The Search model to use for creating and storing Filters and constructing
-            * 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 (Search)
-            */
-            searchModel: undefined,
-
-            /**
-             * Override DataCatalogView.render() to render this view with filters
-             * from the Filters collection
-             */
-            render: function() {
-                var loadingHTML;
-                var templateVars;
-                var compiledEl;
-                var tooltips;
-                var groupedTooltips;
-                var forFilterLabel = true;
-                var forOtherElements = false;
-                // TODO: Do we really need to cache the filters collection?
-                // Reconcile this from DataCatalogView.render()
-                // See https://github.com/NCEAS/metacatui/blob/19d608df9cc17ac2abee76d35feca415137c09d7/src/js/views/DataCatalogView.js#L122-L145
-
-                //Get the search mode - either "map" or "list"
-                if ((typeof this.mode === "undefined") || !this.mode) {
-                    this.mode = MetacatUI.appModel.get("searchMode");
-                    if ((typeof this.mode === "undefined") || !this.mode) {
-                        this.mode = "map";
-                    }
-                    MetacatUI.appModel.set("searchMode", this.mode);
-                }
-
-                // Which type of map are we rendering, Google maps or Cesium maps?
-                this.mapType = MetacatUI.appModel.get("dataCatalogMap") || "google";
-
-                if(!this.statsModel){
-                  this.statsModel = new Stats();
-                }
-
-                if( !this.searchResults ){
-                  this.searchResults = new SearchResults();
-                }
-
-                // Use map mode on tablets and browsers only
-                if ($(window).outerWidth() <= 600) {
-                    this.mode = "list";
-                    MetacatUI.appModel.set("searchMode", "list");
-                    gmaps = null;
-                }
-
-                // If this is a subview, don't set the headerType
-                if (!this.isSubView) {
-                    MetacatUI.appModel.set("headerType", "default");
-                    $("body").addClass("DataCatalog");
-                } else {
-                    this.$el.addClass("DataCatalog");
-                }
-                //Populate the search template with some model attributes
-                loadingHTML = this.loadingTemplate({
-                    msg: "Loading entries ..."
-                });
-
-                templateVars = {
-                    gmaps: gmaps,
-                    mode: MetacatUI.appModel.get("searchMode"),
-                    useMapBounds: this.searchModel.get("useGeohash"),
-                    username: MetacatUI.appUserModel.get("username"),
-                    isMySearch: (_.indexOf(this.searchModel.get("username"), MetacatUI.appUserModel.get("username")) > -1),
-                    loading: loadingHTML,
-                    searchModelRef: this.searchModel,
-                    searchResultsRef: this.searchResults,
-                    dataSourceTitle: (MetacatUI.theme == "dataone") ? "Member Node" : "Data source"
-                }
-                compiledEl =
-                    this.template(_.extend(this.searchModel.toJSON(), templateVars));
-                this.$el.html(compiledEl);
-
-                //Create and render the FilterGroupsView
-                this.createFilterGroups();
-
-                // Store some references to key views that we use repeatedly
-                this.$resultsview = this.$("#results-view");
-                this.$results = this.$("#results");
-
-                //Update stats
-                this.updateStats();
-
-                //Render the Google Map
-                this.renderMap();
-                //Initialize the tooltips
-                tooltips = $(".tooltip-this");
-
-                //Find the tooltips that are on filter labels - add a slight delay to those
-                groupedTooltips = _.groupBy(tooltips, function(t) {
-                    return ((($(t).prop("tagName") == "LABEL") ||
-                        ($(t).parent().prop("tagName") == "LABEL")) &&
-                        ($(t).parents(".filter-container").length > 0))
-                });
-
-                $(groupedTooltips[forFilterLabel]).tooltip({
-                    delay: {
-                        show: "800"
-                    }
-                });
-                $(groupedTooltips[forOtherElements]).tooltip();
-
-                //Initialize all popover elements
-                $(".popover-this").popover();
-
-                //Initialize the resizeable content div
-                $("#content").resizable({
-                    handles: "n,s,e,w"
-                });
-
-                // Register listeners; this is done here in render because the HTML
-                // needs to be bound before the listenTo call can be made
-                this.stopListening(this.searchResults);
-                this.stopListening(this.searchModel);
-                this.stopListening(MetacatUI.appModel);
-                this.listenTo(this.searchResults, "reset", this.cacheSearch);
-                this.listenTo(this.searchResults, "add", this.addOne);
-                this.listenTo(this.searchResults, "reset", this.addAll);
-                this.listenTo(this.searchResults, "reset", this.checkForProv);
-                this.listenTo(this.searchResults, "error", this.showError);
-
-                // Listen to changes in the Search model Filters to trigger a search
-                this.stopListening(this.searchModel.get("filters"), "add remove update reset change");
-                this.listenTo(this.searchModel.get("filters"), "add remove update reset change", this.triggerSearch);
-
-                // Listen to the MetacatUI.appModel for the search trigger
-                this.listenTo(MetacatUI.appModel, "search", this.getResults);
-
-                this.listenTo(MetacatUI.appUserModel, "change:loggedIn", this.triggerSearch);
-
-                // and go to a certain page if we have it
-                this.getResults();
-
-                //Set a custom height on any elements that have the .auto-height class
-                if ($(".auto-height").length > 0 && !this.fixedHeight) {
-                    //Readjust the height whenever the window is resized
-                    $(window).resize(this.setAutoHeight);
-                    $(".auto-height-member").resize(this.setAutoHeight);
-                }
-
-                this.addAnnotationFilter();
-
-                return this;
-            },
-
-            /**
-            * Creates UI Filter Groups and renders them in this view. UI Filter Groups
-            * are custom, interactive search filter elements, grouped together in one
-            * panel, section, tab, etc.
-            */
-            createFilterGroups: function(){
-
-              //If it was already created, then exit
-              if( this.filterGroupsView ){
-                return;
-              }
-
-              //Start an array for the FilterGroups and the individual Filter models
-              var filterGroups = [],
-                  allFilters   = [];
-
-              //Iterate over each default FilterGroup in the app config and create a FilterGroup model
-              _.each( MetacatUI.appModel.get("defaultFilterGroups"), function(filterGroupJSON){
-
-                //Create the FilterGroup model
-                var filterGroup = new FilterGroup(filterGroupJSON);
-
-                //Add to the array
-                filterGroups.push(filterGroup);
-
-                //Add the Filters to the array
-                allFilters = _.union(allFilters, filterGroup.get("filters").models);
-
-              }, this);
-
-              //Add the filters to the Search model
-              this.searchModel.get("filters").add(allFilters);
-
-              //Create a FilterGroupsView
-              var filterGroupsView = new FilterGroupsView({
-                filterGroups: filterGroups,
-                filters: this.searchModel.get("filters"),
-                vertical: true,
-                parentView: this,
-                editorView: this.editorView
-              });
-
-              //Add the FilterGroupsView element to this view
-              this.$(this.filterGroupsContainer).html(filterGroupsView.el);
-
-              //Render the FilterGroupsView
-              filterGroupsView.render();
-
-              //Save a reference to the FilterGroupsView
-              this.filterGroupsView = filterGroupsView;
-
-            },
-
-            /*
-             * Get Results from the Solr index by combining the Filter query string fragments
-             * in each Filter instance in the Search collection and querying Solr.
-             *
-             * Overrides DataCatalogView.getResults().
-             */
-            getResults: function() {
-                var sortOrder = this.searchModel.get("sortOrder");
-                var query; // The full query string
-                var geohashLevel; // The geohash level to search
-                var page; // The page of search results to render
-                var position; // The geohash level position in the facet array
-
-                // Get the Solr query string from the Search filter collection
-                query = this.searchModel.get("filters").getQuery();
-
-                //If the query hasn't changed since the last query that was sent, don't do anything.
-                //This function may have been triggered by a change event on a filter that doesn't
-                //affect the query at all
-                if( query == this.searchResults.getLastQuery()){
-                  return;
-                }
-
-                if ( sortOrder ) {
-                    this.searchResults.setSort(sortOrder);
-                }
-
-                //Specify which fields to retrieve
-                var fields = ["id",
-                              "seriesId",
-                              "title",
-                              "origin",
-                              "pubDate",
-                              "dateUploaded",
-                              "abstract",
-                              "resourceMap",
-                              "beginDate",
-                              "endDate",
-                              "read_count_i",
-                              "geohash_9",
-                              "datasource",
-                              "isPublic",
-                              "project",
-                              "documents",
-                              "label",
-                              "logo",
-                              "formatId"];
-                // Add spatial fields if the map is present
-                if ( gmaps ) {
-                    fields.push("northBoundCoord", "southBoundCoord", "eastBoundCoord", "westBoundCoord");
-                }
-                //Set the field list on the SolrResults collection as a comma-separated string
-                this.searchResults.setfields(fields.join(","));
-
-                // Specify which geohash level is used to return tile counts
-                if ( gmaps && this.map ) {
-                    geohashLevel = "geohash_" +
-                        this.mapModel.determineGeohashLevel(this.map.zoom);
-                    // Does it already exist as a facet field?
-                    position = this.searchResults.facet.indexOf(geohashLevel);
-                    if ( position == -1) {
-                        this.searchResults.facet.push(geohashLevel);
-                    }
-                }
-
-                // Set the query on the SolrResults collection
-                this.searchResults.setQuery(query);
-
-                // Get the page number
-                if ( this.isSubView ) {
-                    page = 0;
-                } else {
-                    page = MetacatUI.appModel.get("page");
-                    if ( page == null ) {
-                        page = 0;
-                    }
-                }
-                this.searchResults.start = page * this.searchResults.rows;
-
-                // go to the page, which triggers a search
-                this.showPage(page);
-
-                // don't want to follow links
-                return false;
-            },
-
-            /**
-             * Toggle the map filter to include or exclude it from the Solr query
-             */
-            toggleMapFilter: function(event) {
-                var toggleInput = this.$("input" + this.mapFilterToggle);
-                if ((typeof toggleInput === "undefined") || !toggleInput) return;
-
-                var isOn = $(toggleInput).prop("checked");
-
-                // If the user clicked on the label, then change the checkbox for them
-                if (event && event.target.tagName != "INPUT") {
-                    isOn = !isOn;
-                    toggleInput.prop("checked", isOn);
-                }
-
-                var spatialFilter = _.findWhere(this.searchModel.get("filters").models, {type: "SpatialFilter"});
-
-                if (isOn) {
-                    this.searchModel.set("useGeohash", true);
-
-                    if( this.filterGroupsView && spatialFilter ){
-
-                      this.filterGroupsView.addCustomAppliedFilter(spatialFilter);
-
-                    }
-
-                } else {
-                    this.searchModel.set("useGeohash", false);
-                    // Remove the spatial filter from the collection
-                    this.searchModel.get("filters").remove(spatialFilter);
-
-                    if( this.filterGroupsView && spatialFilter ){
-                      this.filterGroupsView.removeCustomAppliedFilter(spatialFilter);
-                    }
-                }
-
-                // Tell the map to trigger a new search and redraw tiles
-                this.allowSearch = true;
-                google.maps.event.trigger(this.mapModel.get("map"), "idle");
-
-                // Send this event to Google Analytics
-                if (MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")) {
-                    var action = isOn ? "on" : "off";
-                    ga("send", "event", "map", action);
-                }
-            },
-
-            /**
-             * Overload this function with an empty function since the Clear button
-             * has been moved to the FilterGroupsView
-             */
-            toggleClearButton: function(){},
-
-            /**
-             * Overload this function with an empty function since the Clear button
-             * has been moved to the FilterGroupsView
-             */
-            hideClearButton: function(){},
-
-            /**
-             * Overload this function with an empty function since the Clear button
-             * has been moved to the FilterGroupsView
-             */
-            showClearButton: function(){},
-
-
-            /**
-             * Toggle between map and list mode
-             *
-             * @param(Event)  the event passed by clicking the toggle-map class button
-             */
-            toggleMapMode: function(event) {
-
-                // Block the event from bubbling
-                if (typeof event === "object") {
-                    event.preventDefault();
-                }
-
-                if (gmaps) {
-                    $(".mapMode").toggleClass("mapMode");
-                }
-
-                // Toggle the mode
-                if (this.mode == "map") {
-                    MetacatUI.appModel.set("searchMode", "list");
-                    this.mode = "list";
-                    this.$("#map-canvas").detach();
-                    this.setAutoHeight();
-                    this.getResults();
-                } else if (this.mode == "list") {
-                    MetacatUI.appModel.set("searchMode", "map");
-                    this.mode = "map";
-                    this.renderMap();
-                    this.setAutoHeight();
-                    this.getResults();
-                }
-            },
-
-            /**
-             * Reset the map to the defaults
-             */
-            resetMap: function() {
-
-                // The spatial models registered in the filters collection
-                var spatialModels;
-
-                if (!gmaps) {
-                    return;
-                }
-
-                // Remove the SpatialFilter from the collection silently
-                // so we don't immediately trigger a new search
-                spatialModels =
-                    _.where(this.searchModel.get("filters").models, {type: "SpatialFilter"});
-                this.searchModel.get("filters").remove(spatialModels, {"silent": true});
-
-                // Reset the map options to defaults
-                this.mapModel.set("mapOptions", this.mapModel.defaults().mapOptions);
-                this.allowSearch = false;
-            },
-
-            /**
-             * Render the map based on the mapModel properties and search results
-             */
-            renderMap: function() {
-
-                // If gmaps isn't enabled or loaded with an error, use list mode
-                if (!gmaps || this.mode == "list") {
-                    this.ready = true;
-                    this.mode = "list";
-                    return;
-                }
-
-                // The spatial filter instance used to constrain the search by zoom and extent
-                var spatialFilter;
-
-                // The map's configuration
-                var mapOptions;
-
-                // The map extent
-                var boundingBox;
-
-                // The map bounding coordinates
-                var north;
-                var west;
-                var south;
-                var east;
-
-                // The map zoom level
-                var zoom;
-
-                // The map geohash precision based on the zoom level
-                var precision;
-
-                // The geohash boxes associated with the map extent and zoom
-                var geohashBBoxes;
-
-                // References to the map and catalog view instances for callbacks
-                var mapRef;
-                var viewRef;
-
-                if (this.isSubView) {
-                    this.$el.addClass("mapMode");
-                } else {
-                    $("body").addClass("mapMode");
-                }
-
-                // Get the map options and create the map
-                gmaps.visualRefresh = true;
-                mapOptions = this.mapModel.get("mapOptions");
-                var defaultZoom = mapOptions.zoom;
-                $("#map-container").append("<div id='map-canvas'></div>");
-                this.map = new gmaps.Map($("#map-canvas")[0], mapOptions);
-                this.mapModel.set("map", this.map);
-                this.hasZoomed  = false;
-                this.hasDragged = false;
-
-                // Hide the map filter toggle element
-                this.$(this.mapFilterToggle).hide();
-
-                // Get the existing spatial filter if it exists
-                if (this.searchModel.get("filters") &&
-                    this.searchModel.get("filters")
-                        .where({type: "SpatialFilter"}).length > 0) {
-                    spatialFilter = this.searchModel.get("filters")
-                        .where({type: "SpatialFilter"})[0];
-                } else {
-                    spatialFilter = new SpatialFilter();
-                }
-
-                // Store references
-                mapRef = this.map;
-                viewRef = this;
-
-                // Listen to idle events on the map (at rest), and render content as needed
-                google.maps.event.addListener(mapRef, "idle", function() {
-                  // Remove all markers from the map
-                  for (var i = 0; i < viewRef.resultMarkers.length; i++) {
-                      viewRef.resultMarkers[i].setMap(null);
-                  }
-                  viewRef.resultMarkers = new Array();
-
-                  //Check if the user has interacted with the map just now, and if so, we
-                  // want to alter the geohash filter (changing the geohash values or resetting it completely)
-                  var alterGeohashFilter = viewRef.allowSearch || viewRef.hasZoomed || viewRef.hasDragged;
-                  if( !alterGeohashFilter ){
-                    return;
-                  }
-
-                  //Determine if the map needs to be recentered. The map only needs to be
-                  // recentered if it is not at the default lat,long center point AND it
-                  // is not zoomed in or dragged to a new center point
-                  var setGeohashFilter = viewRef.hasZoomed && viewRef.isMapFilterEnabled();
-
-                  //If we are using the geohash filter defined by this map, then
-                  // apply the filter and trigger a new search
-                  if( setGeohashFilter ){
-                    // Get the Google map bounding box
-                    boundingBox = mapRef.getBounds();
-
-                    // Set the search model's spatial filter properties
-                    // Encode the Google Map bounding box into geohash
-                    if ( typeof boundingBox !== "undefined") {
-                        north = boundingBox.getNorthEast().lat();
-                        west = boundingBox.getSouthWest().lng();
-                        south = boundingBox.getSouthWest().lat();
-                        east = boundingBox.getNorthEast().lng();
-                    }
-
-                    // Save the center position and zoom level of the map
-                    viewRef.mapModel.get("mapOptions").center = mapRef.getCenter();
-                    viewRef.mapModel.get("mapOptions").zoom = mapRef.getZoom();
-
-                    // Determine the precision of geohashes to search for
-                    zoom = mapRef.getZoom();
+            
define([
+  "jquery",
+  "underscore",
+  "backbone",
+  "gmaps",
+  "collections/Filters",
+  "collections/SolrResults",
+  "models/filters/FilterGroup",
+  "models/filters/SpatialFilter",
+  "models/Stats",
+  "views/DataCatalogView",
+  "views/filters/FilterGroupsView",
+  "text!templates/dataCatalog.html",
+  "nGeohash",
+], function (
+  $,
+  _,
+  Backbone,
+  gmaps,
+  Filters,
+  SearchResults,
+  FilterGroup,
+  SpatialFilter,
+  Stats,
+  DataCatalogView,
+  FilterGroupsView,
+  template,
+  nGeohash
+) {
+  /**
+   * @class DataCatalogViewWithFilters
+   * @classdesc A DataCatalogView that uses the Search collection and the Filter
+   * models for managing queries rather than the Search model and the filter
+   * literal objects used in the parent DataCatalogView.  This accommodates
+   * custom portal filters. This view is deprecated and will eventually be
+   * removed in a future version (likely 3.0.0)
+   * @classcategory Views
+   * @extends DataCatalogView
+   * @constructor
+   * @deprecated
+   */
+  var DataCatalogViewWithFilters = DataCatalogView.extend(
+    /** @lends DataCatalogViewWithFilters.prototype */ {
+      el: null,
+
+      /**
+       * The HTML tag name for this view element
+       * @type {string}
+       */
+      tagName: "div",
+
+      /**
+       * The HTML class names for this view element
+       * @type {string}
+       */
+      className: "data-catalog",
+
+      /**
+       * The primary HTML template for this view
+       * @type {Underscore.template}
+       */
+      template: _.template(template),
+
+      /**
+       * A reference to the PortalEditorView
+       * @type {PortalEditorView}
+       */
+      editorView: undefined,
+
+      /**
+       * The sort order for the Solr query
+       * @type {string}
+       */
+      sortOrder: "dateUploaded+desc",
+
+      /**
+       * The jQuery selector for the FilterGroupsView container
+       * @type {string}
+       */
+      filterGroupsContainer: ".filter-groups-container",
+
+      /**
+       * The Search model to use for creating and storing Filters and
+       * constructing 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 (Search)
+       */
+      searchModel: undefined,
+
+      /**
+       * Override DataCatalogView.render() to render this view with filters from
+       * the Filters collection
+       */
+      render: function () {
+        var loadingHTML;
+        var templateVars;
+        var compiledEl;
+        var tooltips;
+        var groupedTooltips;
+        var forFilterLabel = true;
+        var forOtherElements = false;
+        // TODO: Do we really need to cache the filters collection? Reconcile
+        // this from DataCatalogView.render() See
+        // https://github.com/NCEAS/metacatui/blob/19d608df9cc17ac2abee76d35feca415137c09d7/src/js/views/DataCatalogView.js#L122-L145
+
+        // Get the search mode - either "map" or "list"
+        if (typeof this.mode === "undefined" || !this.mode) {
+          this.mode = MetacatUI.appModel.get("searchMode");
+          if (typeof this.mode === "undefined" || !this.mode) {
+            this.mode = "map";
+          }
+          MetacatUI.appModel.set("searchMode", this.mode);
+        }
+
+        if (!this.statsModel) {
+          this.statsModel = new Stats();
+        }
+
+        if (!this.searchResults) {
+          this.searchResults = new SearchResults();
+        }
+
+        // Use map mode on tablets and browsers only
+        if ($(window).outerWidth() <= 600) {
+          this.mode = "list";
+          MetacatUI.appModel.set("searchMode", "list");
+          gmaps = null;
+        }
+
+        // If this is a subview, don't set the headerType
+        if (!this.isSubView) {
+          MetacatUI.appModel.set("headerType", "default");
+          $("body").addClass("DataCatalog");
+        } else {
+          this.$el.addClass("DataCatalog");
+        }
+        // Populate the search template with some model attributes
+        loadingHTML = this.loadingTemplate({
+          msg: "Loading entries ...",
+        });
 
-                    precision = viewRef.mapModel.getSearchPrecision(zoom);
+        templateVars = {
+          gmaps: gmaps,
+          mode: MetacatUI.appModel.get("searchMode"),
+          useMapBounds: this.searchModel.get("useGeohash"),
+          username: MetacatUI.appUserModel.get("username"),
+          isMySearch:
+            _.indexOf(
+              this.searchModel.get("username"),
+              MetacatUI.appUserModel.get("username")
+            ) > -1,
+          loading: loadingHTML,
+          searchModelRef: this.searchModel,
+          searchResultsRef: this.searchResults,
+          dataSourceTitle:
+            MetacatUI.theme == "dataone" ? "Member Node" : "Data source",
+        };
+        compiledEl = this.template(
+          _.extend(this.searchModel.toJSON(), templateVars)
+        );
+        this.$el.html(compiledEl);
+
+        // Create and render the FilterGroupsView
+        this.createFilterGroups();
+
+        // Store some references to key views that we use repeatedly
+        this.$resultsview = this.$("#results-view");
+        this.$results = this.$("#results");
+
+        // Update stats
+        this.updateStats();
+
+        // Render the Google Map
+        this.renderMap();
+        // Initialize the tooltips
+        tooltips = $(".tooltip-this");
+
+        // Find the tooltips that are on filter labels - add a slight delay to
+        // those
+        groupedTooltips = _.groupBy(tooltips, function (t) {
+          return (
+            ($(t).prop("tagName") == "LABEL" ||
+              $(t).parent().prop("tagName") == "LABEL") &&
+            $(t).parents(".filter-container").length > 0
+          );
+        });
 
-                    // Get all the geohash tiles contained in the map bounds
-                    if ( south && west && north && east && precision )  {
-                        geohashBBoxes = nGeohash.bboxes(south, west, north, east, precision);
-                    }
+        $(groupedTooltips[forFilterLabel]).tooltip({
+          delay: {
+            show: "800",
+          },
+        });
+        $(groupedTooltips[forOtherElements]).tooltip();
 
-                    // Save our geohash search settings
-                    spatialFilter.set({
-                        "geohashes": geohashBBoxes,
-                        "geohashLevel": precision,
-                        "north": north,
-                        "west": west,
-                        "south": south,
-                        "east": east,
-                    });
+        // Initialize all popover elements
+        $(".popover-this").popover();
 
-                    // Add the spatial filter to the filters collection if enabled
-                    if ( viewRef.searchModel.get("useGeohash") ) {
+        // Initialize the resizeable content div
+        $("#content").resizable({
+          handles: "n,s,e,w",
+        });
 
-                        viewRef.searchModel.get("filters").add(spatialFilter);
+        // Register listeners; this is done here in render because the HTML
+        // needs to be bound before the listenTo call can be made
+        this.stopListening(this.searchResults);
+        this.stopListening(this.searchModel);
+        this.stopListening(MetacatUI.appModel);
+        this.listenTo(this.searchResults, "reset", this.cacheSearch);
+        this.listenTo(this.searchResults, "add", this.addOne);
+        this.listenTo(this.searchResults, "reset", this.addAll);
+        this.listenTo(this.searchResults, "reset", this.checkForProv);
+        this.listenTo(this.searchResults, "error", this.showError);
+
+        // Listen to changes in the Search model Filters to trigger a search
+        this.stopListening(
+          this.searchModel.get("filters"),
+          "add remove update reset change"
+        );
+        this.listenTo(
+          this.searchModel.get("filters"),
+          "add remove update reset change",
+          this.triggerSearch
+        );
+
+        // Listen to the MetacatUI.appModel for the search trigger
+        this.listenTo(MetacatUI.appModel, "search", this.getResults);
+
+        this.listenTo(
+          MetacatUI.appUserModel,
+          "change:loggedIn",
+          this.triggerSearch
+        );
+
+        // and go to a certain page if we have it
+        this.getResults();
+
+        // Set a custom height on any elements that have the .auto-height class
+        if ($(".auto-height").length > 0 && !this.fixedHeight) {
+          // Readjust the height whenever the window is resized
+          $(window).resize(this.setAutoHeight);
+          $(".auto-height-member").resize(this.setAutoHeight);
+        }
+
+        this.addAnnotationFilter();
+
+        return this;
+      },
+
+      /**
+       * Creates UI Filter Groups and renders them in this view. UI Filter
+       * Groups are custom, interactive search filter elements, grouped together
+       * in one panel, section, tab, etc.
+       */
+      createFilterGroups: function () {
+        // If it was already created, then exit
+        if (this.filterGroupsView) {
+          return;
+        }
+
+        // Start an array for the FilterGroups and the individual Filter models
+        var filterGroups = [],
+          allFilters = [];
+
+        // Iterate over each default FilterGroup in the app config and create a
+        // FilterGroup model
+        _.each(
+          MetacatUI.appModel.get("defaultFilterGroups"),
+          function (filterGroupJSON) {
+            // Create the FilterGroup model
+            var filterGroup = new FilterGroup(filterGroupJSON);
+
+            // Add to the array
+            filterGroups.push(filterGroup);
+
+            // Add the Filters to the array
+            allFilters = _.union(allFilters, filterGroup.get("filters").models);
+          },
+          this
+        );
+
+        // Add the filters to the Search model
+        this.searchModel.get("filters").add(allFilters);
+
+        // Create a FilterGroupsView
+        var filterGroupsView = new FilterGroupsView({
+          filterGroups: filterGroups,
+          filters: this.searchModel.get("filters"),
+          vertical: true,
+          parentView: this,
+          editorView: this.editorView,
+        });
 
-                        if( viewRef.filterGroupsView && spatialFilter ){
-                          viewRef.filterGroupsView.addCustomAppliedFilter(spatialFilter);
+        // Add the FilterGroupsView element to this view
+        this.$(this.filterGroupsContainer).html(filterGroupsView.el);
+
+        // Render the FilterGroupsView
+        filterGroupsView.render();
+
+        // Save a reference to the FilterGroupsView
+        this.filterGroupsView = filterGroupsView;
+      },
+
+      /*
+       * Get Results from the Solr index by combining the Filter query string
+       * fragments in each Filter instance in the Search collection and querying
+       * Solr.
+       *
+       * Overrides DataCatalogView.getResults().
+       */
+      getResults: function () {
+        var sortOrder = this.searchModel.get("sortOrder");
+        var query; // The full query string
+        var geohashLevel; // The geohash level to search
+        var page; // The page of search results to render
+        var position; // The geohash level position in the facet array
+
+        // Get the Solr query string from the Search filter collection
+        query = this.searchModel.get("filters").getQuery();
+
+        // If the query hasn't changed since the last query that was sent, don't
+        // do anything. This function may have been triggered by a change event
+        // on a filter that doesn't affect the query at all
+        if (query == this.searchResults.getLastQuery()) {
+          return;
+        }
+
+        if (sortOrder) {
+          this.searchResults.setSort(sortOrder);
+        }
+
+        // Specify which fields to retrieve
+        var fields = [
+          "id",
+          "seriesId",
+          "title",
+          "origin",
+          "pubDate",
+          "dateUploaded",
+          "abstract",
+          "resourceMap",
+          "beginDate",
+          "endDate",
+          "read_count_i",
+          "geohash_9",
+          "datasource",
+          "isPublic",
+          "project",
+          "documents",
+          "label",
+          "logo",
+          "formatId",
+        ];
+        // Add spatial fields if the map is present
+        if (gmaps) {
+          fields.push(
+            "northBoundCoord",
+            "southBoundCoord",
+            "eastBoundCoord",
+            "westBoundCoord"
+          );
+        }
+        // Set the field list on the SolrResults collection as a comma-separated
+        // string
+        this.searchResults.setfields(fields.join(","));
+
+        // Specify which geohash level is used to return tile counts
+        if (gmaps && this.map) {
+          geohashLevel =
+            "geohash_" + this.mapModel.determineGeohashLevel(this.map.zoom);
+          // Does it already exist as a facet field?
+          position = this.searchResults.facet.indexOf(geohashLevel);
+          if (position == -1) {
+            this.searchResults.facet.push(geohashLevel);
+          }
+        }
+
+        // Set the query on the SolrResults collection
+        this.searchResults.setQuery(query);
+
+        // Get the page number
+        if (this.isSubView) {
+          page = 0;
+        } else {
+          page = MetacatUI.appModel.get("page");
+          if (page == null) {
+            page = 0;
+          }
+        }
+        this.searchResults.start = page * this.searchResults.rows;
+
+        // go to the page, which triggers a search
+        this.showPage(page);
+
+        // don't want to follow links
+        return false;
+      },
+
+      /**
+       * Toggle the map filter to include or exclude it from the Solr query
+       */
+      toggleMapFilter: function (event) {
+        var toggleInput = this.$("input" + this.mapFilterToggle);
+        if (typeof toggleInput === "undefined" || !toggleInput) return;
+
+        var isOn = $(toggleInput).prop("checked");
+
+        // If the user clicked on the label, then change the checkbox for them
+        if (event && event.target.tagName != "INPUT") {
+          isOn = !isOn;
+          toggleInput.prop("checked", isOn);
+        }
+
+        var spatialFilter = _.findWhere(
+          this.searchModel.get("filters").models,
+          { type: "SpatialFilter" }
+        );
+
+        if (isOn) {
+          this.searchModel.set("useGeohash", true);
+
+          if (this.filterGroupsView && spatialFilter) {
+            this.filterGroupsView.addCustomAppliedFilter(spatialFilter);
+          }
+        } else {
+          this.searchModel.set("useGeohash", false);
+          // Remove the spatial filter from the collection
+          this.searchModel.get("filters").remove(spatialFilter);
+
+          if (this.filterGroupsView && spatialFilter) {
+            this.filterGroupsView.removeCustomAppliedFilter(spatialFilter);
+          }
+        }
+
+        // Tell the map to trigger a new search and redraw tiles
+        this.allowSearch = true;
+        google.maps.event.trigger(this.mapModel.get("map"), "idle");
+
+        // Track this event
+        MetacatUI.analytics?.trackEvent("map", (isOn ? "on" : "off"));
+      },
+
+      /**
+       * Overload this function with an empty function since the Clear button
+       * has been moved to the FilterGroupsView
+       */
+      toggleClearButton: function () {},
+
+      /**
+       * Overload this function with an empty function since the Clear button
+       * has been moved to the FilterGroupsView
+       */
+      hideClearButton: function () {},
+
+      /**
+       * Overload this function with an empty function since the Clear button
+       * has been moved to the FilterGroupsView
+       */
+      showClearButton: function () {},
+
+      /**
+       * Toggle between map and list mode
+       *
+       * @param(Event)  the event passed by clicking the toggle-map class button
+       */
+      toggleMapMode: function (event) {
+        // Block the event from bubbling
+        if (typeof event === "object") {
+          event.preventDefault();
+        }
+
+        if (gmaps) {
+          $(".mapMode").toggleClass("mapMode");
+        }
+
+        // Toggle the mode
+        if (this.mode == "map") {
+          MetacatUI.appModel.set("searchMode", "list");
+          this.mode = "list";
+          this.$("#map-canvas").detach();
+          this.setAutoHeight();
+          this.getResults();
+        } else if (this.mode == "list") {
+          MetacatUI.appModel.set("searchMode", "map");
+          this.mode = "map";
+          this.renderMap();
+          this.setAutoHeight();
+          this.getResults();
+        }
+      },
+
+      /**
+       * Reset the map to the defaults
+       */
+      resetMap: function () {
+        // The spatial models registered in the filters collection
+        var spatialModels;
+
+        if (!gmaps) {
+          return;
+        }
+
+        // Remove the SpatialFilter from the collection silently so we don't
+        // immediately trigger a new search
+        spatialModels = _.where(this.searchModel.get("filters").models, {
+          type: "SpatialFilter",
+        });
+        this.searchModel.get("filters").remove(spatialModels, { silent: true });
+
+        // Reset the map options to defaults
+        this.mapModel.set("mapOptions", this.mapModel.defaults().mapOptions);
+        this.allowSearch = false;
+      },
+
+      /**
+       * Render the map based on the mapModel properties and search results
+       */
+      renderMap: function () {
+        // If gmaps isn't enabled or loaded with an error, use list mode
+        if (!gmaps || this.mode == "list") {
+          this.ready = true;
+          this.mode = "list";
+          return;
+        }
+
+        // The spatial filter instance used to constrain the search by zoom and
+        // extent
+        var spatialFilter;
+
+        // The map's configuration
+        var mapOptions;
+
+        // The map extent
+        var boundingBox;
+
+        // The map bounding coordinates
+        var north;
+        var west;
+        var south;
+        var east;
+
+        // The map zoom level
+        var zoom;
+
+        // The map geohash precision based on the zoom level
+        var precision;
+
+        // The geohash boxes associated with the map extent and zoom
+        var geohashBBoxes;
+
+        // References to the map and catalog view instances for callbacks
+        var mapRef;
+        var viewRef;
+
+        if (this.isSubView) {
+          this.$el.addClass("mapMode");
+        } else {
+          $("body").addClass("mapMode");
+        }
+
+        // Get the map options and create the map
+        gmaps.visualRefresh = true;
+        mapOptions = this.mapModel.get("mapOptions");
+        var defaultZoom = mapOptions.zoom;
+        $("#map-container").append("<div id='map-canvas'></div>");
+        this.map = new gmaps.Map($("#map-canvas")[0], mapOptions);
+        this.mapModel.set("map", this.map);
+        this.hasZoomed = false;
+        this.hasDragged = false;
+
+        // Hide the map filter toggle element
+        this.$(this.mapFilterToggle).hide();
+
+        // Get the existing spatial filter if it exists
+        if (
+          this.searchModel.get("filters") &&
+          this.searchModel.get("filters").where({ type: "SpatialFilter" })
+            .length > 0
+        ) {
+          spatialFilter = this.searchModel
+            .get("filters")
+            .where({ type: "SpatialFilter" })[0];
+        } else {
+          spatialFilter = new SpatialFilter();
+        }
+
+        // Store references
+        mapRef = this.map;
+        viewRef = this;
+
+        // Listen to idle events on the map (at rest), and render content as
+        // needed
+        google.maps.event.addListener(mapRef, "idle", function () {
+          // Remove all markers from the map
+          for (var i = 0; i < viewRef.resultMarkers.length; i++) {
+            viewRef.resultMarkers[i].setMap(null);
+          }
+          viewRef.resultMarkers = new Array();
+
+          // Check if the user has interacted with the map just now, and if so,
+          // we want to alter the geohash filter (changing the geohash values or
+          // resetting it completely)
+          var alterGeohashFilter =
+            viewRef.allowSearch || viewRef.hasZoomed || viewRef.hasDragged;
+          if (!alterGeohashFilter) {
+            return;
+          }
+
+          // Determine if the map needs to be recentered. The map only needs to
+          // be recentered if it is not at the default lat,long center point AND
+          // it is not zoomed in or dragged to a new center point
+          var setGeohashFilter =
+            viewRef.hasZoomed && viewRef.isMapFilterEnabled();
+
+          // If we are using the geohash filter defined by this map, then apply
+          // the filter and trigger a new search
+          if (setGeohashFilter) {
+            // Get the Google map bounding box
+            boundingBox = mapRef.getBounds();
+
+            // Set the search model's spatial filter properties Encode the
+            // Google Map bounding box into geohash
+            if (typeof boundingBox !== "undefined") {
+              north = boundingBox.getNorthEast().lat();
+              west = boundingBox.getSouthWest().lng();
+              south = boundingBox.getSouthWest().lat();
+              east = boundingBox.getNorthEast().lng();
+            }
 
-                          //When the custom spatial filter is removed in the UI, toggle the map filter
-                          viewRef.listenTo( viewRef.filterGroupsView, "customAppliedFilterRemoved", function(removedFilter){
+            // Save the center position and zoom level of the map
+            viewRef.mapModel.get("mapOptions").center = mapRef.getCenter();
+            viewRef.mapModel.get("mapOptions").zoom = mapRef.getZoom();
 
-                              if( removedFilter.type == "SpatialFilter" ){
+            // Determine the precision of geohashes to search for
+            zoom = mapRef.getZoom();
 
-                                //Uncheck the map filter on the map itself
-                                viewRef.$(".toggle-map-filter").prop("checked", false);
-                                viewRef.toggleMapFilter();
+            precision = viewRef.mapModel.getSearchPrecision(zoom);
 
-                              }
+            // Get all the geohash tiles contained in the map bounds
+            if (south && west && north && east && precision) {
+              geohashBBoxes = nGeohash.bboxes(
+                south,
+                west,
+                north,
+                east,
+                precision
+              );
+            }
 
-                          });
-                        }
+            // Save our geohash search settings
+            spatialFilter.set({
+              geohashes: geohashBBoxes,
+              geohashLevel: precision,
+              north: north,
+              west: west,
+              south: south,
+              east: east,
+            });
+
+            // Add the spatial filter to the filters collection if enabled
+            if (viewRef.searchModel.get("useGeohash")) {
+              viewRef.searchModel.get("filters").add(spatialFilter);
+
+              if (viewRef.filterGroupsView && spatialFilter) {
+                viewRef.filterGroupsView.addCustomAppliedFilter(spatialFilter);
+
+                // When the custom spatial filter is removed in the UI, toggle
+                // the map filter
+                viewRef.listenTo(
+                  viewRef.filterGroupsView,
+                  "customAppliedFilterRemoved",
+                  function (removedFilter) {
+                    if (removedFilter.type == "SpatialFilter") {
+                      // Uncheck the map filter on the map itself
+                      viewRef.$(".toggle-map-filter").prop("checked", false);
+                      viewRef.toggleMapFilter();
                     }
                   }
-                  else{
-
-                    //Reset the map filter
-                    viewRef.resetMap();
-
-                    //Start back at page 0
-                    MetacatUI.appModel.set("page", 0);
+                );
+              }
+            }
+          } else {
+            // Reset the map filter
+            viewRef.resetMap();
 
-                    //Mark the view as ready to start a search
-                    viewRef.ready = true;
+            // Start back at page 0
+            MetacatUI.appModel.set("page", 0);
 
-                    // Trigger a new search
-                    viewRef.triggerSearch();
+            // Mark the view as ready to start a search
+            viewRef.ready = true;
 
-                    viewRef.allowSearch = false;
+            // Trigger a new search
+            viewRef.triggerSearch();
 
-                    return;
-                  }
+            viewRef.allowSearch = false;
 
-                });
+            return;
+          }
+        });
 
-                google.maps.event.addListener(mapRef, "zoom_changed", function() {
-                  // If the map is zoomed in further than the default zoom level,
-                  // than we want to mark the map as zoomed in
-                  if(viewRef.map.getZoom() > defaultZoom){
-                    viewRef.hasZoomed = true;
-                  }
-                  //If we are at the default zoom level or higher, than do not mark the map
-                  // as zoomed in
-                  else{
-                    viewRef.hasZoomed = false;
-                  }
-                });
+        google.maps.event.addListener(mapRef, "zoom_changed", function () {
+          // If the map is zoomed in further than the default zoom level, than
+          // we want to mark the map as zoomed in
+          if (viewRef.map.getZoom() > defaultZoom) {
+            viewRef.hasZoomed = true;
+          }
+          // If we are at the default zoom level or higher, than do not mark the
+          // map as zoomed in
+          else {
+            viewRef.hasZoomed = false;
+          }
+        });
 
-                google.maps.event.addListener(mapRef, "dragend", function() {
-                  viewRef.hasDragged = true;
-                });
-            }
+        google.maps.event.addListener(mapRef, "dragend", function () {
+          viewRef.hasDragged = true;
         });
-        return DataCatalogViewWithFilters;
-    });
+      },
+    }
+  );
+  return DataCatalogViewWithFilters;
+});
 
diff --git a/docs/docs/src_js_views_DataItemView.js.html b/docs/docs/src_js_views_DataItemView.js.html index 3106b4740..19f62d742 100644 --- a/docs/docs/src_js_views_DataItemView.js.html +++ b/docs/docs/src_js_views_DataItemView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_DataPackageView.js.html b/docs/docs/src_js_views_DataPackageView.js.html index eef5e85af..3ad9f862e 100644 --- a/docs/docs/src_js_views_DataPackageView.js.html +++ b/docs/docs/src_js_views_DataPackageView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_DraftsView.js.html b/docs/docs/src_js_views_DraftsView.js.html index 4d0bde5d5..fd3386635 100644 --- a/docs/docs/src_js_views_DraftsView.js.html +++ b/docs/docs/src_js_views_DraftsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_EditCollectionView.js.html b/docs/docs/src_js_views_EditCollectionView.js.html index 7b52165ce..22f6fdd52 100644 --- a/docs/docs/src_js_views_EditCollectionView.js.html +++ b/docs/docs/src_js_views_EditCollectionView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_EditorView.js.html b/docs/docs/src_js_views_EditorView.js.html index 902de5696..6b4dc7bfd 100644 --- a/docs/docs/src_js_views_EditorView.js.html +++ b/docs/docs/src_js_views_EditorView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_FooterView.js.html b/docs/docs/src_js_views_FooterView.js.html index 3cffcdd92..36fc76bda 100644 --- a/docs/docs/src_js_views_FooterView.js.html +++ b/docs/docs/src_js_views_FooterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_GroupListView.js.html b/docs/docs/src_js_views_GroupListView.js.html index 9c434fd07..5748dc89f 100644 --- a/docs/docs/src_js_views_GroupListView.js.html +++ b/docs/docs/src_js_views_GroupListView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_ImageUploaderView.js.html b/docs/docs/src_js_views_ImageUploaderView.js.html index 9d6f37c51..d297dcf78 100644 --- a/docs/docs/src_js_views_ImageUploaderView.js.html +++ b/docs/docs/src_js_views_ImageUploaderView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_MarkdownEditorView.js.html b/docs/docs/src_js_views_MarkdownEditorView.js.html index c9eaccde3..470de5810 100644 --- a/docs/docs/src_js_views_MarkdownEditorView.js.html +++ b/docs/docs/src_js_views_MarkdownEditorView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_MarkdownView.js.html b/docs/docs/src_js_views_MarkdownView.js.html index 4c79eb2a4..2220aef7c 100644 --- a/docs/docs/src_js_views_MarkdownView.js.html +++ b/docs/docs/src_js_views_MarkdownView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_MdqRunView.js.html b/docs/docs/src_js_views_MdqRunView.js.html index d1fed7e33..169dd0d04 100644 --- a/docs/docs/src_js_views_MdqRunView.js.html +++ b/docs/docs/src_js_views_MdqRunView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_MetadataView.js.html b/docs/docs/src_js_views_MetadataView.js.html index 8a31c866a..0cef8ba40 100644 --- a/docs/docs/src_js_views_MetadataView.js.html +++ b/docs/docs/src_js_views_MetadataView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -2563,7 +2563,7 @@

Source: src/js/views/MetadataView.js

this.$loading = null; //Put the document title back to the default - MetacatUI.appModel.set("title", MetacatUI.appModel.defaults.title); + MetacatUI.appModel.resetTitle(); //Remove view-specific classes this.$el.removeClass("container no-stylesheet"); diff --git a/docs/docs/src_js_views_MetricModalView.js.html b/docs/docs/src_js_views_MetricModalView.js.html index 67c39cc85..f25b027bc 100644 --- a/docs/docs/src_js_views_MetricModalView.js.html +++ b/docs/docs/src_js_views_MetricModalView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_MetricView.js.html b/docs/docs/src_js_views_MetricView.js.html index 6dd8c8123..79bfb659e 100644 --- a/docs/docs/src_js_views_MetricView.js.html +++ b/docs/docs/src_js_views_MetricView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -167,10 +167,8 @@

Source: src/js/views/MetricView.js

this.subviews = [modalView]; } - //Send this event to Google Analytics - if(MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")){ - ga("send", "event", "metrics", "Click metric", this.metricName); - } + //Track this event + MetacatUI.analytics?.trackEvent("metrics", "Click metric", this.metricName); } }, diff --git a/docs/docs/src_js_views_MetricsChartView.js.html b/docs/docs/src_js_views_MetricsChartView.js.html index f1eaf5b36..9b5fe1a7a 100644 --- a/docs/docs/src_js_views_MetricsChartView.js.html +++ b/docs/docs/src_js_views_MetricsChartView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_NavbarView.js.html b/docs/docs/src_js_views_NavbarView.js.html index e1dd766c3..849e8c1ef 100644 --- a/docs/docs/src_js_views_NavbarView.js.html +++ b/docs/docs/src_js_views_NavbarView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_RegisterCitationView.js.html b/docs/docs/src_js_views_RegisterCitationView.js.html index 90a8b42b9..809b47643 100644 --- a/docs/docs/src_js_views_RegisterCitationView.js.html +++ b/docs/docs/src_js_views_RegisterCitationView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_SignInView.js.html b/docs/docs/src_js_views_SignInView.js.html index f7f11839a..56e2e13a8 100644 --- a/docs/docs/src_js_views_SignInView.js.html +++ b/docs/docs/src_js_views_SignInView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_StatsView.js.html b/docs/docs/src_js_views_StatsView.js.html index d1ee9b95e..143b8d490 100644 --- a/docs/docs/src_js_views_StatsView.js.html +++ b/docs/docs/src_js_views_StatsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_TOCView.js.html b/docs/docs/src_js_views_TOCView.js.html index 640b09bfc..ecbd2debe 100644 --- a/docs/docs/src_js_views_TOCView.js.html +++ b/docs/docs/src_js_views_TOCView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_TableEditorView.js.html b/docs/docs/src_js_views_TableEditorView.js.html index 0b67e9a26..327d291c2 100644 --- a/docs/docs/src_js_views_TableEditorView.js.html +++ b/docs/docs/src_js_views_TableEditorView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_UserGroupView.js.html b/docs/docs/src_js_views_UserGroupView.js.html index cd74b09cc..f41c286a0 100644 --- a/docs/docs/src_js_views_UserGroupView.js.html +++ b/docs/docs/src_js_views_UserGroupView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_UserView.js.html b/docs/docs/src_js_views_UserView.js.html index 32e3afaf4..394823031 100644 --- a/docs/docs/src_js_views_UserView.js.html +++ b/docs/docs/src_js_views_UserView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_citations_CitationModalView.js.html b/docs/docs/src_js_views_citations_CitationModalView.js.html index f20bbb5d5..9998a18cf 100644 --- a/docs/docs/src_js_views_citations_CitationModalView.js.html +++ b/docs/docs/src_js_views_citations_CitationModalView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_filters_BooleanFilterView.js.html b/docs/docs/src_js_views_filters_BooleanFilterView.js.html index 661b73b66..cabe5488e 100644 --- a/docs/docs/src_js_views_filters_BooleanFilterView.js.html +++ b/docs/docs/src_js_views_filters_BooleanFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -45,82 +45,81 @@

Source: src/js/views/filters/BooleanFilterView.js

/*global define */
-define(['jquery', 'underscore', 'backbone',
-        'models/filters/BooleanFilter',
-        'views/filters/FilterView',
-        'text!templates/filters/booleanFilter.html'],
-  function($, _, Backbone, BooleanFilter, FilterView, Template) {
-  'use strict';
+define([
+  "jquery",
+  "underscore",
+  "backbone",
+  "models/filters/BooleanFilter",
+  "views/filters/FilterView",
+  "text!templates/filters/booleanFilter.html",
+], function ($, _, Backbone, BooleanFilter, FilterView, Template) {
+  "use strict";
 
   /**
-  * @class BooleanFilterView
-  * @classdesc Render a view of a single BooleanFilter model
-  * @classcategory Views/Filters
-  */
+   * @class BooleanFilterView
+   * @classdesc Render a view of a single BooleanFilter model
+   * @classcategory Views/Filters
+   */
   var BooleanFilterView = FilterView.extend(
-    /** @lends BooleanFilterView.prototype */{
-
-    /**
-    * A BooleanFilter model to be rendered in this view
-    * @type {BooleanFilter} */
-    model: null,
-
-    className: "filter boolean",
-
-    template: _.template(Template),
-
-    events: {
-      "click input[type='checkbox']" : "updateModel"
-    },
-
-    initialize: function (options) {
-
-      if( !options || typeof options != "object" ){
-        var options = {};
-      }
-
-      this.model = options.model || new BooleanFilter();
-
-    },
-
-    render: function () {
-      this.$el.html( this.template( this.model.toJSON() ) );
-
-      this.listenTo( this.model, "change:values", this.updateCheckbox );
-    },
-
-    /**
-    * Gets the value of the checkbox and updates the BooleanFilter model
-    */
-    updateModel: function(){
-
-      //Find out if the checkbox has been checked or not
-      var isChecked = this.$("input[type='checkbox']").prop("checked");
-
-      //Set the boolean value on the model
-      this.model.set("values", [isChecked]);
-
-    },
-
-    /**
-    * Updates the checked property of the checkbox based on the model value
-    */
-    updateCheckbox: function(){
-
-      //Get the value from the model
-      var modelValue = this.model.get("values")[0];
-
-      //If the model value is falsey, then set to false
-      if( !modelValue ){
-        modelValue = false;
-      }
-
-      //Update the checkbox based on the model value
-      this.$("input[type='checkbox']").prop("checked", modelValue);
-
+    /** @lends BooleanFilterView.prototype */ {
+      /**
+       * A BooleanFilter model to be rendered in this view
+       * @type {BooleanFilter} */
+      model: null,
+
+      className: "filter boolean",
+
+      template: _.template(Template),
+
+      /**
+       * @inheritdoc
+       */
+      events: function(){
+        try {
+          const events = FilterView.prototype.events.call(this);
+          events["click input[type='checkbox']"] = "updateModel";
+          return events
+        }
+        catch (e) {
+          console.log('Failed to create events for BooleanFilterView: ' + e);
+          return {};
+        }
+      },
+
+      render: function (templateVars) {
+        FilterView.prototype.render.call(this, templateVars);
+        this.stopListening(this.model, "change:values");
+        this.listenTo(this.model, "change:values", this.updateCheckbox);
+      },
+
+      /**
+       * Gets the value of the checkbox and updates the BooleanFilter model
+       */
+      updateModel: function () {
+        //Find out if the checkbox has been checked or not
+        var isChecked = this.$("input[type='checkbox']").prop("checked");
+
+        //Set the boolean value on the model
+        this.model.set("values", [isChecked]);
+      },
+
+      /**
+       * Updates the checked property of the checkbox based on the model value
+       */
+      updateCheckbox: function () {
+        //Get the value from the model
+        var modelValue = this.model.get("values")[0];
+
+        //If the model value is falsey, then set to false
+        if (!modelValue) {
+          modelValue = false;
+        }
+
+        //Update the checkbox based on the model value
+        this.$("input[type='checkbox']").prop("checked", modelValue);
+      },
     }
-
-  });
+  );
   return BooleanFilterView;
 });
 
diff --git a/docs/docs/src_js_views_filters_ChoiceFilterView.js.html b/docs/docs/src_js_views_filters_ChoiceFilterView.js.html index a08c4d66f..8daf70db0 100644 --- a/docs/docs/src_js_views_filters_ChoiceFilterView.js.html +++ b/docs/docs/src_js_views_filters_ChoiceFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_filters_DateFilterView.js.html b/docs/docs/src_js_views_filters_DateFilterView.js.html index 62fdabab9..415f1c823 100644 --- a/docs/docs/src_js_views_filters_DateFilterView.js.html +++ b/docs/docs/src_js_views_filters_DateFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -82,7 +82,7 @@

Source: src/js/views/filters/DateFilterView.js

try { var events = FilterView.prototype.events.call(this); events["change input.max"] = "updateYearRange"; - events["change input.min"] = "updateYearRange" + events["change input.min"] = "updateYearRange"; return events } catch (error) { @@ -144,6 +144,15 @@

Source: src/js/views/filters/DateFilterView.js

//When the rangeReset event is triggered, reset the slider this.listenTo(view.model, "rangeReset", this.resetSlider); + }, + + /** + * Override the base view which is triggered when the user types in the + * input and presses "Enter". The DateFilterView handles updating the model + * already and we do not want to clear the input value at any time. + */ + handleChange: function () { + return }, /** @@ -182,10 +191,8 @@

Source: src/js/views/filters/DateFilterView.js

//Update the UI slider to match the new min and max this.$( ".slider" ).slider( "option", "values", [ minVal, maxVal ] ); - //Send this event to Google Analytics - if(MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")){ - ga("send", "event", "portal search", "filter, Data Year", minVal + " to " + maxVal); - } + //Track this event + MetacatUI.analytics?.trackEvent("portal search", "filter, Data Year", minVal + " to " + maxVal); }, diff --git a/docs/docs/src_js_views_filters_FilterEditorView.js.html b/docs/docs/src_js_views_filters_FilterEditorView.js.html index 3cbe292ef..aef2902a2 100644 --- a/docs/docs/src_js_views_filters_FilterEditorView.js.html +++ b/docs/docs/src_js_views_filters_FilterEditorView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_filters_FilterGroupView.js.html b/docs/docs/src_js_views_filters_FilterGroupView.js.html index d0f47ae5b..652394a2a 100644 --- a/docs/docs/src_js_views_filters_FilterGroupView.js.html +++ b/docs/docs/src_js_views_filters_FilterGroupView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -93,7 +93,16 @@

Source: src/js/views/filters/FilterGroupView.js

* @type {boolean} * @since 2.17.0 */ - edit: false, + edit: false, + + /** + * If set to true, then all filters within this group will be collapsible. + * See {@link FilterView#collapsible} + * @type {boolean} + * @since 2.25.0 + * @default false + */ + collapsible: false, initialize: function (options) { @@ -111,6 +120,10 @@

Source: src/js/views/filters/FilterGroupView.js

this.edit = true } + if (options.collapsible && typeof options.collapsible === "boolean") { + this.collapsible = options.collapsible; + } + }, render: function () { @@ -140,7 +153,8 @@

Source: src/js/views/filters/FilterGroupView.js

var viewOptions = { model: filter, mode: filterMode, - editorView: this.editorView + editorView: this.editorView, + collapsible: this.collapsible } //Some filters are handled specially @@ -167,7 +181,7 @@

Source: src/js/views/filters/FilterGroupView.js

break; case "BooleanFilter": // TODO: Set up "edit" and "uiBuilder" mode for BooleanFilters - var filterView = new BooleanFilterView({ model: filter }); + var filterView = new BooleanFilterView(viewOptions); break; case "ChoiceFilter": var filterView = new ChoiceFilterView(viewOptions); diff --git a/docs/docs/src_js_views_filters_FilterGroupsView.js.html b/docs/docs/src_js_views_filters_FilterGroupsView.js.html index 6e2fd67f3..641f43624 100644 --- a/docs/docs/src_js_views_filters_FilterGroupsView.js.html +++ b/docs/docs/src_js_views_filters_FilterGroupsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -115,6 +115,23 @@

Source: src/js/views/filters/FilterGroupsView.js

* @since 2.17.0 */ edit: false, + + /** + * If set to true, then all filters within this group will be collapsible. + * See {@link FilterView#collapsible} + * @type {boolean} + * @since 2.25.0 + * @default false + */ + collapsible: false, + + /** + * The initial query to use when the view is first rendered. This is a text value + * that will be set on the general `text` Solr field. + * @type {string} + * @since 2.25.0 + */ + initialQuery: undefined, /** * @inheritdoc @@ -153,6 +170,14 @@

Source: src/js/views/filters/FilterGroupsView.js

this.edit = true } + if (options.initialQuery) { + this.initialQuery = options.initialQuery; + } + + if (options.collapsible && typeof options.collapsible === "boolean") { + this.collapsible = options.collapsible; + } + }, /** @@ -263,7 +288,8 @@

Source: src/js/views/filters/FilterGroupsView.js

var filterGroupView = new FilterGroupView({ model: filterGroup, edit: this.edit, - editorView: this.editorView + editorView: this.editorView, + collapsible: this.collapsible }); //Render the FilterGroupView @@ -318,8 +344,9 @@

Source: src/js/views/filters/FilterGroupsView.js

//Render the applied filters this.renderAppliedFiltersSection(); - //Render an "All" filter - this.renderAllFilter(); + // Render an "All" filter. If the view was initialized with an initial + // query, set it on this filter. + this.renderAllFilter(this.initialQuery); } if(this.edit){ @@ -412,7 +439,12 @@

Source: src/js/views/filters/FilterGroupsView.js

}, - renderAllFilter: function(){ + /** + * Renders an "All" filter that will search the general `text` Solr field + * @param {string} searchFor - The initial value of the "All" filter. This + * will get set on the filter model and trigger a change event. Optional. + */ + renderAllFilter: function (searchFor="") { //Create an "All" filter that will search the general `text` Solr field var filter = new Filter({ @@ -433,6 +465,9 @@

Source: src/js/views/filters/FilterGroupsView.js

filterView.render(); this.$(".filters-header").prepend(filterView.el); + if (searchFor && searchFor.length) { + filter.set('values', [searchFor]); + } }, postRender: function(){ diff --git a/docs/docs/src_js_views_filters_FilterView.js.html b/docs/docs/src_js_views_filters_FilterView.js.html index 0da868273..3896e0f88 100644 --- a/docs/docs/src_js_views_filters_FilterView.js.html +++ b/docs/docs/src_js_views_filters_FilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -110,7 +110,41 @@

Source: src/js/views/filters/FilterView.js

* @type {string} * @since 2.17.0 */ - uiBuilderClass: "ui-build", + uiBuilderClass: "ui-build", + + /** + * Whether the filter is collapsible. If true, the filter will have a button that + * toggles the collapsed state. + * @type {boolean} + * @since 2.25.0 + */ + collapsible: false, + + /** + * The class to add to the filter when it is collapsed. + * @type {string} + * @since 2.25.0 + * @default "collapsed" + */ + collapsedClass: "collapsed", + + /** + * The class used for the button that toggles the collapsed state of the filter. + * @type {string} + * @since 2.25.0 + * @default "collapse-toggle" + */ + collapseToggleClass: "collapse-toggle", + + /** + * The current state of the filter, if it is {@link FilterView#collapsible}. + * Whatever this value is set to at initialization, will be how the filter is + * initially rendered. + * @type {boolean} + * @since 2.25.0 + * @default true + */ + collapsed: true, /** * The class used for input elements where the user can change UI attributes when this @@ -132,20 +166,21 @@

Source: src/js/views/filters/FilterView.js

"click .btn": "handleChange", "keydown input": "handleTyping" } - events["change ." + this.uiInputClass] = "updateUIAttribute" + events["change ." + this.uiInputClass] = "updateUIAttribute"; + events[`click .${this.collapseToggleClass}`] = "toggleCollapse"; return events } catch (error) { console.log( 'There was an error setting the events object in a FilterView' + ' Error details: ' + error ); } - }, + }, /** * Function executed whenever a new FilterView is created. * @param {Object} [options] - A literal object of options to set on this View */ - initialize: function (options) { + initialize: function (options) { try { if (!options || typeof options != "object") { @@ -178,6 +213,10 @@

Source: src/js/views/filters/FilterView.js

this.model = options.model || new this.modelClass(); + if (options.collapsible && typeof options.collapsible === "boolean") { + this.collapsible = options.collapsible; + } + } catch (error) { @@ -201,8 +240,14 @@

Source: src/js/views/filters/FilterView.js

var templateVars = this.model.toJSON() } - // Pass the mode (e.g. "edit", "uiBuilder") to the template - templateVars = _.extend(templateVars, { mode: this.mode } ) + // Pass the mode (e.g. "edit", "uiBuilder") to the template, as well + // as the variables related to collapsibility. + const viewVars = { + mode: this.mode, + collapsible: this.collapsible, + collapseToggleClass: this.collapseToggleClass + } + templateVars = _.extend(templateVars, viewVars) // Render the filter HTML (without label or icon) this.$el.html( this.template( templateVars ) ); @@ -230,6 +275,11 @@

Source: src/js/views/filters/FilterView.js

if(["edit", "uiBuilder"].includes(this.mode)){ this.$el.find("input").addClass("ignore-changes") } + + // If the filter is collapsible, set the initial collapsed state + if(this.collapsible && typeof this.collapsed === "boolean"){ + this.toggleCollapse(this.collapsed) + } } catch (error) { @@ -417,7 +467,35 @@

Source: src/js/views/filters/FilterView.js

'. Error details: ' + error ); } - } + }, + + /** + * Toggle the collapsed state of the filter. If collapse is a boolean, then set the + * collapsed state to that value. Otherwise, set it to the opposite of whichever + * state is currently set. + * @param {boolean} [collapse] Whether to collapse the filter. If not provided, the + * filter will be collapsed if it is currently expanded, and vice versa. + * @since 2.25.0 + */ + toggleCollapse: function (collapse) { + try { + // If collapse is a boolean, then set the collapsed state to that value. + // Otherwise, set it to the opposite of whichever state is currently set. + if (typeof collapse !== "boolean") { + collapse = !this.collapsed + } + if (collapse) { + this.el.classList.add(this.collapsedClass) + this.collapsed = true + } else { + this.el.classList.remove(this.collapsedClass) + this.collapsed = false + } + } + catch (e) { + console.log("Could not un/collapse filter.", e); + } + }, diff --git a/docs/docs/src_js_views_filters_NumericFilterView.js.html b/docs/docs/src_js_views_filters_NumericFilterView.js.html index d7bc0791a..c52635fa1 100644 --- a/docs/docs/src_js_views_filters_NumericFilterView.js.html +++ b/docs/docs/src_js_views_filters_NumericFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -224,10 +224,8 @@

Source: src/js/views/filters/NumericFilterView.js

this.$( ".slider" ).slider( "option", "values", [ minVal, maxVal ] ); } - //Send this event to Google Analytics - if(MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")){ - ga("send", "event", "portal search", "filter, Data Year", minVal + " to " + maxVal); - } + //Track this event + MetacatUI.analytics?.trackEvent("portal search", "filter, Data Year", minVal + " to " + maxVal); }, diff --git a/docs/docs/src_js_views_filters_SemanticFilterView.js.html b/docs/docs/src_js_views_filters_SemanticFilterView.js.html index 26e1b2153..086493146 100644 --- a/docs/docs/src_js_views_filters_SemanticFilterView.js.html +++ b/docs/docs/src_js_views_filters_SemanticFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_filters_ToggleFilterView.js.html b/docs/docs/src_js_views_filters_ToggleFilterView.js.html index e4b6c9665..0936329b3 100644 --- a/docs/docs/src_js_views_filters_ToggleFilterView.js.html +++ b/docs/docs/src_js_views_filters_ToggleFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -83,7 +83,8 @@

Source: src/js/views/filters/ToggleFilterView.js

events: function () { try { var events = FilterView.prototype.events.call(this); - events["change input.toggle-checkbox"] = "updateModel"; + events["click input[type='checkbox']"] = "updateModel"; + return events } catch (error) { @@ -95,13 +96,13 @@

Source: src/js/views/filters/ToggleFilterView.js

/** * @inheritdoc */ - render: function () { + render: function (templateVars = {}) { try { - var templateVars = this.model.toJSON(); + templateVars = _.extend(this.model.toJSON(), templateVars); templateVars.id = this.model.cid; - if( !this.model.get("falseLabel") ){ + if (!this.model.get("falseLabel")) { //If the value is the same as the trueValue, the checkbox should be checked templateVars.checked = (this.model.get("values")[0] == this.model.get("trueValue"))? true : false; @@ -216,7 +217,7 @@

Source: src/js/views/filters/ToggleFilterView.js

* The filter value is grabbed from the checkbox element in this view. * */ - updateModel: function(){ + updateModel: function () { //Check if the checkbox is checked var isChecked = this.$("input").prop("checked"); diff --git a/docs/docs/src_js_views_maps_CesiumWidgetView.js.html b/docs/docs/src_js_views_maps_CesiumWidgetView.js.html index e08ffe899..871d7580f 100644 --- a/docs/docs/src_js_views_maps_CesiumWidgetView.js.html +++ b/docs/docs/src_js_views_maps_CesiumWidgetView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -81,6 +81,12 @@

Source: src/js/views/maps/CesiumWidgetView.js

* @screenshot views/maps/CesiumWidgetView.png * @since 2.18.0 * @constructs + * @fires CesiumWidgetView#moved + * @fires CesiumWidgetView#moveEnd + * @fires CesiumWidgetView#moveStart + * @fires Map#moved + * @fires Map#moveEnd + * @fires Map#moveStart */ var CesiumWidgetView = Backbone.View.extend( /** @lends CesiumWidgetView.prototype */{ @@ -128,20 +134,16 @@

Source: src/js/views/maps/CesiumWidgetView.js

renderFunction: 'add3DTileset' }, { - types: ['GeoJsonDataSource'], + types: ['GeoJsonDataSource', 'CzmlDataSource'], renderFunction: 'addVectorData' }, { - types: ['BingMapsImageryProvider', 'IonImageryProvider', 'TileMapServiceImageryProvider', 'WebMapTileServiceImageryProvider', 'WebMapServiceImageryProvider'], + types: ['BingMapsImageryProvider', 'IonImageryProvider', 'TileMapServiceImageryProvider', 'WebMapTileServiceImageryProvider', 'WebMapServiceImageryProvider', 'OpenStreetMapImageryProvider'], renderFunction: 'addImagery' }, { types: ['CesiumTerrainProvider'], renderFunction: 'updateTerrain' - }, - { - types: ['CesiumGeohash'], - renderFunction: 'addGeohashes' } ], @@ -220,6 +222,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

// We will add a base imagery layer after initialization imageryProvider: false, terrain: false, + useBrowserRecommendedResolution: false, // Use explicit rendering to make the widget must faster. // See https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance requestRenderMode: true, @@ -268,7 +271,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

}) // Go to the home position, if one is set. - view.flyHome() + view.flyHome(0) // If users are allowed to click on features for more details, initialize // picking behavior on the map. @@ -278,6 +281,8 @@

Source: src/js/views/maps/CesiumWidgetView.js

// Set listeners for when the Cesium camera changes a significant amount. view.camera.changed.addEventListener(function () { + view.trigger('moved') + view.model.trigger('moved') // Update the bounding box for the visible area in the Map model view.updateViewExtent() // If the scale bar is showing, update the pixel to meter scale on the map @@ -287,6 +292,15 @@

Source: src/js/views/maps/CesiumWidgetView.js

} }) + view.camera.moveEnd.addEventListener(function () { + view.trigger('moveEnd') + view.model.trigger('moveEnd') + }) + view.camera.moveStart.addEventListener(function () { + view.trigger('moveStart') + view.model.trigger('moveStart') + }) + // Sets listeners for when the mouse moves, depending on the value of the map // model's showScaleBar and showFeatureInfo attributes view.setMouseMoveListeners() @@ -322,6 +336,8 @@

Source: src/js/views/maps/CesiumWidgetView.js

view.addAsset(terrainModel) } + + return this } @@ -378,6 +394,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

updateDataSourceDisplay: function () { try { const view = this; + const layers = view.model.get('layers') var dataSources = view.dataSourceDisplay.dataSources; if (!dataSources || !dataSources.length) { @@ -393,7 +410,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

const dataSource = dataSources.get(i); const visualizers = dataSource._visualizers; - const assetModel = view.model.get('layers').findWhere({ + const assetModel = layers.findWhere({ cesiumModel: dataSource }) const displayReadyBefore = assetModel.get('displayReady') @@ -473,8 +490,13 @@

Source: src/js/views/maps/CesiumWidgetView.js

// event to update styling of map assets with selected features, and tells the // parent map view to open the feature details panel. view.inputHandler.setInputAction(function (movement) { - var pickedFeature = scene.pick(movement.position); - view.updateSelectedFeatures([pickedFeature]) + const pickedFeature = scene.pick(movement.position); + const action = view.model.get('clickFeatureAction'); + if (action === 'showDetails') { + view.model.selectFeatures([pickedFeature]) + } else if (action === 'zoom') { + view.flyTo(pickedFeature) + } }, Cesium.ScreenSpaceEventType.LEFT_CLICK); } @@ -486,94 +508,6 @@

Source: src/js/views/maps/CesiumWidgetView.js

} }, - /** - * Given a feature from a vector layer (e.g. a Cesium3DTileFeature), gets any - * properties that are associated with that feature, the MapAsset model that - * contains the feature, and the ID that Cesium uses to identify it, and updates - * the Features collection that is set on the Map's `selectedFeatures` attribute - * with a new Feature model. NOTE: This currently only works with 3D tile - * features. - * @param {Cesium.Cesium3DTileFeature[]} features - An array of Cesium3DTileFeatures to - * select - */ - updateSelectedFeatures: function (features) { - - try { - const view = this - const layers = view.model.get('layers') - - // Don't update the selected features collection if the newly selected - // features are identical - const oldFeatures = view.model.get('selectedFeatures').getFeatureObjects() - const noChange = _.isEqual(_.sortBy(features), _.sortBy(oldFeatures)) - if (noChange) { - return; - } - - // Properties of the selected features to pass to the Map model's - // selectFeatures function. Passing null will empty the map's selectedFeatures - // collection - let featuresAttrs = features ? [] : null - if (!features || !Array.isArray(features)) { - features = [] - } - - features.forEach(function (feature) { - if (feature) { - // To find corresponding MapAsset model in the layers collection - let cesiumModel = null - // Attributes to make a new Feature model - const attrs = { - properties: {}, - mapAsset: null, - featureID: null, - featureObject: feature, - label: null, - } - if (feature instanceof Cesium.Cesium3DTileFeature) { - // Cesium.Cesium3DTileFeature.primitive gives the Cesium.Cesium3DTileset - cesiumModel = feature.primitive - attrs.featureID = feature.pickId ? feature.pickId.key : null - // Search for a property to use as a label - attrs.label = feature.getProperty('name') || feature.getProperty('label') || null - } else { - // TODO: Test - does feature.id give the entity this work for all datasources ? - // A picked feature object's ID gives the Cesium.Entity - attrs.featureObject = feature.id - // Gives the parent DataSource - cesiumModel = attrs.featureObject.entityCollection.owner - attrs.featureID = attrs.featureObject.id - attrs.label = attrs.featureObject.name - } - - attrs.mapAsset = layers.findWhere({ - cesiumModel: cesiumModel - }) - - if ( - attrs.mapAsset && - typeof attrs.mapAsset.getPropertiesFromFeature === 'function' - ) { - attrs.properties = attrs.mapAsset.getPropertiesFromFeature(attrs.featureObject) - } - - featuresAttrs.push(attrs) - } - }) - - // Pass the new information to the Map's selectFeatures function, which will - // update the selectFeatures collection set on the Map model - view.model.selectFeatures(featuresAttrs) - - } - catch (error) { - console.log( - 'There was an error updating the selected features collection from a ' + - 'CesiumWidgetView. Error details: ' + error - ); - } - }, - /** * Move the camera position and zoom to the specified target entity or position on * the map, using a nice animation. This function starts the flying/zooming @@ -624,9 +558,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

try { const view = this; - if (typeof options !== 'object') { - options = {} - } + if (typeof options !== 'object') options = {} // A target is required if (!target) { @@ -662,17 +594,26 @@

Source: src/js/views/maps/CesiumWidgetView.js

// There's no native way of getting the bounding sphere or location from a // 3DTileFeature! if (target instanceof Feature) { - // If the target is a Feature, get the Bounding Sphere for the Feature - // and call this function again. - const feature = target.get('featureObject') - let featureBoundingSphere = new Cesium.BoundingSphere(); + // If the object saved in the Feature is an Entity, then this + // function will get the bounding sphere for the entity on the + // next run. + setTimeout(() => { + view.flyTo(target.get('featureObject'), options) + }, 0); + return + } + + // If the target is a Cesium Entity, then get the bounding sphere for the + // entity and call this function again. + const entity = target instanceof Cesium.Entity ? target : target.id; + if (entity instanceof Cesium.Entity) { + let entityBoundingSphere = new Cesium.BoundingSphere(); view.dataSourceDisplay.getBoundingSphere( - feature, false, featureBoundingSphere + entity, false, entityBoundingSphere ) setTimeout(() => { - view.flyTo(featureBoundingSphere, options) + view.flyTo(entityBoundingSphere, options) }, 0); - return } @@ -683,18 +624,16 @@

Source: src/js/views/maps/CesiumWidgetView.js

} } - catch (error) { - console.log( - 'There was an error navigating to a target position in a CesiumWidgetView' + - '. Error details: ' + error - ); + catch (e) { + console.log('Failed to navigate to a target in Cesium.', e); } }, /** * Navigate to the homePosition that's set on the Map. + * @param {number} duration The duration of the flight in seconds. */ - flyHome: function () { + flyHome: function (duration) { try { var position = this.model.get('homePosition') @@ -723,6 +662,9 @@

Source: src/js/views/maps/CesiumWidgetView.js

roll: Cesium.Math.toRadians(position.roll) } } + if (Cesium.defined(duration)) { + target.duration = duration + } this.flyTo(target); } @@ -743,18 +685,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

*/ getCameraPosition: function () { try { - var camera = this.camera - var cameraPosition = Cesium.Cartographic.fromCartesian(camera.position) - - return { - longitude: Cesium.Math.toDegrees(cameraPosition.longitude), - latitude: Cesium.Math.toDegrees(cameraPosition.latitude), - height: cameraPosition.height, - heading: Cesium.Math.toDegrees(camera.heading), - pitch: Cesium.Math.toDegrees(camera.pitch), - roll: Cesium.Math.toDegrees(camera.roll) - } - + return this.getDegreesFromCartesian(this.camera.position) } catch (error) { console.log( @@ -765,98 +696,123 @@

Source: src/js/views/maps/CesiumWidgetView.js

}, /** - * Update the 'currentViewExtent' attribute in the Map model with the north, - * south, east, and west-most lat/long that define a bounding box around the - * currently visible area of the map. + * Update the 'currentViewExtent' attribute in the Map model with the + * bounding box of the currently visible area of the map. */ updateViewExtent: function () { - try { - const view = this; - const camera = view.camera; - const scene = view.scene; + try { this.model.set('currentViewExtent', this.getViewExtent()) } + catch (e) { console.log('Failed to update the Map view extent.', e) } + }, - // This will be the bounding box of the visible area - let coords = { north: null, south: null, east: null, west: null } + /** + * Get the north, south, east, and west-most lat/long that define a + * bounding box around the currently visible area of the map. Also gives + * the height/ altitude of the camera in meters. + * @returns {MapConfig#ViewExtent} The current view extent. + */ + getViewExtent: function () { + const view = this; + const scene = view.scene; + const camera = view.camera; + // Get the height in meters + const height = camera.positionCartographic.height - // First try getting the visible bounding box using the simple method - if (!view.scratchRectangle) { - // Store the rectangle that we use for the calculation (reduces pressure on - // garbage collector system since this function is called often). - view.scratchRectangle = new Cesium.Rectangle(); - } - var rect = camera.computeViewRectangle( - scene.globe.ellipsoid, view.scratchRectangle - ); - coords.north = Cesium.Math.toDegrees(rect.north) - coords.east = Cesium.Math.toDegrees(rect.east) - coords.south = Cesium.Math.toDegrees(rect.south) - coords.west = Cesium.Math.toDegrees(rect.west) - - // Check if the resulting coordinates cover the entire globe (happens if some of - // the sky is visible) - - const fullGlobeCoverage = coords.west === -180 && coords.east === 180 && - coords.south === -90 && coords.north === 90 - - // See if we can limit the bounding box to a smaller extent - if (fullGlobeCoverage) { - - // Find points at the top, bottom, right, and left corners of the globe - const edges = view.findEdges() - - // Get the midPoint between the top and bottom points on the globe. Use this - // to decide if the northern or southern hemisphere is more in view. - let midPoint = view.findMidpoint(edges.top, edges.bottom) - if (midPoint) { - - // Get the latitude of the mid point - const midPointLat = view.getDegreesFromCartesian(midPoint).latitude - - // Get the latitudes of all the edge points so that we can calculate the - // southern and northern most coordinate - const edgeLatitudes = [] - Object.values(edges).forEach(function (point) { - if (point) { - edgeLatitudes.push( - view.getDegreesFromCartesian(point).latitude - ) - } - }) + // This will be the bounding box of the visible area + let coords = { + north: null, south: null, east: null, west: null, height: height + } - if (midPointLat > 0) { - // If the midPoint is in the northern hemisphere, limit the southern part - // of the bounding box to the southern most edge point latitude - coords.south = Math.min(...edgeLatitudes) - } else { - // Vice versa for the southern hemisphere - coords.north = Math.max(...edgeLatitudes) + // First try getting the visible bounding box using the simple method + if (!view.scratchRectangle) { + // Store the rectangle that we use for the calculation (reduces pressure on + // garbage collector system since this function is called often). + view.scratchRectangle = new Cesium.Rectangle(); + } + var rect = camera.computeViewRectangle( + scene.globe.ellipsoid, view.scratchRectangle + ); + coords.north = Cesium.Math.toDegrees(rect.north) + coords.east = Cesium.Math.toDegrees(rect.east) + coords.south = Cesium.Math.toDegrees(rect.south) + coords.west = Cesium.Math.toDegrees(rect.west) + + // Check if the resulting coordinates cover the entire globe (happens + // if some of the sky is visible). If so, limit the bounding box to a + // smaller extent + if (view.coversGlobe(coords)) { + + // Find points at the top, bottom, right, and left corners of the globe + const edges = view.findEdges() + + // Get the midPoint between the top and bottom points on the globe. Use this + // to decide if the northern or southern hemisphere is more in view. + let midPoint = view.findMidpoint(edges.top, edges.bottom) + if (midPoint) { + + // Get the latitude of the mid point + const midPointLat = view.getDegreesFromCartesian(midPoint).latitude + + // Get the latitudes of all the edge points so that we can calculate the + // southern and northern most coordinate + const edgeLatitudes = [] + Object.values(edges).forEach(function (point) { + if (point) { + edgeLatitudes.push( + view.getDegreesFromCartesian(point).latitude + ) } + }) + + if (midPointLat > 0) { + // If the midPoint is in the northern hemisphere, limit the southern part + // of the bounding box to the southern most edge point latitude + coords.south = Math.min(...edgeLatitudes) + } else { + // Vice versa for the southern hemisphere + coords.north = Math.max(...edgeLatitudes) } + } - // If not focused directly on one of the poles, then also limit the east and - // west sides of the bounding box - const northPointLat = view.getDegreesFromCartesian(edges.top).latitude - const southPointLat = view.getDegreesFromCartesian(edges.bottom).latitude + // If not focused directly on one of the poles, then also limit the east and + // west sides of the bounding box + const northPointLat = view.getDegreesFromCartesian(edges.top).latitude + const southPointLat = view.getDegreesFromCartesian(edges.bottom).latitude - if (northPointLat > 25 && southPointLat < -25) { - if (edges.right) { - coords.east = view.getDegreesFromCartesian(edges.right).longitude - } - if (edges.left) { - coords.west = view.getDegreesFromCartesian(edges.left).longitude - } + if (northPointLat > 25 && southPointLat < -25) { + if (edges.right) { + coords.east = view.getDegreesFromCartesian(edges.right).longitude + } + if (edges.left) { + coords.west = view.getDegreesFromCartesian(edges.left).longitude } } + } - view.model.set('currentViewExtent', coords) + return coords + }, - } - catch (error) { - console.log( - 'Failed to update the Map view extent from a CesiumWidgetView' + - '. Error details: ' + error - ); - } + /** + * Check if a given bounding box covers the entire globe. + * @param {Object} coords - An object with the north, south, east, and + * west coordinates of a bounding box + * @param {Number} latAllowance - The number of degrees latitude to + * allow as a buffer. If the north and south coords range from -90 to + * 90, minus this buffer * 2, then it is considered to cover the globe. + * @param {Number} lonAllowance - The number of degrees longitude to + * allow as a buffer. + * @returns {Boolean} Returns true if the bounding box covers the entire + * globe, false otherwise. + */ + coversGlobe: function (coords, latAllowance = 0.5, lonAllowance = 1) { + const maxLat = 90 - latAllowance; + const minLat = -90 + latAllowance; + const maxLon = 180 - lonAllowance; + const minLon = -180 + lonAllowance; + + return coords.west <= minLon && + coords.east >= maxLon && + coords.south <= minLat && + coords.north >= maxLat }, /** @@ -867,11 +823,16 @@

Source: src/js/views/maps/CesiumWidgetView.js

*/ getDegreesFromCartesian: function (cartesian) { const cartographic = Cesium.Cartographic.fromCartesian(cartesian); - return { - longitude: Cesium.Math.toDegrees(cartographic.longitude), - latitude: Cesium.Math.toDegrees(cartographic.latitude), + const degrees = { height: cartographic.height } + const coordinates = ['longitude', 'latitude', 'heading', 'pitch', 'roll'] + coordinates.forEach(function (coordinate) { + if (Cesium.defined(cartographic[coordinate])) { + degrees[coordinate] = Cesium.Math.toDegrees(cartographic[coordinate]) + } + }); + return degrees }, /** @@ -1051,13 +1012,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

var pickRay = view.camera.getPickRay(mousePosition); var cartesian = view.scene.globe.pick(pickRay, view.scene); if (cartesian) { - // Use globe.ellipsoid.cartesianToCartographic ? - var cartographic = Cesium.Cartographic.fromCartesian(cartesian); - view.model.set('currentPosition', { - latitude: Cesium.Math.toDegrees(cartographic.latitude), - longitude: Cesium.Math.toDegrees(cartographic.longitude), - height: cartographic.height, - }) + view.model.set('currentPosition', view.getDegreesFromCartesian(cartesian)) } } @@ -1185,7 +1140,7 @@

Source: src/js/views/maps/CesiumWidgetView.js

* @param {MapAsset} mapAsset A MapAsset layer to render in the map, such as a * Cesium3DTileset or a CesiumImagery model. */ - addAsset: function(mapAsset) { + addAsset: function (mapAsset) { try { if (!mapAsset) { return @@ -1268,29 +1223,10 @@

Source: src/js/views/maps/CesiumWidgetView.js

this.dataSourceCollection.add(cesiumModel) }, - /** - * Renders a CesiumGeohash map asset on the map - * */ - addGeohashes: function () { - let view = this; - - require(["views/maps/CesiumGeohashes"], (CesiumGeohashes)=>{ - //Create a CesiumGeohashes view - let cg = new CesiumGeohashes(); - cg.cesiumViewer = view; - - //Get the CesiumGeohash MapAsset and save a reference in the view - let cesiumGeohashAsset = view.model.get('layers').find(mapAsset => mapAsset.get("type") == "CesiumGeohash"); - cg.cesiumGeohash = cesiumGeohashAsset; - - cg.render(); - }) - }, - /** * Renders imagery in the Map. * @param {Cesium.ImageryLayer} cesiumModel The Cesium imagery model to render - */ + */ addImagery: function (cesiumModel) { this.scene.imageryLayers.add(cesiumModel) this.sortImagery() diff --git a/docs/docs/src_js_views_maps_FeatureInfoView.js.html b/docs/docs/src_js_views_maps_FeatureInfoView.js.html index 4c71604a2..0dc7610be 100644 --- a/docs/docs/src_js_views_maps_FeatureInfoView.js.html +++ b/docs/docs/src_js_views_maps_FeatureInfoView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LayerDetailView.js.html b/docs/docs/src_js_views_maps_LayerDetailView.js.html index 060d39d2a..f2e69b106 100644 --- a/docs/docs/src_js_views_maps_LayerDetailView.js.html +++ b/docs/docs/src_js_views_maps_LayerDetailView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LayerDetailsView.js.html b/docs/docs/src_js_views_maps_LayerDetailsView.js.html index 5a59cf5f2..fa86c6c29 100644 --- a/docs/docs/src_js_views_maps_LayerDetailsView.js.html +++ b/docs/docs/src_js_views_maps_LayerDetailsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LayerInfoView.js.html b/docs/docs/src_js_views_maps_LayerInfoView.js.html index 327008590..613822d83 100644 --- a/docs/docs/src_js_views_maps_LayerInfoView.js.html +++ b/docs/docs/src_js_views_maps_LayerInfoView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LayerItemView.js.html b/docs/docs/src_js_views_maps_LayerItemView.js.html index 96c9293d3..d1e42031f 100644 --- a/docs/docs/src_js_views_maps_LayerItemView.js.html +++ b/docs/docs/src_js_views_maps_LayerItemView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LayerListView.js.html b/docs/docs/src_js_views_maps_LayerListView.js.html index 1fd63d437..4a8bf1de4 100644 --- a/docs/docs/src_js_views_maps_LayerListView.js.html +++ b/docs/docs/src_js_views_maps_LayerListView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -52,7 +52,6 @@

Source: src/js/views/maps/LayerListView.js

'jquery', 'underscore', 'backbone', - 'collections/maps/MapAssets', 'text!templates/maps/layer-list.html', // Sub-views 'views/maps/LayerItemView' @@ -61,7 +60,6 @@

Source: src/js/views/maps/LayerListView.js

$, _, Backbone, - MapAssets, Template, // Sub-views LayerItemView diff --git a/docs/docs/src_js_views_maps_LayerNavigationView.js.html b/docs/docs/src_js_views_maps_LayerNavigationView.js.html index bb3565519..5530c7a63 100644 --- a/docs/docs/src_js_views_maps_LayerNavigationView.js.html +++ b/docs/docs/src_js_views_maps_LayerNavigationView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LayerOpacityView.js.html b/docs/docs/src_js_views_maps_LayerOpacityView.js.html index 2f77546d9..9a0d895a3 100644 --- a/docs/docs/src_js_views_maps_LayerOpacityView.js.html +++ b/docs/docs/src_js_views_maps_LayerOpacityView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_LegendView.js.html b/docs/docs/src_js_views_maps_LegendView.js.html index 403206cf0..6a974a948 100644 --- a/docs/docs/src_js_views_maps_LegendView.js.html +++ b/docs/docs/src_js_views_maps_LegendView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -185,6 +185,10 @@

Source: src/js/views/maps/LegendView.js

try { + if (!this.model) { + return; + } + // Save a reference to this view var view = this; diff --git a/docs/docs/src_js_views_maps_MapView.js.html b/docs/docs/src_js_views_maps_MapView.js.html index 3c033bef6..90c350219 100644 --- a/docs/docs/src_js_views_maps_MapView.js.html +++ b/docs/docs/src_js_views_maps_MapView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -208,7 +208,10 @@

Source: src/js/views/maps/MapView.js

if (this.model.get('showScaleBar')) { this.renderScaleBar(); } - if (this.model.get('showFeatureInfo')) { + if ( + this.model.get('showFeatureInfo') & + this.model.get('clickFeatureAction') === 'showDetails' + ) { this.renderFeatureInfo(); } diff --git a/docs/docs/src_js_views_maps_ScaleBarView.js.html b/docs/docs/src_js_views_maps_ScaleBarView.js.html index b9e84fbdb..b7ff68897 100644 --- a/docs/docs/src_js_views_maps_ScaleBarView.js.html +++ b/docs/docs/src_js_views_maps_ScaleBarView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_maps_ToolbarView.js.html b/docs/docs/src_js_views_maps_ToolbarView.js.html index c06fc9dee..ef4602b52 100644 --- a/docs/docs/src_js_views_maps_ToolbarView.js.html +++ b/docs/docs/src_js_views_maps_ToolbarView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -53,6 +53,7 @@

Source: src/js/views/maps/ToolbarView.js

'underscore', 'backbone', 'text!templates/maps/toolbar.html', + 'models/maps/Map', // Sub-views 'views/maps/LayerListView' ], @@ -61,6 +62,7 @@

Source: src/js/views/maps/ToolbarView.js

_, Backbone, Template, + Map, // Sub-views LayerListView ) { @@ -239,9 +241,22 @@

Source: src/js/views/maps/ToolbarView.js

this[key] = value; } } - if(this.model && this.model.get('toolbarOpen') === true) { + if (!this.model || !(this.model instanceof Map)) { + this.model = new Map(); + } + if(this.model.get('toolbarOpen') === true) { this.isOpen = true; } + if (this.model.get("showLayerList") === false) { + this.sections = this.sections.filter( + (section) => section.label !== "Layers" + ); + } + if (this.model.get("showHomeButton") === false) { + this.sections = this.sections.filter( + (section) => section.label !== "Home" + ); + } } catch (e) { console.log('A ToolbarView failed to initialize. Error message: ' + e); } diff --git a/docs/docs/src_js_views_metadata_EML211EditorView.js.html b/docs/docs/src_js_views_metadata_EML211EditorView.js.html index bf832bd78..a1ea64838 100644 --- a/docs/docs/src_js_views_metadata_EML211EditorView.js.html +++ b/docs/docs/src_js_views_metadata_EML211EditorView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EML211View.js.html b/docs/docs/src_js_views_metadata_EML211View.js.html index 4f90321ff..d4269c30b 100644 --- a/docs/docs/src_js_views_metadata_EML211View.js.html +++ b/docs/docs/src_js_views_metadata_EML211View.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLAttributeView.js.html b/docs/docs/src_js_views_metadata_EMLAttributeView.js.html index 9b473cbea..2689f015c 100644 --- a/docs/docs/src_js_views_metadata_EMLAttributeView.js.html +++ b/docs/docs/src_js_views_metadata_EMLAttributeView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLEntityView.js.html b/docs/docs/src_js_views_metadata_EMLEntityView.js.html index 2837c743c..d572c0270 100644 --- a/docs/docs/src_js_views_metadata_EMLEntityView.js.html +++ b/docs/docs/src_js_views_metadata_EMLEntityView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLGeoCoverageView.js.html b/docs/docs/src_js_views_metadata_EMLGeoCoverageView.js.html index 94ea76ebf..ddf92aa46 100644 --- a/docs/docs/src_js_views_metadata_EMLGeoCoverageView.js.html +++ b/docs/docs/src_js_views_metadata_EMLGeoCoverageView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLMeasurementScaleView.js.html b/docs/docs/src_js_views_metadata_EMLMeasurementScaleView.js.html index 6ebb4be7a..d6ba35183 100644 --- a/docs/docs/src_js_views_metadata_EMLMeasurementScaleView.js.html +++ b/docs/docs/src_js_views_metadata_EMLMeasurementScaleView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLMeasurementTypeView.js.html b/docs/docs/src_js_views_metadata_EMLMeasurementTypeView.js.html index dbad414d3..f837ce69e 100644 --- a/docs/docs/src_js_views_metadata_EMLMeasurementTypeView.js.html +++ b/docs/docs/src_js_views_metadata_EMLMeasurementTypeView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLMethodsView.js.html b/docs/docs/src_js_views_metadata_EMLMethodsView.js.html index 0d28bceb7..a9191d2f2 100644 --- a/docs/docs/src_js_views_metadata_EMLMethodsView.js.html +++ b/docs/docs/src_js_views_metadata_EMLMethodsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLOtherEntityView.js.html b/docs/docs/src_js_views_metadata_EMLOtherEntityView.js.html index 567be5803..1788f26e2 100644 --- a/docs/docs/src_js_views_metadata_EMLOtherEntityView.js.html +++ b/docs/docs/src_js_views_metadata_EMLOtherEntityView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLPartyView.js.html b/docs/docs/src_js_views_metadata_EMLPartyView.js.html index 9643b7450..3dd690044 100644 --- a/docs/docs/src_js_views_metadata_EMLPartyView.js.html +++ b/docs/docs/src_js_views_metadata_EMLPartyView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_EMLTempCoverageView.js.html b/docs/docs/src_js_views_metadata_EMLTempCoverageView.js.html index 3e06f88a5..90262d22d 100644 --- a/docs/docs/src_js_views_metadata_EMLTempCoverageView.js.html +++ b/docs/docs/src_js_views_metadata_EMLTempCoverageView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_metadata_ScienceMetadataView.js.html b/docs/docs/src_js_views_metadata_ScienceMetadataView.js.html index c3aaa852d..ddc90d47f 100644 --- a/docs/docs/src_js_views_metadata_ScienceMetadataView.js.html +++ b/docs/docs/src_js_views_metadata_ScienceMetadataView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalDataView.js.html b/docs/docs/src_js_views_portals_PortalDataView.js.html index 0717a798d..73abd3eb6 100644 --- a/docs/docs/src_js_views_portals_PortalDataView.js.html +++ b/docs/docs/src_js_views_portals_PortalDataView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalHeaderView.js.html b/docs/docs/src_js_views_portals_PortalHeaderView.js.html index a4a6271f7..6e0ba1510 100644 --- a/docs/docs/src_js_views_portals_PortalHeaderView.js.html +++ b/docs/docs/src_js_views_portals_PortalHeaderView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalListView.js.html b/docs/docs/src_js_views_portals_PortalListView.js.html index f16611bd6..6b139109e 100644 --- a/docs/docs/src_js_views_portals_PortalListView.js.html +++ b/docs/docs/src_js_views_portals_PortalListView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalLogosView.js.html b/docs/docs/src_js_views_portals_PortalLogosView.js.html index 291c1fa43..2f5d51431 100644 --- a/docs/docs/src_js_views_portals_PortalLogosView.js.html +++ b/docs/docs/src_js_views_portals_PortalLogosView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalMembersView.js.html b/docs/docs/src_js_views_portals_PortalMembersView.js.html index 9fd3d2b46..33d06d5c0 100644 --- a/docs/docs/src_js_views_portals_PortalMembersView.js.html +++ b/docs/docs/src_js_views_portals_PortalMembersView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalMetricsView.js.html b/docs/docs/src_js_views_portals_PortalMetricsView.js.html index 0b9bcee3f..0dfb37f3f 100644 --- a/docs/docs/src_js_views_portals_PortalMetricsView.js.html +++ b/docs/docs/src_js_views_portals_PortalMetricsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -310,14 +310,12 @@

Source: src/js/views/portals/PortalMetricsView.js

"\" portal at this time.</p>" } - //Send this exception to Google Analytics - if(MetacatUI.appModel.get("googleAnalyticsKey") && (typeof ga !== "undefined")){ - var gaMetricsErrorMessage = "Failed to render the Metrics view for the portal: " + (this.model.get("label") || this.model.get("portalId")) + " | v. " + MetacatUI.metacatUIVersion; - ga("send", "exception", { - "exDescription": gaMetricsErrorMessage, - "exFatal": false - }); - } + // Track the error + const model = this.model; + const portalID = model.get("portalId") || model.get("label"); + MetacatUI.analytics?.trackException( + "Failed to render the Metrics view for a portal", portalID, false + ); //Show a warning message about the metrics error MetacatUI.appView.showAlert( diff --git a/docs/docs/src_js_views_portals_PortalSectionView.js.html b/docs/docs/src_js_views_portals_PortalSectionView.js.html index 94308e3fe..fbb471c03 100644 --- a/docs/docs/src_js_views_portals_PortalSectionView.js.html +++ b/docs/docs/src_js_views_portals_PortalSectionView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalUsagesView.js.html b/docs/docs/src_js_views_portals_PortalUsagesView.js.html index 5bb971940..450e99bc8 100644 --- a/docs/docs/src_js_views_portals_PortalUsagesView.js.html +++ b/docs/docs/src_js_views_portals_PortalUsagesView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalView.js.html b/docs/docs/src_js_views_portals_PortalView.js.html index c244b4880..80f70db2e 100644 --- a/docs/docs/src_js_views_portals_PortalView.js.html +++ b/docs/docs/src_js_views_portals_PortalView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -306,7 +306,9 @@

Source: src/js/views/portals/PortalView.js

// create a portal model for repository this.model = new Portal({ seriesId: this.portalId, - label: view.label + label: view.label, + name: this.nodeInfo.name, + description: this.nodeInfo.description, }); // remove the members section directly from the model @@ -333,6 +335,10 @@

Source: src/js/views/portals/PortalView.js

*/ renderPortal: function () { + // Set the document title to the portal name + MetacatUI.appModel.set("title", this.model.get("name")) + MetacatUI.appModel.set("description", this.model.get("description")) + // Getting the correct portal label and seriesID this.label = this.model.get("label"); this.portalId = this.model.get("seriesId"); @@ -1097,6 +1103,9 @@

Source: src/js/views/portals/PortalView.js

* Any clean-up or housekeeping happens at this time. */ onClose: function () { + + MetacatUI.appModel.resetTitle(); + MetacatUI.appModel.resetDescription(); //Remove each subview from the DOM and remove listeners _.invoke(this.subviews, "remove"); diff --git a/docs/docs/src_js_views_portals_PortalVisualizationsView.js.html b/docs/docs/src_js_views_portals_PortalVisualizationsView.js.html index 953a1687e..6e63decd3 100644 --- a/docs/docs/src_js_views_portals_PortalVisualizationsView.js.html +++ b/docs/docs/src_js_views_portals_PortalVisualizationsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_PortalsSearchView.js.html b/docs/docs/src_js_views_portals_PortalsSearchView.js.html index 9c327e09d..fb8aa13c9 100644 --- a/docs/docs/src_js_views_portals_PortalsSearchView.js.html +++ b/docs/docs/src_js_views_portals_PortalsSearchView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorDataView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorDataView.js.html index c8e272f94..399060742 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorDataView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorDataView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorImageView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorImageView.js.html index 9fb05f52c..a0d14e495 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorImageView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorImageView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorLogosView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorLogosView.js.html index 986893bb5..1920f5efc 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorLogosView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorLogosView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorMdSectionView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorMdSectionView.js.html index 86cd7bcfb..4d2558e64 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorMdSectionView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorMdSectionView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorSectionView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorSectionView.js.html index 34d4ecb88..795ddff7f 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorSectionView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorSectionView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorSectionsView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorSectionsView.js.html index f577c72e6..5e32254fd 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorSectionsView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorSectionsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortEditorSettingsView.js.html b/docs/docs/src_js_views_portals_editor_PortEditorSettingsView.js.html index e6e6d5c4b..cf531ae2c 100644 --- a/docs/docs/src_js_views_portals_editor_PortEditorSettingsView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortEditorSettingsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_portals_editor_PortalEditorView.js.html b/docs/docs/src_js_views_portals_editor_PortalEditorView.js.html index 57bc576f4..e07a42423 100644 --- a/docs/docs/src_js_views_portals_editor_PortalEditorView.js.html +++ b/docs/docs/src_js_views_portals_editor_PortalEditorView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_projects_ProjectView.js.html b/docs/docs/src_js_views_projects_ProjectView.js.html index 956e3d9f3..d60bf122e 100644 --- a/docs/docs/src_js_views_projects_ProjectView.js.html +++ b/docs/docs/src_js_views_projects_ProjectView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_queryBuilder_QueryBuilderView.js.html b/docs/docs/src_js_views_queryBuilder_QueryBuilderView.js.html index 332bf9d32..db542d506 100644 --- a/docs/docs/src_js_views_queryBuilder_QueryBuilderView.js.html +++ b/docs/docs/src_js_views_queryBuilder_QueryBuilderView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_queryBuilder_QueryRuleView.js.html b/docs/docs/src_js_views_queryBuilder_QueryRuleView.js.html index 293c462fe..16fe27b1e 100644 --- a/docs/docs/src_js_views_queryBuilder_QueryRuleView.js.html +++ b/docs/docs/src_js_views_queryBuilder_QueryRuleView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_searchSelect_AccountSelectView.js.html b/docs/docs/src_js_views_searchSelect_AccountSelectView.js.html index ac76094b2..4b79912c2 100644 --- a/docs/docs/src_js_views_searchSelect_AccountSelectView.js.html +++ b/docs/docs/src_js_views_searchSelect_AccountSelectView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_searchSelect_AnnotationFilterView.js.html b/docs/docs/src_js_views_searchSelect_AnnotationFilterView.js.html index 237f55753..6ace46a66 100644 --- a/docs/docs/src_js_views_searchSelect_AnnotationFilterView.js.html +++ b/docs/docs/src_js_views_searchSelect_AnnotationFilterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_searchSelect_NodeSelectView.js.html b/docs/docs/src_js_views_searchSelect_NodeSelectView.js.html index 7b6b57a3e..132d113c2 100644 --- a/docs/docs/src_js_views_searchSelect_NodeSelectView.js.html +++ b/docs/docs/src_js_views_searchSelect_NodeSelectView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_searchSelect_ObjectFormatSelectView.js.html b/docs/docs/src_js_views_searchSelect_ObjectFormatSelectView.js.html index 1d9f5058a..547b7aa63 100644 --- a/docs/docs/src_js_views_searchSelect_ObjectFormatSelectView.js.html +++ b/docs/docs/src_js_views_searchSelect_ObjectFormatSelectView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_searchSelect_QueryFieldSelectView.js.html b/docs/docs/src_js_views_searchSelect_QueryFieldSelectView.js.html index f4395897a..13a3e42ab 100644 --- a/docs/docs/src_js_views_searchSelect_QueryFieldSelectView.js.html +++ b/docs/docs/src_js_views_searchSelect_QueryFieldSelectView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_searchSelect_SearchableSelectView.js.html b/docs/docs/src_js_views_searchSelect_SearchableSelectView.js.html index 0f9eb1b6f..e4d4e21d8 100644 --- a/docs/docs/src_js_views_searchSelect_SearchableSelectView.js.html +++ b/docs/docs/src_js_views_searchSelect_SearchableSelectView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/docs/docs/src_js_views_search_CatalogSearchView.js.html b/docs/docs/src_js_views_search_CatalogSearchView.js.html index 5d3e5197a..69ebb53ea 100644 --- a/docs/docs/src_js_views_search_CatalogSearchView.js.html +++ b/docs/docs/src_js_views_search_CatalogSearchView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -45,513 +45,855 @@

Source: src/js/views/search/CatalogSearchView.js

/*global define */
-define(["jquery",
-        "backbone",
-        "collections/maps/MapAssets",
-        "models/filters/FilterGroup",
-        "models/connectors/Filters-Search",
-        "models/connectors/Geohash-Search",
-        "models/maps/assets/CesiumGeohash",
-        "models/maps/Map",
-        "views/search/SearchResultsView",
-        "views/filters/FilterGroupsView",
-        "views/maps/MapView",
-        "views/search/SearchResultsPagerView",
-        "views/search/SorterView"
-    ],
-function($, Backbone, MapAssets, FilterGroup, FiltersSearchConnector, GeohashSearchConnector, CesiumGeohash, Map, SearchResultsView, FilterGroupsView, MapView, PagerView, SorterView){
-
-    "use strict";
-
-    /**
-    * @class CatalogSearchView
-    * @name CatalogSearchView
-    * @classcategory Views
-    * @extends Backbone.View
-    * @constructor
-    * @since 2.22.0
-    */
-    return Backbone.View.extend(
-      /** @lends CatalogSearchView.prototype */ {
-
-    /**
-    * The type of View this is
-    * @type {string}
-    */
-    type: "CatalogSearch",
-
-    /**
-    * The HTML tag to use for this view's element
-    * @type {string}
-    */
-    tagName: "section",
-
-    /**
-    * The HTML classes to use for this view's element
-    * @type {string}
-    */
-    className: "catalog-search-view",
-
-    template: `
-        <section class="catalog-search-inner">
-            <div class="filter-groups-container"></div>
-            <div class="search-results-panel-container">
-                <div class="map-toggle-container"><a class="toggle-map"><i class="icon icon-double-angle-left"></i> Show Map</a></div>
-                <div class="title-container"></div>
-                <div class="pager-container"></div>
-                <div class="sorter-container"></div>
-                <div class="search-results-container"></div>
-            </div>
-            <div class="map-panel-container">
-                <div class="map-toggle-container"><a class="toggle-map">Hide Map <i class="icon icon-double-angle-right"></i></a></div>
-                <div class="map-container"></div>
-            </div>
-        </section>
-    `,
-
-    /**
-     * The search mode to use. This can be set to either `map` or `list`. List mode will hide all map features.
-     * @type string
-     * @since 2.22.0
-     * @default "map"
-     */
-    mode: "map",
-
-    searchResults: null,
-
-    filterGroupsView: null,
-
-    /**
-     * @type {PagerView}
-     */
-    pagerView: null,
-
-    /**
-     * @type {SorterView}
-     */
-    sorterView: null,
-
-    searchModel: null,
-
-    allFilters: null,
-
-    filterGroups: null,
-
-    /** 
-     * An array of literal objects to transform into FilterGroup models. These FilterGroups will be displayed in this view and used for searching. If not provided, the {@link AppConfig#defaultFilterGroups} will be used.
-    * @type {FilterGroup#defaults[]} 
-     */
-    filterGroupsJSON: null,
-
-
-    /**
-    * The jQuery selector for the FilterGroupsView container
-    * @type {string}
-    */
-    filterGroupsContainer: ".filter-groups-container",
-
-    /**
-    * The query selector for the SearchResultsView container
-    * @type {string}
-    */
-    searchResultsContainer: ".search-results-container",
-
-    /**
-    * The query selector for the CesiumWidgetView container
-    * @type {string}
-    */
-    mapContainer: ".map-container",
-
-    /**
-    * The query selector for the PagerView container
-    * @type {string}
-    */
-    pagerContainer: ".pager-container",
-
-    /**
-    * The query selector for the SorterView container
-    * @type {string}
-    */
-    sorterContainer: ".sorter-container",
-
-    /**
-     * The query selector for the title container
-     * @type {string}
-     */
-    titleContainer: ".title-container",
-
-     /**
-    * The events this view will listen to and the associated function to call.
-    * @type {Object}
-    */
-    events: {
-        "click .map-toggle-container" : "toggleMode"
-    },
-
-    render: function(){
-
-        //Set the search mode - either map or list
-        this.setMode();
-
-        //Set up the view for styling and layout
+define([
+  "jquery",
+  "backbone",
+  "views/search/SearchResultsView",
+  "views/filters/FilterGroupsView",
+  "views/maps/MapView",
+  "views/search/SearchResultsPagerView",
+  "views/search/SorterView",
+  "text!templates/search/catalogSearch.html",
+  "models/connectors/Map-Search-Filters",
+  "text!" + MetacatUI.root + "/css/catalog-search-view.css",
+], function (
+  $,
+  Backbone,
+  SearchResultsView,
+  FilterGroupsView,
+  MapView,
+  PagerView,
+  SorterView,
+  Template,
+  MapSearchFiltersConnector,
+  CatalogSearchViewCSS
+) {
+  "use strict";
+
+  /**
+   * @class CatalogSearchView
+   * @classdesc The data catalog search view for the repository. This view
+   * displays a Cesium map, search results, and search filters.
+   * @name CatalogSearchView
+   * @classcategory Views
+   * @extends Backbone.View
+   * @constructor
+   * @since 2.22.0
+   * @screenshot views/search/CatalogSearchView.png
+   */
+  return Backbone.View.extend(
+    /** @lends CatalogSearchView.prototype */ {
+      /**
+       * The type of View this is
+       * @type {string}
+       * @since 2.22.0
+       */
+      type: "CatalogSearch",
+
+      /**
+       * The HTML tag to use for this view's element
+       * @type {string}
+       * @since 2.22.0
+       */
+      tagName: "section",
+
+      /**
+       * The HTML classes to use for this view's element
+       * @type {string}
+       * @since 2.22.0
+       */
+      className: "catalog",
+
+      /**
+       * The template to use for this view's element
+       * @type {underscore.template}
+       * @since 2.22.0
+       */
+      template: _.template(Template),
+
+      /**
+       * The template to use in case there is a major error in rendering the
+       * view.
+       * @type {string}
+       * @since 2.25.0
+       */
+      errorTemplate: `<div class="error" role="alert">
+        <h2>There was an error loading the search results.</h2>
+        <p>Please try again later.</p>
+        </div>`,
+
+      /**
+       * Whether the map is displayed or hidden.
+       * @type boolean
+       * @since 2.25.0
+       * @default true
+       */
+      mapVisible: true,
+
+      /**
+       * Whether the filters are displayed or hidden.
+       * @type boolean
+       * @since 2.25.0
+       * @default true
+       */
+      filtersVisible: true,
+
+      /**
+       * Whether to limit the search to the extent of the map. If true, the
+       * search will update when the user pans or zooms the map.
+       * @type {boolean}
+       * @since 2.25.0
+       * @default true
+       */
+      limitSearchToMapArea: true,
+
+      /**
+       * The View that displays the search results. The render method will be
+       * attach the search results view to the
+       * {@link CatalogSearchView#searchResultsContainer} element and will add
+       * the view reference to this property.
+       * @type {SearchResultsView}
+       * @since 2.22.0
+       */
+      searchResultsView: null,
+
+      /**
+       * The view that shows the search filters. The render method will attach
+       * the filter groups view to the
+       * {@link CatalogSearchView#filterGroupsContainer} element and will add
+       * the view reference to this property.
+       * @type {FilterGroupsView}
+       * @since 2.22.0
+       */
+      filterGroupsView: null,
+
+      /**
+       * The view that shows the number of pages and allows the user to navigate
+       * between them. The render method will attach the pager view to the
+       * {@link CatalogSearchView#pagerContainer} element and will add the view
+       * reference to this property.
+       * @type {PagerView}
+       * @since 2.22.0
+       */
+      pagerView: null,
+
+      /**
+       * The view that handles sorting the search results. The render method
+       * will attach the sorter view to the
+       * {@link CatalogSearchView#sorterContainer} element and will add the view
+       * reference to this property.
+       * @type {SorterView}
+       * @since 2.22.0
+       */
+      sorterView: null,
+
+      /**
+       * The CSS class to add to the body element when this view is rendered.
+       * @type {string}
+       * @since 2.22.0
+       * @default "catalog-search-body",
+       */
+      bodyClass: "catalog-search-body",
+
+      /**
+       * The jQuery selector for the FilterGroupsView container
+       * @type {string}
+       * @since 2.22.0
+       */
+      filterGroupsContainer: ".catalog__filters",
+
+      /**
+       * The query selector for the SearchResultsView container
+       * @type {string}
+       * @since 2.22.0
+       */
+      searchResultsContainer: ".catalog__results-list",
+
+      /**
+       * The query selector for the CesiumWidgetView container
+       * @type {string}
+       * @since 2.22.0
+       */
+      mapContainer: ".catalog__map",
+
+      /**
+       * The query selector for the PagerView container
+       * @type {string}
+       * @since 2.22.0
+       */
+      pagerContainer: ".catalog__pager",
+
+      /**
+       * The query selector for the SorterView container
+       * @type {string}
+       * @since 2.22.0
+       */
+      sorterContainer: ".catalog__sorter",
+
+      /**
+       * The query selector for the title container
+       * @type {string}
+       * @since 2.22.0
+       */
+      titleContainer: ".catalog__summary",
+
+      /**
+       * The query selector for button that is used to either show or hide the
+       * map.
+       * @type {string}
+       * @since 2.22.0
+       */
+      toggleMapButton: ".catalog__map-toggle",
+
+      /**
+       * The query selector for the label that is used to describe the
+       * {@link CatalogSearchView#toggleMapButton}.
+       * @type {string}
+       * @since 2.25.0
+       * @default "#toggle-map-label"
+       */
+      toggleMapLabel: "#toggle-map-label",
+
+      /**
+       * The query selector for the button that is used to either show or hide
+       * the filters.
+       * @type {string}
+       * @since 2.25.0
+       */
+      toggleFiltersButton: ".catalog__filters-toggle",
+
+      /**
+       * The query selector for the label that is used to describe the
+       * {@link CatalogSearchView#toggleFiltersButton}.
+       * @type {string}
+       * @since 2.25.0
+       * @default "#toggle-map-label"
+       */
+      toggleFiltersLabel: "#toggle-filters-label",
+
+      /**
+       * The query selector for the button that is used to turn on or off
+       * spatial filtering by map extent.
+       * @type {string}
+       * @since 2.25.0
+       */
+      mapFilterToggle: ".catalog__map-filter-toggle",
+
+      /**
+       * The CSS class (not selector) to add to the body element when the map is
+       * hidden.
+       * @type {string}
+       * @since 2.25.0
+       */
+      hideMapClass: "catalog--map-hidden",
+
+      /**
+       * The CSS class (not selector) to add to the body element when the
+       * filters are hidden.
+       * @type {string}
+       * @since 2.25.0
+       */
+      hideFiltersClass: "catalog--filters-hidden",
+
+      /**
+       * The events this view will listen to and the associated function to
+       * call.
+       * @type {Object}
+       * @since 2.22.0
+       */
+      events: function () {
+        const e = {};
+        e[`click ${this.mapFilterToggle}`] = "toggleMapFilter";
+        e[`click ${this.toggleMapButton}`] = "toggleMapVisibility";
+        e[`click ${this.toggleFiltersButton}`] = "toggleFiltersVisibility";
+        return e;
+      },
+
+      /**
+       * Initialize the view. In addition to the options described below, any
+       * option that is available in the
+       * {@link MapSearchFiltersConnector#initialize} method can be passed to
+       * this view, such as Map, SolrResult, and FilterGroup models, and whether
+       * to create a geohash layer or spatial filter if they are not present.
+       * @param {Object} options - The options for this view.
+       * @param {string} [options.initialQuery] - The initial text query to run
+       * when the view is rendered.
+       * @param {MapSearchFiltersConnector} [options.model] - A
+       * MapSearchFiltersConnector model to use for this view. If not provided,
+       * a new one will be created. If one is provided, then other options that
+       * would be passed to the MapSearchFiltersConnector model will be ignored
+       * (such as map, searchResults, filterGroups, catalogSearch, etc.)
+       * @since 2.25.0
+       */
+      initialize: function (options) {
+        this.cssID = "catalogSearchView";
+        MetacatUI.appModel.addCSS(CatalogSearchViewCSS, this.cssID);
+
+        if (!options) options = {};
+
+        this.initialQuery = options.initialQuery || null;
+
+        let model = options.model;
+        if (!model) {
+          const app = MetacatUI.appModel;
+          model = new MapSearchFiltersConnector({
+            map: options.map || app.get("catalogSearchMapOptions"),
+            searchResults: options.searchResults || null,
+            filterGroups:
+              options.filterGroups || app.get("defaultFilterGroups"),
+            catalogSearch: options.catalogSearch !== false,
+            addGeohashLayer: options.addGeohashLayer !== false,
+            addSpatialFilter: options.addSpatialFilter !== false,
+          });
+        }
+        model.connect();
+        this.model = model;
+      },
+
+      /**
+       * Renders the view
+       * @since 2.22.0
+       */
+      render: function () {
+        // Set the search mode - either map or list
+        this.setMapVisibility();
+
+        // Set up the view for styling and layout
         this.setupView();
 
-        //Set up the search and search result models
-        this.setupSearch();
-
-        //Render the search components
+        // Render the search components
         this.renderComponents();
-
-    },
-
-    /**
-     * Sets up the basic components of this view
-     */
-    setupView: function(){
-        document.querySelector("body").classList.add(`catalog-search-body`, `${this.mode}Mode`);
-
-        //Add LinkedData to the page
-        this.addLinkedData();
-
-        this.$el.html(this.template);
-    },
-
-    /**
-     * Sets the search mode (map or list)
-     * @since 2.22.0
-     */
-    setMode: function(){
-        //Get the search mode - either "map" or "list"
-        if (((typeof this.mode === "undefined") || !this.mode) && (MetacatUI.appModel.get("enableCesium"))) {
-            this.mode = "map";
+      },
+
+      /**
+       * Indicates that there was a problem rendering this view.
+       * @since 2.25.0
+       */
+      renderError: function () {
+        this.$el.html(this.errorTemplate);
+      },
+
+      /**
+       * Sets the search mode (map or list)
+       * @since 2.22.0
+       */
+      setMapVisibility: function () {
+        try {
+          if (
+            typeof this.mapVisible === "undefined" &&
+            MetacatUI.appModel.get("enableCesium")
+          ) {
+            this.mapVisible = true;
+          }
+
+          // Use map mode on tablets and browsers only. TODO: should we set a
+          // listener for window resize?
+          if ($(window).outerWidth() <= 600) {
+            this.mapVisible = false;
+          }
+        } catch (e) {
+          console.error(
+            "Error setting the search mode, defaulting to list:" + e
+          );
+          this.mapVisible = false;
         }
-
-        // Use map mode on tablets and browsers only
-        if ($(window).outerWidth() <= 600) {
-            this.mode = "list";
+        this.toggleMapVisibility(this.mapVisible);
+      },
+
+      /**
+       * Sets up the basic components of this view
+       * @since 2.22.0
+       */
+      setupView: function () {
+        try {
+          // The body class modifies the entire page layout to accommodate the
+          // catalog search view
+          if (!this.isSubView) {
+            MetacatUI.appModel.set("headerType", "default");
+            document.querySelector("body").classList.add(this.bodyClass);
+          } else {
+            // TODO: Set up styling for sub-view version of the catalog
+          }
+
+          // Add LinkedData to the page
+          this.addLinkedData();
+
+          // Render the template
+          this.$el.html(this.template({}));
+        } catch (e) {
+          console.log(
+            "There was an error setting up the CatalogSearchView:" + e
+          );
+          this.renderError();
         }
-    },
-
-    renderComponents: function(){
-        this.renderFilters();
-
-        //Render the list of search results
-        this.renderSearchResults();
-
-        //Render the Title
-        this.renderTitle();
-        this.listenTo(this.searchResultsView.searchResults, "reset", this.renderTitle);
-
-        //Render Pager
-        this.renderPager();
-
-        //Render Sorter
-        this.renderSorter();
-
-        //Render Cesium
-        this.renderMap();
-    },
-
-    /**
-     * Renders the search filters
-     * @since 2.22.0
-     */
-    renderFilters: function(){
-        //Render FilterGroups
-        this.filterGroupsView = new FilterGroupsView({
-            filterGroups: this.filterGroups,
-            filters: this.connector?.get("filters"),
+      },
+
+      /**
+       * Calls other methods that insert the sub-views into the DOM and render
+       * them.
+       * @since 2.22.0
+       */
+      renderComponents: function () {
+        try {
+          this.createSearchResults();
+
+          this.createMap();
+
+          this.renderFilters();
+
+          // Render the list of search results
+          this.renderSearchResults();
+
+          // Render the Title
+          this.renderTitle();
+          this.listenTo(
+            this.model.get("searchResults"),
+            "reset",
+            this.renderTitle
+          );
+
+          // Render Pager
+          this.renderPager();
+
+          // Render Sorter
+          this.renderSorter();
+
+          // Render Cesium
+          this.renderMap();
+        } catch (e) {
+          console.log(
+            "There was an error rendering the CatalogSearchView:" + e
+          );
+          this.renderError();
+        }
+      },
+
+      /**
+       * Renders the search filters
+       * @since 2.22.0
+       */
+      renderFilters: function () {
+        try {
+          // Render FilterGroups
+          this.filterGroupsView = new FilterGroupsView({
+            filterGroups: this.model.get("filterGroups"),
+            filters: this.model.get("filters"),
             vertical: true,
-            parentView: this
-        });
-
-        //Add the FilterGroupsView element to this view
-        this.$(this.filterGroupsContainer).html(this.filterGroupsView.el);
-
-        //Render the FilterGroupsView
-        this.filterGroupsView.render();
-    },
-
-    /**
-     * Creates the SearchResultsView and saves a reference to the SolrResults collection
-     * @since 2.22.0
-     */
-    createSearchResults: function(){
-        this.searchResultsView = new SearchResultsView();
-
-        if( this.connector ){
-            this.searchResultsView.searchResults = this.connector.get("searchResults");
+            parentView: this,
+            initialQuery: this.initialQuery,
+            collapsible: true,
+          });
+
+          // Add the FilterGroupsView element to this view
+          this.$(this.filterGroupsContainer).html(this.filterGroupsView.el);
+
+          // Render the FilterGroupsView
+          this.filterGroupsView.render();
+        } catch (e) {
+          console.log("There was an error rendering the FilterGroupsView:" + e);
         }
-    },
-
-    /**
-     * Renders the search result list
-     * @since 2.22.0
-     */
-    renderSearchResults: function(){
-        if(!this.searchResultsView) return;
-
-        //Add the view element to this view
-        this.$(this.searchResultsContainer).html(this.searchResultsView.el);
-
-        //Render the view
-        this.searchResultsView.render();
-    },
-
-    /**
-     * Creates a PagerView and adds it to the page.
-     * @since 2.22.0
-     */
-    renderPager: function(){
-        this.pagerView = new PagerView();
-        
-        //Give the PagerView the SearchResults to listen to and update
-        this.pagerView.searchResults = this.searchResultsView.searchResults;
-
-        //Add the pager view to the page
-        this.el.querySelector(this.pagerContainer).replaceChildren(this.pagerView.el);
-
-        //Render the pager view
-        this.pagerView.render();
-    },
-
-    /**
-     * Creates a SorterView and adds it to the page.
-     * @since 2.22.0
-     */
-    renderSorter: function(){
-        this.sorterView = new SorterView();
-        
-        //Give the SorterView the SearchResults to listen to and update
-        this.sorterView.searchResults = this.searchResultsView.searchResults;
-
-        //Add the sorter view to the page
-        this.el.querySelector(this.sorterContainer).replaceChildren(this.sorterView.el);
-
-        //Render the sorter view
-        this.sorterView.render();
-    },
-
-    /**
-    * Constructs an HTML string of the title of this view
-    * @param {number} start 
-    * @param {number} end 
-    * @param {number} numFound 
-    * @returns {string}
-    * @since 2.22.0
-    */
-    titleTemplate: function(start, end, numFound){
-        let html = `<div id="statcounts"><h5 class="result-header-count bold-header" id="countstats"><span>${MetacatUI.appView.commaSeparateNumber(start)}</span> to <span>${MetacatUI.appView.commaSeparateNumber(end)}</span>`;
-        
-        if(typeof numFound == "number"){
-            html += ` of <span>${MetacatUI.appView.commaSeparateNumber(numFound)}</span>`;
+      },
+
+      /**
+       * Creates the SearchResultsView and saves a reference to the SolrResults
+       * collection
+       * @since 2.22.0
+       */
+      createSearchResults: function () {
+        try {
+          this.searchResultsView = new SearchResultsView();
+          this.searchResultsView.searchResults =
+            this.model.get("searchResults");
+        } catch (e) {
+          console.log("There was an error creating the SearchResultsView:" + e);
         }
-
-        html += `</h5></div>`;
-        return html;
-    },
-
-    /**
-     * Updates the view title using the {@link CatalogSearchView#searchResults} data.
-     * @since 2.22.0
-     */
-    renderTitle: function(){
-        let titleEl = this.el.querySelector(this.titleContainer);
-        
-        if(!titleEl){
+      },
+
+      /**
+       * Renders the search result list
+       * @since 2.22.0
+       */
+      renderSearchResults: function () {
+        try {
+          if (!this.searchResultsView) return;
+
+          // Add the view element to this view
+          this.$(this.searchResultsContainer).html(this.searchResultsView.el);
+
+          // Render the view
+          this.searchResultsView.render();
+        } catch (e) {
+          console.log(
+            "There was an error rendering the SearchResultsView:" + e
+          );
+        }
+      },
+
+      /**
+       * Creates a PagerView and adds it to the page.
+       * @since 2.22.0
+       */
+      renderPager: function () {
+        try {
+          this.pagerView = new PagerView();
+
+          // Give the PagerView the SearchResults to listen to and update
+          this.pagerView.searchResults = this.model.get("searchResults");
+
+          // Add the pager view to the page
+          this.el
+            .querySelector(this.pagerContainer)
+            .replaceChildren(this.pagerView.el);
+
+          // Render the pager view
+          this.pagerView.render();
+        } catch (e) {
+          console.log("There was an error rendering the PagerView:" + e);
+        }
+      },
+
+      /**
+       * Creates a SorterView and adds it to the page.
+       * @since 2.22.0
+       */
+      renderSorter: function () {
+        try {
+          this.sorterView = new SorterView();
+
+          // Give the SorterView the SearchResults to listen to and update
+          this.sorterView.searchResults = this.model.get("searchResults");
+
+          // Add the sorter view to the page
+          this.el
+            .querySelector(this.sorterContainer)
+            .replaceChildren(this.sorterView.el);
+
+          // Render the sorter view
+          this.sorterView.render();
+        } catch (e) {
+          console.log("There was an error rendering the SorterView:" + e);
+        }
+      },
+
+      /**
+       * Constructs an HTML string of the title of this view
+       * @param {number} start
+       * @param {number} end
+       * @param {number} numFound
+       * @returns {string}
+       * @since 2.22.0
+       */
+      titleTemplate: function (start, end, numFound) {
+        try {
+          let content = "";
+          const csn = MetacatUI.appView.commaSeparateNumber;
+          if (numFound < end) end = numFound;
+
+          if (numFound > 0) {
+            content = `<span>${csn(start)}</span> to <span>${csn(end)}</span>`;
+            if (typeof numFound == "number") {
+              content += ` of <span>${csn(numFound)}</span>`;
+            }
+          }
+          return `
+            <div id="statcounts">
+              <h5 class="result-header-count bold-header" id="countstats">
+              ${content}
+              </h5>
+            </div>`;
+        } catch (e) {
+          console.log("There was an error creating the title template:" + e);
+          return "";
+        }
+      },
+
+      /**
+       * Updates the view title using the
+       * {@link CatalogSearchView#searchResults} data.
+       * @since 2.22.0
+       */
+      renderTitle: function () {
+        try {
+          const searchResults = this.model.get("searchResults");
+          let titleEl = this.el.querySelector(this.titleContainer);
+
+          if (!titleEl) {
             titleEl = document.createElement("div");
             titleEl.classList.add("title-container");
             this.el.prepend(titleEl);
-        }
-
-        titleEl.innerHTML="";
-        
-        let title = this.titleTemplate(this.searchResultsView.searchResults.getStart()+1, this.searchResultsView.searchResults.getEnd()+1, this.searchResultsView.searchResults.getNumFound());
-
-        titleEl.insertAdjacentHTML("beforeend", title);
-
-    },
-
-    /**
-     * Creates the Filter models and SolrResults that will be used for searches
-     * @since 2.22.0
-     */
-    setupSearch: function(){
-
-        //Get an array of all Filter models
-        let allFilters = [];
-        this.filterGroups = this.createFilterGroups();
-        this.filterGroups.forEach(group => {
-            allFilters = allFilters.concat(group.get("filters")?.models);
-        });
-
-        //Connect the filters to the search and search results
-        let connector = new FiltersSearchConnector({ filtersList: allFilters });
-        this.connector = connector;
-        connector.startListening();
+          }
 
-        this.createSearchResults();
+          titleEl.innerHTML = "";
 
-        this.createMap();
-    },
+          let title = this.titleTemplate(
+            searchResults.getStart() + 1,
+            searchResults.getEnd() + 1,
+            searchResults.getNumFound()
+          );
 
-    /**
-    * Creates UI Filter Groups. UI Filter Groups
-    * are custom, interactive search filter elements, grouped together in one
-    * panel, section, tab, etc.
-    * @param {FilterGroup#defaults[]} filterGroupsJSON An array of literal objects to transform into FilterGroup models. These FilterGroups will be displayed in this view and used for searching. If not provided, the {@link AppConfig#defaultFilterGroups} will be used.
-    * @since 2.22.0
-    */
-    createFilterGroups: function(filterGroupsJSON=this.filterGroupsJSON){
-
-        try{
-            //Start an array for the FilterGroups and the individual Filter models
-            let filterGroups = [];
-
-            //Iterate over each default FilterGroup in the app config and create a FilterGroup model
-            (filterGroupsJSON || MetacatUI.appModel.get("defaultFilterGroups")).forEach( filterGroupJSON => {
-
-                //Create the FilterGroup model
-                //Add to the array
-                filterGroups.push(new FilterGroup(filterGroupJSON));
-
-            });
-
-            return filterGroups;
+          titleEl.insertAdjacentHTML("beforeend", title);
+        } catch (e) {
+          console.log("There was an error rendering the title:" + e);
         }
-        catch(e){
-            console.error("Couldn't create Filter Groups in search. ", e)
+      },
+
+      /**
+       * Create the models and views associated with the map and map search
+       * @since 2.22.0
+       */
+      createMap: function () {
+        try {
+          this.mapView = new MapView({ model: this.model.get("map") });
+        } catch (e) {
+          console.error("Couldn't create map in search. ", e);
+          this.toggleMapVisibility(false);
         }
-
-    },
-
-    /**
-     * Create the models and views associated with the map and map search
-     * @since 2.22.0
-     */
-    createMap: function(){
-        let mapOptions = Object.assign({}, MetacatUI.appModel.get("catalogSearchMapOptions") || {});
-        let map = new Map(mapOptions);
-
-        //Add a CesiumGeohash layer to the map
-       /* let geohashLayer = new CesiumGeohash();
-        geohashLayer.
-        let assets = map.get("layers");
-        assets.add(geohashLayer);
-*/
-
-        let geohashLayer = map.get("layers").findWhere({type: "CesiumGeohash"})
-
-        //Connect the CesiumGeohash to the SolrResults
-        let connector = new GeohashSearchConnector({
-            cesiumGeohash: geohashLayer,
-            searchResults: this.searchResultsView.searchResults
-        });
-        connector.startListening();
-        this.geohashSearchConnector = connector;
-
-        //Set the geohash level for the search
-        if( Array.isArray(this.searchResultsView.searchResults.facet) ) 
-            this.searchResultsView.searchResults.facet.push("geohash_" + geohashLayer.get("geohashLevel"));
-        else
-            this.searchResultsView.searchResults.facet = "geohash_" + geohashLayer.get("geohashLevel");
-        
-        //Create the Map model and view
-        this.mapView = new MapView({ model: map });
-    },
-
-    /**
-     * Renders the Cesium map with a geohash layer
-     * @since 2.22.0
-     */
-    renderMap: function(){
-        //Add the map to the page and render it
-        this.$(this.mapContainer).empty().append(this.mapView.el);
-        this.mapView.render();        
-    },
-
-     /**
-      * Linked Data Object for appending the jsonld into the browser DOM 
-      * @since 2.22.0
-      * */ 
-     addLinkedData: function() {
-
-        // JSON Linked Data Object
-        let elJSON = {
+      },
+
+      /**
+       * Renders the Cesium map with a geohash layer
+       * @since 2.22.0
+       */
+      renderMap: function () {
+        try {
+          // Add the map to the page and render it
+          this.$(this.mapContainer).append(this.mapView.el);
+          this.mapView.render();
+        } catch (e) {
+          console.error("Couldn't render map in search. ", e);
+          this.toggleMapVisibility(false);
+        }
+      },
+
+      /**
+       * Linked Data Object for appending the jsonld into the browser DOM
+       * @since 2.22.0
+       */
+      addLinkedData: function () {
+        try {
+          // JSON Linked Data Object
+          let elJSON = {
             "@context": {
-                "@vocab": "http://schema.org/"
+              "@vocab": "http://schema.org/",
             },
             "@type": "DataCatalog",
-        }
+          };
 
-        // Find the MN info from the CN Node list
-        let members = MetacatUI.nodeModel.get("members"),
+          // Find the MN info from the CN Node list
+          let members = MetacatUI.nodeModel.get("members"),
             nodeModelObject;
 
-        for (let i = 0; i < members.length; i++) {
-            if (members[i].identifier == MetacatUI.nodeModel.get("currentMemberNode")) {
-                nodeModelObject = members[i];
+          for (let i = 0; i < members.length; i++) {
+            if (
+              members[i].identifier ==
+              MetacatUI.nodeModel.get("currentMemberNode")
+            ) {
+              nodeModelObject = members[i];
             }
-        }
-        if (nodeModelObject) {
-            // "keywords": "",
-            // "provider": "",
+          }
+          if (nodeModelObject) {
+            // "keywords": "", "provider": "",
             let conditionalData = {
-                "description": nodeModelObject.description,
-                "identifier": nodeModelObject.identifier,
-                "image": nodeModelObject.logo,
-                "name": nodeModelObject.name,
-                "url": nodeModelObject.url
-            }
+              description: nodeModelObject.description,
+              identifier: nodeModelObject.identifier,
+              image: nodeModelObject.logo,
+              name: nodeModelObject.name,
+              url: nodeModelObject.url,
+            };
             $.extend(elJSON, conditionalData);
-        }
+          }
 
-
-        // Check if the jsonld already exists from the previous data view
-        // If not create a new script tag and append otherwise replace the text for the script
-        if (!document.getElementById("jsonld")) {
+          // Check if the jsonld already exists from the previous data view If
+          // not create a new script tag and append otherwise replace the text
+          // for the script
+          if (!document.getElementById("jsonld")) {
             var el = document.createElement("script");
             el.type = "application/ld+json";
             el.id = "jsonld";
             el.text = JSON.stringify(elJSON);
             document.querySelector("head").appendChild(el);
-        } else {
+          } else {
             var script = document.getElementById("jsonld");
             script.text = JSON.stringify(elJSON);
+          }
+        } catch (e) {
+          console.error("Couldn't add linked data to search. ", e);
         }
-    },
-
-    /**
-     * Toggles between map and list search mode
-     * @since 2.22.0
-     */
-    toggleMode: function(){
-
-        let classList = document.querySelector("body").classList;
-
-        if(this.mode == "map"){
-            this.mode = "list";
-            classList.remove("mapMode");
-            classList.add("listMode")
+      },
+
+      /**
+       * Shows or hide the filters
+       * @param {boolean} show - Optionally provide the desired choice of
+       * whether the filters should be shown (true) or hidden (false). If not
+       * provided, the opposite of the current mode will be used.
+       * @since 2.25.0
+       */
+      toggleFiltersVisibility: function (show) {
+        try {
+          const classList = document.querySelector("body").classList;
+
+          // If the new mode is not provided, the new mode is the opposite of
+          // the current mode
+          show = typeof show == "boolean" ? show : !this.filtersVisible;
+          const hideFiltersClass = this.hideFiltersClass;
+
+          if (show) {
+            this.filtersVisible = true;
+            classList.remove(hideFiltersClass);
+          } else {
+            this.filtersVisible = false;
+            classList.add(hideFiltersClass);
+          }
+          this.updateToggleFiltersLabel();
+        } catch (e) {
+          console.error("Couldn't toggle filter visibility. ", e);
         }
-        else{
-            this.mode = "map";
-            classList.remove("listMode");
-            classList.add("mapMode")
+      },
+
+      /**
+       * Show or hide the map
+       * @param {boolean} show - Optionally provide the desired choice of
+       * whether the filters should be shown (true) or hidden (false). If not
+       * provided, the opposite of the current mode will be used. (Set to true
+       * to show map, false to hide it.)
+       * @since 2.25.0
+       */
+      toggleMapVisibility: function (show) {
+        try {
+          // If the new mode is not provided, the new mode is the opposite of
+          // the current mode
+          show = typeof show == "boolean" ? show : !this.mapVisible;
+          const classList = document.querySelector("body").classList;
+          const hideMapClass = this.hideMapClass;
+
+          if (show) {
+            this.mapVisible = true;
+            classList.remove(hideMapClass);
+          } else {
+            this.mapVisible = false;
+            classList.add(hideMapClass);
+          }
+          this.updateToggleMapLabel();
+        } catch (e) {
+          console.error("Couldn't toggle search mode. ", e);
         }
-
-    },
-
-    onClose: function(){
-        document.querySelector("body").classList.remove(`catalog-search-body`, `${this.mode}Mode`); 
-        
-        //Remove the JSON-LD from the page
-        document.getElementById("jsonld")?.remove();
+      },
+
+      /**
+       * Change the content of the map toggle label to indicate whether
+       * clicking the button will show or hide the map.
+       * @since 2.25.0
+       */
+      updateToggleMapLabel: function () {
+        try {
+          const toggleMapLabel = this.el.querySelector(this.toggleMapLabel);
+          const toggleMapButton = this.el.querySelector(this.toggleMapButton);
+          if (this.mapVisible) {
+            if (toggleMapLabel) {
+              toggleMapLabel.innerHTML =
+                'Hide Map <i class="icon icon-angle-right"></i>';
+            }
+            if (toggleMapButton) {
+              toggleMapButton.innerHTML =
+                '<i class="icon icon-double-angle-right"></i>';
+            }
+          } else {
+            if (toggleMapLabel) {
+              toggleMapLabel.innerHTML =
+                '<i class="icon icon-globe"></i> Show Map <i class="icon icon-angle-left"></i>';
+            }
+            if (toggleMapButton) {
+              toggleMapButton.innerHTML = '<i class="icon icon-globe"></i>';
+            }
+          }
+        } catch (e) {
+          console.log("Couldn't update map toggle. ", e);
+        }
+      },
+
+      /**
+       * Change the content of the filters toggle label to indicate whether
+       * clicking the button will show or hide the filters.
+       * @since 2.25.0
+       */
+      updateToggleFiltersLabel: function () {
+        try {
+          const toggleFiltersLabel = this.el.querySelector(
+            this.toggleFiltersLabel
+          );
+          const toggleFiltersButton = this.el.querySelector(
+            this.toggleFiltersButton
+          );
+          if (this.filtersVisible) {
+            if (toggleFiltersLabel) {
+              toggleFiltersLabel.innerHTML =
+                'Hide Filters <i class="icon icon-angle-left"></i>';
+            }
+            if (toggleFiltersButton) {
+              toggleFiltersButton.innerHTML =
+                '<i class="icon icon-double-angle-left"></i>';
+            }
+          } else {
+            if (toggleFiltersLabel) {
+              toggleFiltersLabel.innerHTML =
+                '<i class="icon icon-filter"></i> Show Filters <i class="icon icon-angle-right"></i>';
+            }
+            if (toggleFiltersButton) {
+              toggleFiltersButton.innerHTML =
+                '<i class="icon icon-filter"></i>';
+            }
+          }
+        } catch (e) {
+          console.log("Couldn't update filters toggle. ", e);
+        }
+      },
+
+      /**
+       * Toggles the map filter on and off
+       * @param {boolean} newSetting - Optionally provide the desired new mode
+       * to switch to. true = limit search to map area, false = do not limit
+       * search to map area. If not provided, the opposite of the current mode
+       * will be used.
+       * @since 2.25.0
+       */
+      toggleMapFilter: function (newSetting) {
+        // Make sure the new setting is a boolean
+        newSetting =
+          typeof newSetting != "boolean"
+            ? !this.limitSearchToMapArea // the opposite of the current mode
+            : newSetting; // the provided new mode if it is a boolean
+
+        if (newSetting) {
+          // If true, then the filter should be ON
+          this.model.connectFiltersMap();
+        } else {
+          // If false, then the filter should be OFF
+          this.model.disconnectFiltersMap(true);
+        }
+        this.limitSearchToMapArea = newSetting;
+      },
+
+      /**
+       * Tasks to perform when the view is closed
+       * @since 2.22.0
+       */
+      onClose: function () {
+        try {
+          MetacatUI.appModel.removeCSS(this.cssID);
+          document
+            .querySelector("body")
+            .classList.remove(this.bodyClass, this.hideMapClass);
+
+          // Remove the JSON-LD from the page
+          document.getElementById("jsonld")?.remove();
+        } catch (e) {
+          console.error("Couldn't close search view. ", e);
+        }
+      },
     }
-
+  );
 });
-
-});
+
diff --git a/docs/docs/src_js_views_search_SearchResultView.js.html b/docs/docs/src_js_views_search_SearchResultView.js.html new file mode 100644 index 000000000..0ed1c7a22 --- /dev/null +++ b/docs/docs/src_js_views_search_SearchResultView.js.html @@ -0,0 +1,621 @@ + + + + + MetacatUI Dev Docs: Source: src/js/views/search/SearchResultView.js + + + + + + + + + + + + + + +
+ +

Source: src/js/views/search/SearchResultView.js

+ + + + + + +
+
+
/*global define */
+define([
+  "jquery",
+  "underscore",
+  "backbone",
+  "models/PackageModel",
+  "views/CitationView",
+  "text!templates/resultsItem.html",
+], function ($, _, Backbone, Package, CitationView, ResultItemTemplate) {
+  "use strict";
+
+  /**
+   * @class SearchResultView
+   * @classdesc A single result item view
+   * @name SearchResultView
+   * @classcategory Views
+   * @extends Backbone.View
+   * @constructor
+   * @screenshot views/search/SearchResultView.png
+   */
+  return Backbone.View.extend(
+    /**
+     * @lends SearchResultView.prototype
+     */ {
+      /**
+       * The tag name for the view's element
+       * @type {string}
+       */
+      tagName: "div",
+
+      /**
+       * The HTML classes to use for this view's element
+       * @type {string}
+       */
+      className: "row-fluid result-row",
+
+      /**
+       * The HTML template to use for this view's main element
+       * @type {underscore.template}
+       */
+      template: _.template(ResultItemTemplate),
+
+      /**
+       * The HTML template to use for the metrics statics
+       * @type {underscore.template}
+       */
+      metricStatTemplate: _.template(
+        `<span class='catalog badge'>
+          <i class='catalog-metric-icon <%=metricIcon%>'></i> <%=metricValue%>
+        </span>`
+      ),
+
+      /**
+       * The HTML template to use when showing that a result item is loading
+       * @type {string}
+       */
+      loadingTemplate: `
+        <div class="result-row-loading">
+          <div class="citation-loading"></div>
+          <div class="circles-loading">
+            <div class="circle-loading"></div>
+            <div class="circle-loading"></div>
+            <div class="circle-loading"></div>
+            <div class="circle-loading"></div>
+          </div>
+        </div>`,
+
+      /**
+       * The events this view will listen to and the associated function to
+       * call.
+       * @type {Object}
+       */
+      events: {
+        "click .result-selection": "toggleSelected",
+        "click .download": "download",
+        "mouseover .open-marker": "toggleShowOnMap",
+        "mouseout .open-marker": "toggleShowOnMap",
+      },
+
+      /**
+       * Initialize the view. The SearchResultView listens for changes to its
+       * model, re-rendering. Since there's a one-to-one correspondence between
+       * a **SolrResult** and a **SearchResultView** in this app, we set a
+       * direct reference on the model for convenience.
+       * @param {*} options
+       */
+      initialize: function (options) {
+        if (typeof options !== "object") {
+          var options = {};
+        }
+
+        this.stopListening(this.model, "change", this.render);
+        this.stopListening(this.model, "reset", this.render);
+        this.listenTo(this.model, "change", this.render);
+        this.listenTo(this.model, "reset", this.render);
+        // this.listenTo(this.model, 'destroy', this.remove);
+        // this.listenTo(this.model, 'visible', this.toggleVisible);
+
+        if (typeof options.metricsModel !== "undefined")
+          this.metricsModel = options.metricsModel;
+
+        if (typeof options.className !== "undefined") {
+          this.className = options.className;
+        }
+
+        if (typeof options.template !== "undefined") {
+          this.template = options.template;
+        }
+      },
+
+      /**
+       * Render or re-render the result item.
+       * @returns {SearchResultView} Returns this view
+       */
+      render: function () {
+        if (!this.model) {
+          return;
+        }
+
+        // Convert the model to JSON and create the result row from the template
+        var json = this.model.toJSON();
+
+        // Add other attributes to the JSON to send to the template
+
+        // Determine if there is a prov trace
+        json.hasProv = this.model.hasProvTrace();
+
+        // Add flag to add in annotation icon in results item view if
+        // appropriate
+        json.hasAnnotations =
+          json.sem_annotation &&
+          json.sem_annotation.length &&
+          json.sem_annotation.length > 0;
+
+        json.showAnnotationIndicator = MetacatUI.appModel.get(
+          "showAnnotationIndicator"
+        );
+
+        // Find the member node object
+        json.memberNode = _.findWhere(MetacatUI.nodeModel.get("members"), {
+          identifier: this.model.get("datasource"),
+        });
+
+        // Figure out if this object is a collection or portal
+        var isCollection =
+          this.model.getType() == "collection" ||
+          this.model.getType() == "portal";
+
+        // Determine if this metadata doc documents any data files
+        if (Array.isArray(json.documents) && json.documents.length) {
+          var dataFileIDs = _.without(
+            json.documents,
+            this.model.get("id"),
+            this.model.get("seriesId"),
+            this.model.get("resourceMap")
+          );
+          json.numDataFiles = dataFileIDs.length;
+          json.dataFilesMessage =
+            "This dataset contains " + json.numDataFiles + " data file";
+          if (json.numDataFiles > 1) {
+            json.dataFilesMessage += "s";
+          }
+        } else {
+          json.numDataFiles = 0;
+          json.dataFilesMessage = "This dataset doesn't contain any data files";
+        }
+
+        if (MetacatUI.appModel.get("displayRepoLogosInSearchResults")) {
+          // If this result has a logo and it is not a URL, assume it is an ID
+          // and create a full URL
+          if (json.logo && !json.logo.startsWith("http")) {
+            json.logo = MetacatUI.appModel.get("objectServiceUrl") + json.logo;
+          }
+
+          var datasourceId = json.memberNode
+              ? json.memberNode.identifier
+              : json.datasource,
+            currentMemberNode =
+              MetacatUI.appModel.get("nodeId") || datasourceId;
+
+          // Construct a URL to the profile of this repository
+          json.profileURL =
+            datasourceId == currentMemberNode
+              ? MetacatUI.root + "/profile"
+              : MetacatUI.appModel.get("dataoneSearchUrl") +
+                "/portals/" +
+                datasourceId.replace("urn:node:", "");
+        }
+
+        //Create a URL that leads to a view of this object
+        json.viewURL = this.model.createViewURL();
+
+        var resultRow = this.template(json);
+        this.$el.html(resultRow);
+
+        //Create the citation
+        var citation = new CitationView({ metadata: this.model }).render().el;
+        var placeholder = this.$(".citation");
+        if (placeholder.length < 1) this.$el.append(citation);
+        else $(placeholder).replaceWith(citation);
+
+        //Create the OpenURL COinS
+        var span = this.getOpenURLCOinS();
+        this.$el.append(span);
+
+        if (
+          MetacatUI.appModel.get("displayDatasetMetrics") &&
+          this.metricsModel
+        ) {
+          if (this.metricsModel.get("views") !== null) {
+            // Display metrics if the model has already been fetched
+            this.displayMetrics();
+          } else if (this.metricsModel) {
+            // waiting for the fetch() call to succeed.
+            this.listenTo(this.metricsModel, "sync", this.displayMetrics);
+          }
+        }
+
+        if (isCollection) {
+          this.$el.addClass("collection");
+        }
+
+        //Save the id in the DOM for later use
+        var id = json.id;
+        this.$el.attr("data-id", id);
+
+        if (this.model.get("abstract")) {
+          var abridgedAbstract =
+            this.model.get("abstract").indexOf(" ", 250) < 0
+              ? this.model.get("abstract")
+              : this.model
+                  .get("abstract")
+                  .substring(0, this.model.get("abstract").indexOf(" ", 250)) +
+                "...";
+          var content = $(document.createElement("div")).append(
+            $(document.createElement("p")).text(abridgedAbstract)
+          );
+
+          this.$(".popover-this.abstract").popover({
+            trigger: "hover",
+            html: true,
+            content: content,
+            title: "Abstract",
+            placement: "top",
+            container: this.el,
+          });
+        } else {
+          this.$(".popover-this.abstract").addClass("inactive");
+          this.$(".icon.abstract").addClass("inactive");
+        }
+
+        return this;
+      },
+
+      displayMetrics: function () {
+        try {
+          // If metrics for this object should be hidden, exit the function
+          if (this.model.hideMetrics()) {
+            return;
+          }
+
+          var datasets = this.metricsModel.get("datasets");
+          var downloads = this.metricsModel.get("downloads");
+          var views = this.metricsModel.get("views");
+          var citations = this.metricsModel.get("citations");
+
+          // Initializing the metric counts
+          var viewCount = 0;
+          var downloadCount = 0;
+          var citationCount = 0;
+
+          // Get the individual dataset metics only if the response from Metrics
+          // Service API has non-zero array sizes
+          if (datasets && datasets.length > 0) {
+            var index = datasets.indexOf(this.model.get("id"));
+            viewCount = views[index];
+            downloadCount = downloads[index];
+            citationCount = citations[index];
+          }
+
+          // Generating tool-tip title Citations
+          if (citationCount == 1) {
+            var citationToolTip = citationCount + " citation";
+          } else {
+            var citationToolTip =
+              MetacatUI.appView.numberAbbreviator(citationCount, 1) +
+              " citations";
+          }
+
+          // Downloads
+          if (downloadCount == 1) {
+            var downloadToolTip = downloadCount + " download";
+          } else {
+            var downloadToolTip =
+              MetacatUI.appView.numberAbbreviator(downloadCount, 1) +
+              " downloads";
+          }
+
+          // Views
+          if (viewCount == 1) {
+            var viewToolTip = viewCount + " view";
+          } else {
+            var viewToolTip =
+              MetacatUI.appView.numberAbbreviator(viewCount, 1) + " views";
+          }
+
+          // Replacing the metric total count with the spinning icon.
+          this.$(".resultItem-CitationCount")
+            .html(
+              this.metricStatTemplate({
+                metricValue: MetacatUI.appView.numberAbbreviator(
+                  citationCount,
+                  1
+                ),
+                metricIcon: "icon-quote-right",
+              })
+            )
+            .tooltip({
+              placement: "top",
+              trigger: "hover",
+              delay: 800,
+              container: this.el,
+              title: citationToolTip,
+            });
+
+          this.$(".resultItem-DownloadCount")
+            .html(
+              this.metricStatTemplate({
+                metricValue: MetacatUI.appView.numberAbbreviator(
+                  downloadCount,
+                  1
+                ),
+                metricIcon: "icon-cloud-download",
+              })
+            )
+            .tooltip({
+              placement: "top",
+              trigger: "hover",
+              delay: 800,
+              container: this.el,
+              title: downloadToolTip,
+            });
+
+          this.$(".resultItem-ViewCount")
+            .html(
+              this.metricStatTemplate({
+                metricValue: MetacatUI.appView.numberAbbreviator(viewCount, 1),
+                metricIcon: "icon-eye-open",
+              })
+            )
+            .tooltip({
+              placement: "top",
+              trigger: "hover",
+              delay: 800,
+              container: this.el,
+              title: viewToolTip,
+            });
+
+          // Removing Citation metric if the citationCount is 0 or undefined
+          if (!citationCount) {
+            this.$(".resultItem-CitationCount").css("visibility", "hidden");
+          }
+
+          // Removing Download metric if the downloadCount is 0
+          if (!downloadCount) {
+            this.$(".resultItem-DownloadCount").css("visibility", "hidden");
+          }
+
+          // Removing View metric if the viewCount is 0
+          if (!viewCount) {
+            this.$(".resultItem-ViewCount").css("visibility", "hidden");
+          }
+        } catch (e) {
+          console.log("Error displaying metrics: " + e);
+        }
+      },
+
+      /**
+       * Toggles the selected state of the model
+       */
+      toggleSelected: function () {
+        this.model.toggle();
+      },
+
+      /**
+       * Toggles the showOnMap state of the model when the user hovers over
+       * or leaves the map marker icon
+       * @param {Event} e - The mouseover or mouseout event
+       */
+      toggleShowOnMap: function (e) {
+        this.model.set("showOnMap", e.type === "mouseover")
+      },
+
+      /**
+       * Navigates the app to the metadata page for a result item that was
+       * clicked on
+       * @param {*} e - The click event
+       */
+      routeToMetadata: function (e) {
+        var id = this.model.get("id");
+
+        //If the user clicked on a download button or any element with the class
+        //'stop-route', we don't want to navigate to the metadata
+        if (
+          $(e.target).hasClass("stop-route") ||
+          typeof id === "undefined" ||
+          !id
+        )
+          return;
+
+        MetacatUI.uiRouter.navigate("view/" + encodeURIComponent(id), {
+          trigger: true,
+        });
+      },
+
+      /**
+       * Downloads the data package for a result item that was clicked on
+       * @param {*} e - The click event
+       */
+      download: function (e) {
+        if (
+          MetacatUI.appUserModel.get("loggedIn") &&
+          !this.model.get("isPublic")
+        ) {
+          if (e) {
+            e.preventDefault();
+            var packageId =
+              $(e.target).attr("data-id") || this.model.get("resourceMap");
+          } else var packageId = this.model.get("resourceMap");
+
+          var fileName = this.model.get("fileName") || this.model.get("title");
+
+          // Download the entire package if there is one
+          if (packageId) {
+            // If there is more than one resource map, download all of them
+            if (Array.isArray(packageId)) {
+              for (var i = 0; i < packageId.length; i++) {
+                var pkgFileName = fileName || "Dataset_" + (i + 1);
+
+                //Take off the file extension part of the file name
+                if (pkgFileName.lastIndexOf(".") > 0)
+                  pkgFileName = pkgFileName.substring(
+                    0,
+                    pkgFileName.lastIndexOf(".")
+                  );
+
+                var packageModel = new Package({
+                  id: packageId[i],
+                  fileName: pkgFileName + ".zip",
+                });
+                packageModel.downloadWithCredentials();
+              }
+            } else {
+              // Take off the file extension part of the file name
+              if (fileName.lastIndexOf(".") > 0)
+                fileName = fileName.substring(0, fileName.lastIndexOf("."));
+
+              // Create a model to represent the package
+              var packageModel = new Package({
+                id: packageId,
+                fileName: fileName + ".zip",
+              });
+              packageModel.downloadWithCredentials();
+            }
+          }
+          // Otherwise just download this solo object
+          else {
+            this.model.downloadWithCredentials();
+          }
+        } else return true;
+      },
+
+      /**
+       * Create ContextObjects in Spans (COinS) for the item. COinS is a method
+       * to embed bibliographic metadata in the HTML code of web pages. This
+       * allows bibliographic software to publish machine-readable bibliographic
+       * items and client reference management software to retrieve
+       * bibliographic metadata. (from wikipedia)
+       * @returns {HTMLSpanElement} - The span element containing the COinS data
+       */
+      getOpenURLCOinS: function () {
+        try {
+          // Create the OpenURL COinS
+          var spanTitle =
+            "ctx_ver=Z39.88-2004&amp;rft_val_fmt=info:ofi/fmt:kev:mtx:dc&amp;rfr_id=info:sid/ocoins.info:generator&amp;rft.type=Dataset";
+
+          if (this.model.get("title"))
+            spanTitle += "&amp;rft.title=" + this.model.get("title");
+          if (this.model.get("origin"))
+            spanTitle += "&amp;rft.creator=" + this.model.get("origin");
+          if (this.model.get("keywords"))
+            spanTitle += "&amp;rft.subject=" + this.model.get("keywords");
+          if (this.model.get("abstract"))
+            spanTitle += "&amp;rft.description=" + this.model.get("abstract");
+          if (this.model.get("datasource"))
+            spanTitle += "&amp;rft.publisher=" + this.model.get("datasource");
+          if (this.model.get("endDate"))
+            spanTitle += "&amp;rft.date=" + this.model.get("endDate");
+          if (this.model.get("formatID"))
+            spanTitle += "&amp;rft.format=" + this.model.get("formatID");
+          if (this.model.get("id"))
+            spanTitle += "&amp;rft.identifier=" + this.model.get("id");
+          if (this.model.get("url"))
+            spanTitle += "&amp;rft.source=" + this.model.get("url");
+          if (this.model.get("northBoundCoord")) {
+            spanTitle +=
+              "&amp;rft.coverage=POLYGON((" +
+              this.model.get("southBoundCoord") +
+              " " +
+              this.model.get("westBoundCoord") +
+              ", " +
+              this.model.get("northBoundCoord") +
+              " " +
+              this.model.get("westBoundCoord") +
+              ", " +
+              this.model.get("northBoundCoord") +
+              " " +
+              this.model.get("eastBoundCoord") +
+              ", " +
+              this.model.get("southBoundCoord") +
+              " " +
+              this.model.get("eastBoundCoord") +
+              "))";
+          }
+
+          spanTitle = encodeURI(spanTitle);
+
+          return $(document.createElement("span"))
+            .attr("title", spanTitle)
+            .addClass("Z3988");
+        } catch (e) {
+          console.log("Error creating COinS: " + e);
+          return $(document.createElement("span"));
+        }
+      },
+
+      /**
+       * Show the loading view
+       */
+      loading: function () {
+        this.$el.html(this.loadingTemplate);
+      },
+
+      /**
+       * Remove the item, destroy the model from *localStorage* and delete its
+       * view.
+       */
+      clear: function () {
+        this.model.destroy();
+      },
+
+      /**
+       * Functions to perform when the view is closed
+       */
+      onClose: function () {
+        this.clear();
+      },
+    }
+  );
+});
+
+
+
+ + + + +
+ +
+ + + + + diff --git a/docs/docs/src_js_views_search_SearchResultsPagerView.js.html b/docs/docs/src_js_views_search_SearchResultsPagerView.js.html index f60531c2d..8fe1794ca 100644 --- a/docs/docs/src_js_views_search_SearchResultsPagerView.js.html +++ b/docs/docs/src_js_views_search_SearchResultsPagerView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -45,187 +45,303 @@

Source: src/js/views/search/SearchResultsPagerView.js

/*global define */
-define(["backbone"],
-function(Backbone){
-
-    "use strict";
-
-    /**
-    * @class SearchResultsPagerView
-    * @name SearchResultsPagerView
-    * @classcategory Views/Search
-    * @extends Backbone.View
-    * @description Renders a simple pager element for a SolrResults collection. 
-    * @constructor
-    * @since 2.22.0
-    */
-    return Backbone.View.extend(
+define(["backbone"], function (Backbone) {
+  "use strict";
+
+  /**
+   * @class SearchResultsPagerView
+   * @name SearchResultsPagerView
+   * @classcategory Views/Search
+   * @extends Backbone.View
+   * @description Renders a simple pager element for a SolrResults collection.
+   * @constructor
+   * @since 2.22.0
+   * @screenshots views/search/SearchResultsPagerView.png
+   */
+  return Backbone.View.extend(
     /** @lends SearchResultsPagerView.prototype */ {
-
-        className: "pager-view search-results-pager-view pagination pagination-centered resultspager",
-
-        tagName: "nav",
-
-        template: `<ul>
-            <li><a class="unactive"></a></li>
-            <li><a class="unactive"></a></li>
-            <li><a class="unactive"></a></li>
-            <li><a class="unactive">...</a></li>
-            <li><a class="unactive"></a></li>
+      /**
+       * The classes to use for this view's element
+       * @type {string}
+       */
+      className:
+        `pager-view search-results-pager-view pagination ` +
+        `pagination-centered resultspager`,
+
+      /**
+       * The HTML tag to use for this view's element
+       * @type {string}
+       */
+      tagName: "nav",
+
+      /**
+       * The HTML to display when no search results are found. This will be
+       * updated by the view.
+       * @type {string}
+       */
+      template: `
+        <ul>
+          <li><a class="unactive"></a></li>
+          <li><a class="unactive"></a></li>
+          <li><a class="unactive"></a></li>
+          <li><a class="unactive">...</a></li>
+          <li><a class="unactive"></a></li>
         </ul>`,
 
-        /**
-         * Constructs and returns a URL string to use for the given page in this pager. It assumes that the URL uses
-         * a ".../page/X" structure. To provide a custom URL, override this function.
-         * @param {number|string} page 
-         * @returns {string}
-         */
-        url: function(page){
-            if(typeof page !== "number"){
-                try{
-                    page=parseInt(page);
-                }
-                catch(e){
-                    console.error(e);
-                    return "";
-                }
-                finally{
-                    if(isNaN(page)){
-                        return "";
-                    }
-                }
+      /**
+       * Constructs and returns a URL string to use for the given page in this
+       * pager. It assumes that the URL uses a ".../page/X" structure. To
+       * provide a custom URL, override this function.
+       * @param {number|string} page
+       * @returns {string}
+       */
+      url: function (page) {
+        if (typeof page !== "number") {
+          try {
+            page = parseInt(page);
+          } catch (e) {
+            console.error(e);
+            return "";
+          } finally {
+            if (isNaN(page)) {
+              return "";
             }
+          }
+        }
 
-            if( window.location.pathname.includes("page") ){
-                return window.location.pathname.replace(/\/page\/\d+/, "/page/" + (page+1));
-            }
-            else{
-                if(window.location.pathname.endsWith("/"))
-                    return window.location.pathname + "page/" + (page+1);
-                else
-                    return window.location.pathname + "/page/" + (page+1);
-            }
-        },
-
-        /**
-         * Constructs and returns the HTML template string for a single page link in the pager
-         * @type {function}
-         * @param {object} data 
-         * @returns {string}
-         */
-        linkTemplate: function(data={
-                page: 0, 
-                pageDisplay: "", 
-                className: ""
-            }){
-            let href = `${this.url(data.page)}`;
-            if(href.length) href= `href="${href}"`;
-            return `<li class="${data.className}"><a class="pagerLink" data-page="${data.page}" ${href}>${data.pageDisplay}</a></li>`
-        },
-
-        /**
-         * A SolrResults collection that contains the page data that this Pager displays.
-         * @type SolrResults
-         */
-        searchResults: null,
-
-        /**
-         * An object literal of events to listen to on this view
-         * @type {object}
-         */
-        events: {
-            "click a" : "handleClick"
-        },
-
-        /**
-         * Renders the Pager View
-         */
-        render: function(){
-            this.loading();
-            this.el.innerHTML = this.template;
-
-            if(this.searchResults){
-                this.renderPages();
-                this.listenTo(this.searchResults, "reset", this.renderPages);
-            }
-        },
-
-        /**
-         * Render the page numbers and links.
-         */
-        renderPages: function(){
-            //Only show pages if the search results have been retrieved (by checking for the header property which is set during parse())
-            if(this.searchResults?.header){
-                this.removeLoading();
-
-                let container = this.el.querySelector("ul"),
-                    lastPage = this.searchResults.getNumPages(),
-                    firstPage = 0,
-                    currentPage = this.searchResults.getCurrentPage();
-
-                //Empty the pager container
-                container.innerHTML = "";
-
-                //Show prev button and the first page number
-                if(currentPage > 0){
-                    container.insertAdjacentHTML("afterbegin", this.linkTemplate({ page: currentPage-1, pageDisplay: "<"}));
-                    container.insertAdjacentHTML("beforeend", this.linkTemplate({ page: 0, pageDisplay: 1}));
-                    
-                    //If there are pages between the first page and the current-2, then show an ellipsis
-                    if(currentPage-2 > firstPage){
-                        container.insertAdjacentHTML("beforeend", this.linkTemplate({ page: "", pageDisplay: "...", className: "inactive"}));
-                    }
-                }
-
-                //Show the current page plus two on each side
-                let pages = [currentPage-2, currentPage-1, currentPage, currentPage+1, currentPage+2];
-                for(let page of pages){
-                    if((page > firstPage && page < lastPage) || page==currentPage){
-                        container.insertAdjacentHTML("beforeend", this.linkTemplate({ page: page, pageDisplay: page+1, className: page==currentPage? "active" : ""}));
-                    }
-                }
-
-                //Show next button and the last page number
-                if(currentPage < lastPage){
-                    //If there are pages between the last page and the current-2, then show an ellipsis
-                    if(currentPage+2 < lastPage){
-                        container.insertAdjacentHTML("beforeend", this.linkTemplate({ page: "",  pageDisplay: "...", className: "inactive" }));
-                    }
-
-                    container.insertAdjacentHTML("beforeend", this.linkTemplate({ page: lastPage, pageDisplay: lastPage+1 }));
-                    container.insertAdjacentHTML("beforeend", this.linkTemplate({ page: currentPage+1, pageDisplay: ">" }));
-                }
+        if (window.location.pathname.includes("page")) {
+          return window.location.pathname.replace(
+            /\/page\/\d+/,
+            "/page/" + (page + 1)
+          );
+        } else {
+          if (window.location.pathname.endsWith("/"))
+            return window.location.pathname + "page/" + (page + 1);
+          else return window.location.pathname + "/page/" + (page + 1);
+        }
+      },
+
+      /**
+       * Constructs and returns the HTML template string for a single page link
+       * in the pager
+       * @type {function}
+       * @param {object} data
+       * @returns {string}
+       */
+      linkTemplate: function (
+        data = {
+          page: 0,
+          pageDisplay: "",
+          className: "",
+        }
+      ) {
+        // Expand the data object into individual variables
+        let { page, pageDisplay, className } = data;
+        let href = `${this.url(data.page)}`;
+        if (href.length) href = `href="${href}"`;
+        return `
+        <li class="${className}">
+          <a class="pagerLink" data-page="${page}" ${href}>
+            ${pageDisplay}
+          </a>
+        </li>`;
+      },
+
+      /**
+       * A SolrResults collection that contains the page data that this Pager
+       * displays.
+       * @type {SolrResults}
+       */
+      searchResults: null,
+
+      /**
+       * An object literal of events to listen to on this view
+       * @type {object}
+       */
+      events: {
+        "click a": "handleClick",
+      },
+
+      /**
+       * Renders the Pager View
+       */
+      render: function () {
+        this.loading();
+        this.el.innerHTML = this.template;
+
+        if (this.searchResults) {
+          this.renderPages();
+          this.stopListening(this.searchResults, "reset error");
+          this.listenTo(this.searchResults, "reset", this.renderPages);
+          // Hide the pager if there is an error with the search results
+          this.listenTo(this.searchResults, "error", this.hide);
+        }
+      },
+
+      /**
+       * Render the page numbers and links.
+       */
+      renderPages: function () {
+        // Only show pages if the search results have been retrieved (by
+        // checking for the header property which is set during parse())
+        if (!this.searchResults || !this.searchResults.header) return;
+
+        // Ensure that we don't navigate to a page that doesn't exist
+        const numPages = this.searchResults.getNumPages();
+        const currentPage = MetacatUI.appModel.get("page");
+        if (currentPage > numPages) {
+          MetacatUI.appModel.set("page", numPages);
+          this.searchResults.toPage(numPages);
+          return;
+        }
 
-            }
-        },
+        if (this.searchResults.getNumPages() < 1) {
+          this.hide();
+          return;
+        }
 
-        handleClick: function(evt){
-            // Don't hijack the event if the user had Control or Command held down
-            if (evt.ctrlKey || evt.metaKey) {
-                return;
+        try {
+          this.show();
+          this.removeLoading();
+
+          let container = this.el.querySelector("ul"),
+            lastPage = this.searchResults.getNumPages(),
+            firstPage = 0,
+            currentPage = this.searchResults.getCurrentPage();
+
+          //Empty the pager container
+          container.innerHTML = "";
+
+          //Show prev button and the first page number
+          if (currentPage > 0) {
+            container.insertAdjacentHTML(
+              "afterbegin",
+              this.linkTemplate({ page: currentPage - 1, pageDisplay: "<" })
+            );
+            container.insertAdjacentHTML(
+              "beforeend",
+              this.linkTemplate({ page: 0, pageDisplay: 1 })
+            );
+
+            //If there are pages between the first page and the current-2, then
+            //show an ellipsis
+            if (currentPage - 2 > firstPage) {
+              container.insertAdjacentHTML(
+                "beforeend",
+                this.linkTemplate({
+                  page: "",
+                  pageDisplay: "...",
+                  className: "inactive",
+                })
+              );
             }
-
-            evt.preventDefault();
-            evt.stopPropagation();
-            let page = evt.target.getAttribute("data-page");
-            if(this.searchResults){
-                this.searchResults.toPage(page);
-                MetacatUI.appModel.set("page", page);
-                console.log("nav to ", this.url(page));
-                MetacatUI.uiRouter.navigate(this.url(page), {trigger: false});
+          }
+
+          //Show the current page plus two on each side
+          let pages = [
+            currentPage - 2,
+            currentPage - 1,
+            currentPage,
+            currentPage + 1,
+            currentPage + 2,
+          ];
+          for (let page of pages) {
+            if ((page > firstPage && page < lastPage) || page == currentPage) {
+              container.insertAdjacentHTML(
+                "beforeend",
+                this.linkTemplate({
+                  page: page,
+                  pageDisplay: page + 1,
+                  className: page == currentPage ? "active" : "",
+                })
+              );
+            }
+          }
+
+          //Show next button and the last page number
+          if (currentPage < lastPage) {
+            //If there are pages between the last page and the current-2, then
+            //show an ellipsis
+            if (currentPage + 2 < lastPage) {
+              container.insertAdjacentHTML(
+                "beforeend",
+                this.linkTemplate({
+                  page: "",
+                  pageDisplay: "...",
+                  className: "inactive",
+                })
+              );
             }
-        },
-
-        loading: function(){
-            this.el.classList.add("loading");
-        },
 
-        removeLoading: function(){
-            this.el.classList.remove("loading");
+            container.insertAdjacentHTML(
+              "beforeend",
+              this.linkTemplate({ page: lastPage, pageDisplay: lastPage + 1 })
+            );
+            container.insertAdjacentHTML(
+              "beforeend",
+              this.linkTemplate({ page: currentPage + 1, pageDisplay: ">" })
+            );
+          }
+        } catch (e) {
+          console.log("There was an error rendering the pager: ", e);
+          this.hide();
+        }
+      },
+
+      /**
+       * Handles clicks on the pager links
+       * @param {Event} evt
+       */
+      handleClick: function (evt) {
+        // Don't hijack the event if the user had Control or Command held down
+        if (evt.ctrlKey || evt.metaKey) {
+          return;
         }
 
-    });
-});
+ evt.preventDefault(); + evt.stopPropagation(); + let page = evt.target.getAttribute("data-page"); + if (this.searchResults) { + this.searchResults.toPage(page); + MetacatUI.appModel.set("page", page); + MetacatUI.uiRouter.navigate(this.url(page), { trigger: false }); + } + }, + + /** + * Shows the loading version of the pager + */ + loading: function () { + this.show(); + this.el.classList.add("loading"); + }, + + /** + * Hides the pager + * @since 2.25.0 + */ + hide: function () { + this.el.style.visibility = "hidden"; + }, + + /** + * Shows the pager + * @since 2.25.0 + */ + show: function () { + this.el.style.visibility = "visible"; + }, + + /** + * Removes the loading version of the pager + */ + removeLoading: function () { + this.el.classList.remove("loading"); + }, + } + ); +}); +
diff --git a/docs/docs/src_js_views_search_SearchResultsView.js.html b/docs/docs/src_js_views_search_SearchResultsView.js.html index bdb91c0e2..342a275dd 100644 --- a/docs/docs/src_js_views_search_SearchResultsView.js.html +++ b/docs/docs/src_js_views_search_SearchResultsView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -45,183 +45,279 @@

Source: src/js/views/search/SearchResultsView.js

/*global define */
-define(["backbone",
-        "collections/SolrResults",
-        "views/search/SearchResultView"
-    ],
-function(Backbone, SearchResults, SearchResultView){
-
-    "use strict";
-
-    /**
-    * @class SearchResultsView
-    * @name SearchResultsView
-    * @classcategory Views/Search
-    * @extends Backbone.View
-    * @since 2.22.0
-    * @constructor
-    */
-    return Backbone.View.extend(
-      /** @lends SearchResultsView.prototype */ {
-
-    /**
-    * The type of View this is
-    * @type {string}
-    */
-    type: "SearchResults",
-
+define([
+  "backbone",
+  "collections/SolrResults",
+  "views/search/SearchResultView",
+  "models/MetricsModel",
+], function (Backbone, SearchResults, SearchResultView, MetricsModel) {
+  "use strict";
+
+  /**
+   * @class SearchResultsView
+   * @classdesc A view of search results.
+   * @name SearchResultsView
+   * @classcategory Views/Search
+   * @extends Backbone.View
+   * @since 2.22.0
+   * @constructor
+   * @screenshots views/search/SearchResultsView.png
+   */
+  return Backbone.View.extend(
     /**
-    * The HTML tag to use for this view's element
-    * @type {string}
-    */
-    tagName: "div",
-
-    /**
-    * The HTML classes to use for this view's element
-    * @type {string}
-    */
-    className: "search-results-view",
-
-     /**
-    * The events this view will listen to and the associated function to call.
-    * @type {Object}
-    */
-    events: {
-    },
-
-    /**
-     * The SolrResults collection that fetches and parses the searches.
-     * @type {SolrResults}
-     */
-    searchResults: null,
-
-    /**
-     * The HTML to display when no search results are found.
-     * @since 2.22.0
-     * @type {string}
-     */
-    noResultsTemplate: `<div class="no-search-results">No results found.</div>`,
-
-    render: function(){
-
-      if( !this.searchResults ){
-        this.setSearchResults();
-      }
-
-      this.loading();
-    
-      this.addResultCollection();
-
-      this.startListening();
-
-    },
-
-    /**
-     * Sets listeners on the {@link SearchResultsView#searchResults} to change what is displayed in this view.
-     */
-    startListening: function(){
-      this.listenTo(this.searchResults, "add", this.addResultModel);
-      this.listenTo(this.searchResults, "reset", this.addResultCollection);
-      this.listenTo(this.searchResults, "request", this.loading);
-    },
-
-    /**
-     * Creates and sets the {@link SearchResultsView#searchResults} property.
-     * @returns {SolrResults}
-     */
-    setSearchResults: function(){
-      this.searchResults = new SearchResults();
-      return this.searchResults;
-    },
-
-    /**
-     * Renders the given {@link SolrResult} model inside this view.
-     * @param {SolrResult} searchResult 
-     */
-    addResultModel: function(searchResult){
-      try{
-        let view = this.createSearchResultView();
-        view.model = searchResult;
-        this.addResultView(view);
-      }
-      catch(e){
-        console.error("Failed to add a search result to the page: ", e);
-      }
-    },
-
-    /**
-     * Renders all {@link SolrResult}s from the {@link SearchResultsView#searchResults} collection.
-     */
-    addResultCollection: function(){
-      if( !this.searchResults )
-        return;
-      else if( this.searchResults?.header?.get("numFound") == 0){
-        this.showNoResults();
-        return;
-      }
-
-      this.empty();
-
-      this.searchResults.models.forEach( result => {
-        this.addResultModel(result);
-      });
-    },
-
-    /**
-     * Adds a Search Result View to the page
-     * @param {SearchResultView} view
-     */
-    addResultView: function(view) {
-      this.el.append(view.el);
-      view.render();
-    },
-
-    /** 
-     * Creates a Search Result View
-    */
-    createSearchResultView: function(){
-      return new SearchResultView();
-    },
-
-    /**
-     * Shows a message when no search results have been found.
-     */
-    showNoResults: function(){
-
-      this.empty();
-
-      this.el.replaceChildren(this.noResultsTemplate);
-
-    },
-
-    empty: function(){
-      this.el.innerHTML = "";
-    },
-
-    /**
-     * Renders a skeleton of this view that communicates to the user that it is loading.
-     */
-    loading: function(){
-
-      this.empty();
-      
-      let rows = this.searchResults.rows,
-          i=0;
-
-      while(i < rows){
-        let view = this.createSearchResultView();
-        this.addResultView(view);
-        view.loading();
-        i++;
-      }
-
+     * @lends SearchResultsView.prototype
+     */ {
+      /**
+       * The type of View this is
+       * @type {string}
+       */
+      type: "SearchResults",
+
+      /**
+       * The HTML tag to use for this view's element
+       * @type {string}
+       */
+      tagName: "div",
+
+      /**
+       * The HTML classes to use for this view's element
+       * @type {string}
+       */
+      className: "search-results-view",
+
+      /**
+       * The events this view will listen to and the associated function to
+       * call.
+       * @type {Object}
+       */
+      events: {},
+
+      /**
+       * The SolrResults collection that fetches and parses the searches.
+       * @type {SolrResults}
+       */
+      searchResults: null,
+
+      /**
+       * The HTML to display when no search results are found.
+       * @since 2.22.0
+       * @type {string}
+       */
+      noResultsTemplate: `<div class="no-search-results">No results found.</div>`,
+
+      /**
+       * The metrics model that will be passed to the search result view
+       * @type {MetricsModel}
+       * @since 2.25.0
+       */
+      metricsModel: null,
+
+      /**
+       * Render the view.
+       */
+      render: function () {
+        try {
+          if (!this.searchResults) this.setSearchResults();
+
+          if (!this.metricsModel) this.setUpMetrics();
+
+          this.loading();
+
+          if (typeof this.searchResults.getNumFound() == "number") {
+            this.addResultCollection();
+          }
+
+          this.startListening();
+        } catch (e) {
+          console.log("Failed to render search results view.", e);
+          const emailMsg =
+            "There was an error rendering the search results view. " + e;
+          this.showError(null, { responseText: emailMsg });
+        }
+      },
+
+      /**
+       * Removes listeners set by the {@link SearchResultsView#startListening}
+       * method. This is important to prevent zombie listeners from being
+       * created.
+       */
+      removeListeners: function () {
+        this.stopListening(this.searchResults, "add");
+        this.stopListening(this.searchResults, "reset");
+        this.stopListening(this.searchResults, "request");
+        this.listenTo(this.searchResults, "error");
+      },
+
+      /**
+       * Sets listeners on the {@link SearchResultsView#searchResults} to change
+       * what is displayed in this view.
+       */
+      startListening: function () {
+        this.removeListeners();
+        this.listenTo(this.searchResults, "add", this.addResultModel);
+        this.listenTo(this.searchResults, "reset", this.addResultCollection);
+        this.listenTo(this.searchResults, "changing request", this.loading);
+        this.listenTo(this.searchResults, "error", this.showError);
+        this.listenTo(this.searchResults, "add reset", this.updateMetrics);
+      },
+
+      /**
+       * When there is an error fetching the search results, show an alert
+       * message to the user.
+       * @param {SolrResults} searchResults - The collection of search results
+       * @param {Object} response - The response from the server
+       */
+      showError: function (searchResults, response) {
+        console.log("Failed to fetch search results.");
+        if (response) console.log(response);
+
+        const thisRepo = MetacatUI.appModel.get("repositoryName") || "DataONE";
+        const responseText = encodeURIComponent(response.responseText);
+
+        const alert = MetacatUI.appView.showAlert({
+          message: `Oops! It looks like there was a problem retrieving your
+            search results. Please try your search again and contact support
+            if the issue persists.<br><br>`,
+          classes: `alert-warning`,
+          container: this.el,
+          replaceContents: true,
+          delay: false,
+          remove: false,
+          includeEmail: true,
+          emailBody: `I'm having trouble searching ${thisRepo}.
+            Here is the error message I received: ${responseText}`,
+        });
+        // alert is an HTMLDivElement, add a margin to the left and right:
+        alert[0].style.margin = "0 1rem";
+      },
+
+      /**
+       * Creates and sets the {@link SearchResultsView#searchResults} property.
+       * @returns {SolrResults}
+       */
+      setSearchResults: function () {
+        this.searchResults = new SearchResults();
+        return this.searchResults;
+      },
+
+      /**
+       * Renders the given {@link SolrResult} model inside this view.
+       * @param {SolrResult} searchResult
+       */
+      addResultModel: function (searchResult) {
+        try {
+          let view = this.createSearchResultView();
+          view.model = searchResult;
+          this.addResultView(view);
+        } catch (e) {
+          console.error("Failed to add a search result to the page: ", e);
+        }
+      },
+
+      /**
+       * Renders all {@link SolrResult}s from the
+       * {@link SearchResultsView#searchResults} collection.
+       */
+      addResultCollection: function () {
+        if (!this.searchResults) return;
+        if (this.searchResults.getNumFound() == 0) {
+          this.showNoResults();
+          return;
+        }
+
+        this.empty();
+
+        this.searchResults.models.forEach((result) => {
+          this.addResultModel(result);
+        });
+      },
+
+      /**
+       * Adds a Search Result View to the page
+       * @param {SearchResultView} view
+       */
+      addResultView: function (view) {
+        this.el.append(view.el);
+        view.render();
+      },
+
+      /**
+       * Creates a Search Result View
+       */
+      createSearchResultView: function () {
+        const options = {
+          metricsModel: this.metricsModel,
+        };
+        return new SearchResultView(options);
+      },
+
+      /**
+       * Creates a new MetricsModel if the app is configured to display metrics.
+       * Sets the metrics model on this view. The metrics model is used to
+       * display views, citations, and downloads for each search result.
+       * @since 2.25.0
+       * @returns {MetricsModel}
+       */
+      setUpMetrics: function () {
+        if (!MetacatUI.appModel.get("displayDatasetMetrics")) {
+          this.metricsModel = null;
+          return;
+        }
+        this.metricsModel = new MetricsModel({
+          type: "catalog",
+        });
+        return this.metricsModel;
+      },
+
+      /**
+       * Updates the metrics model with the PIDs of the search results and
+       * fetches the metrics.
+       * @since 2.25.0
+       * @returns {MetricsModel}
+       */
+      updateMetrics: function () {
+        if (!this.metricsModel) return;
+        this.metricsModel.set("pid_list", this.searchResults.getPIDs());
+        this.metricsModel.fetch();
+        return this.metricsModel;
+      },
+
+      /**
+       * Shows a message when no search results have been found.
+       */
+      showNoResults: function () {
+        this.empty();
+        this.el.innerHTML = this.noResultsTemplate;
+      },
+
+      /**
+       * Removes all child elements from this view.
+       */
+      empty: function () {
+        this.el.innerHTML = "";
+      },
+
+      /**
+       * Renders a skeleton of this view that communicates to the user that it
+       * is loading.
+       */
+      loading: function () {
+        this.empty();
+
+        let rows = this.searchResults.rows,
+          i = 0;
+
+        while (i < rows) {
+          let view = this.createSearchResultView();
+          this.addResultView(view);
+          view.loading();
+          i++;
+        }
+      },
     }
-
-    
-
-    });
-
-});
+ ); +}); +
diff --git a/docs/docs/src_js_views_search_SorterView.js.html b/docs/docs/src_js_views_search_SorterView.js.html index 23ee3879f..d605fc3cf 100644 --- a/docs/docs/src_js_views_search_SorterView.js.html +++ b/docs/docs/src_js_views_search_SorterView.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

@@ -47,21 +47,24 @@

Source: src/js/views/search/SorterView.js

/*global define */
 define(["backbone"], function (Backbone) {
   "use strict";
-/**
-  * @class SorterView
-  * @classdesc A view that displays a sort controller and sets the sort order on the attached {@link SolrResults} collection.
-  * @name SorterView
-  * @extends Backbone.View
-  * @constructor
-  * @since 2.22.0
-  * @classcategory Views/Search
-  * */
+  /**
+   * @class SorterView
+   * @classdesc A view that displays a sort controller and sets the sort order
+   * on the attached {@link SolrResults} collection.
+   * @name SorterView
+   * @extends Backbone.View
+   * @constructor
+   * @since 2.22.0
+   * @classcategory Views/Search
+   * @screenshot views/search/SorterView.png
+   */
   return Backbone.View.extend(
     /**
      * @lends SorterView.prototype
      */ {
       /**
-       * A reference to the {@link SolrResults} collection that this sorter displays and controls.
+       * A reference to the {@link SolrResults} collection that this sorter
+       * displays and controls.
        * @type {SolrResults}
        */
       searchResults: null,
@@ -69,8 +72,10 @@ 

Source: src/js/views/search/SorterView.js

/** * A list of sort order options to display in this view. * @typedef {Object} SearchSortOptions - * @property {string} value The sort value that will be sent directly to the search index in the query string. - * @property {string} label The name of the sort option that will be shown to the user. + * @property {string} value The sort value that will be sent directly to + * the search index in the query string. + * @property {string} label The name of the sort option that will be shown + * to the user. * @since 2.22.0 */ sortOptions: [ @@ -80,9 +85,23 @@

Source: src/js/views/search/SorterView.js

{ value: "authorSurNameSort+asc", label: "Author (a-z)" }, ], + /** + * The HTML tag to use for this view's element + * @type {string} + */ tagName: "div", + + /** + * The HTML classes to use for this view's element + * @type {string} + */ className: "sorter-view", + /** + * The events this view will listen to and the associated function to + * call. + * @type {Object} + */ events: { change: "setSort", }, @@ -91,6 +110,9 @@

Source: src/js/views/search/SorterView.js

* Renders the view */ render: function () { + this.stopListening(this.searchResults, "error reset"); + this.listenTo(this.searchResults, "error reset", this.hideIfNoResults); + let select = document.createElement("select"); select.setAttribute("id", "sortOrder"); @@ -105,12 +127,46 @@

Source: src/js/views/search/SorterView.js

}, /** - * Sets the sort order on the {@link SolrResults} when the sort is changed in the UI. + * Hides the view if there are no search results. + * @since 2.25.0 + */ + hideIfNoResults: function () { + if ( + !this.searchResults || + !this.searchResults.header || + !this.searchResults.getNumFound() + ) { + this.hide(); + } else { + this.show(); + this.render(); + } + }, + + /** + * Sets the sort order on the {@link SolrResults} when the sort is changed + * in the UI. * @param {Event} e */ setSort: function (e) { this.searchResults.setSort(e.target.value); }, + + /** + * Hides the view + * @since 2.25.0 + */ + hide: function () { + this.el.style.visibility = "hidden"; + }, + + /** + * Shows the view + * @since 2.25.0 + */ + show: function () { + this.el.style.visibility = "visible"; + }, } ); }); diff --git a/docs/docs/src_loader.js.html b/docs/docs/src_loader.js.html index 8c904582b..dca1aa73e 100644 --- a/docs/docs/src_loader.js.html +++ b/docs/docs/src_loader.js.html @@ -30,7 +30,7 @@ -

Namespaces

Classes

Global

+

Namespaces

Classes

Global

diff --git a/package-lock.json b/package-lock.json index b8b8dfd5d..d6c0cd054 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "metacatui", - "version": "2.24.0", + "version": "2.25.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "metacatui", - "version": "2.24.0", + "version": "2.25.0", "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.9.1", diff --git a/package.json b/package.json index af124e712..c6a5f1c3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metacatui", - "version": "2.24.0", + "version": "2.25.0", "description": "MetacatUI: A client-side web interface for DataONE data repositories", "main": "server.js", "dependencies": { diff --git a/src/index.html b/src/index.html index bc13154a0..d77911f52 100644 --- a/src/index.html +++ b/src/index.html @@ -44,7 +44,7 @@ //Create the MetacatUI object var MetacatUI = {}; - MetacatUI.metacatUIVersion = "2.24.0"; + MetacatUI.metacatUIVersion = "2.25.0"; //Catch errors when the config or loader file fails to load. // These are mainly helpful for developers/operators installing MetacatUI diff --git a/src/js/collections/Filters.js b/src/js/collections/Filters.js index f158e61db..6e1c2911b 100644 --- a/src/js/collections/Filters.js +++ b/src/js/collections/Filters.js @@ -37,7 +37,7 @@ define([ /** * The name of this type of collection * @type {string} - * @since x.x.x + * @since 2.25.0 * @default "Filters" */ type: "Filters", diff --git a/src/js/collections/SolrResults.js b/src/js/collections/SolrResults.js index 050fd4def..c12f1a81e 100644 --- a/src/js/collections/SolrResults.js +++ b/src/js/collections/SolrResults.js @@ -20,7 +20,7 @@ define(['jquery', 'underscore', 'backbone', 'models/SolrHeader', 'models/SolrRes * The name of this type of collection. * @type {string} * @default "SolrResults" - * @since x.x.x + * @since 2.25.0 */ type: "SolrResults", @@ -398,7 +398,7 @@ define(['jquery', 'underscore', 'backbone', 'models/SolrHeader', 'models/SolrRes /** * Get the list of PIDs for the search results * @returns {string[]} - The list of PID strings for the search results - * @since x.x.x + * @since 2.25.0 */ getPIDs: function () { return this.pluck("id"); diff --git a/src/js/collections/maps/AssetColors.js b/src/js/collections/maps/AssetColors.js index 70b89f942..eb6789a00 100644 --- a/src/js/collections/maps/AssetColors.js +++ b/src/js/collections/maps/AssetColors.js @@ -38,7 +38,7 @@ define( * Add custom sort functionality such that values are sorted * numerically, but keep the special value key words "min" and "max" at * the beginning or end of the collection, respectively. - * @since x.x.x + * @since 2.25.0 */ comparator: function (color) { let value = color.get('value'); @@ -69,7 +69,7 @@ define( * array of the values for that attribute. * @param {string} attr - The attribute to get the values for. * @return {Array} - * @since x.x.x + * @since 2.25.0 */ getAttr: function(attr) { return this.map(function (model) { diff --git a/src/js/collections/maps/Features.js b/src/js/collections/maps/Features.js index e516e8c71..768c17197 100644 --- a/src/js/collections/maps/Features.js +++ b/src/js/collections/maps/Features.js @@ -94,7 +94,7 @@ define( * @param {Feature|Cesium.Cesium3DTilesetFeature|Cesium.Entity} featureObject * @returns {boolean} Returns true if the given feature object is in this * collection, false otherwise. - * @since x.x.x + * @since 2.25.0 */ containsFeature: function (featureObject) { if (!featureObject) return false; diff --git a/src/js/collections/maps/Geohashes.js b/src/js/collections/maps/Geohashes.js index ed9e9b32a..f606140b1 100644 --- a/src/js/collections/maps/Geohashes.js +++ b/src/js/collections/maps/Geohashes.js @@ -14,7 +14,7 @@ define([ * @class Geohashes * @name Geohashes * @extends Backbone.Collection - * @since x.x.x + * @since 2.25.0 * @constructor */ var Geohashes = Backbone.Collection.extend( diff --git a/src/js/collections/maps/MapAssets.js b/src/js/collections/maps/MapAssets.js index 361bc0225..262ff3c2a 100644 --- a/src/js/collections/maps/MapAssets.js +++ b/src/js/collections/maps/MapAssets.js @@ -199,7 +199,7 @@ define([ * the MapAsset model. * @returns {MapAsset} - Returns the MapAsset model that was added to the * collection. - * @since x.x.x + * @since 2.25.0 */ addAsset: function (asset, mapModel) { try { @@ -218,7 +218,7 @@ define([ * feature selected from the map view widget. * @returns {MapAsset} - Returns the MapAsset model that contains the * feature. - * @since x.x.x + * @since 2.25.0 */ findAssetWithFeature: function (feature) { return this.models.find((model) => { @@ -233,7 +233,7 @@ define([ * feature selected from the map view widget. * @returns {Object[]} - Returns an array of attributes that can be used * to create new Feature models. - * @since x.x.x + * @since 2.25.0 */ getFeatureAttributes: function (features) { return features.map((feature) => { diff --git a/src/js/models/AppModel.js b/src/js/models/AppModel.js index 774486f33..377f4d100 100644 --- a/src/js/models/AppModel.js +++ b/src/js/models/AppModel.js @@ -43,7 +43,7 @@ define(['jquery', 'underscore', 'backbone'], /** * The default page description. * @type {string} - * @since x.x.x + * @since 2.25.0 */ description: "A research data catalog and repository that provides access to scientific data, metadata, and more.", @@ -2384,7 +2384,7 @@ define(['jquery', 'underscore', 'backbone'], /** * Reset the web document's title to the default - * @since x.x.x + * @since 2.25.0 */ resetTitle: function () { this.set("title", this.defaults.title); @@ -2392,7 +2392,7 @@ define(['jquery', 'underscore', 'backbone'], /** * Reset the web document's description to the default - * @since x.x.x + * @since 2.25.0 */ resetDescription: function () { this.set("description", this.defaults.description); diff --git a/src/js/models/analytics/Analytics.js b/src/js/models/analytics/Analytics.js index 3240f899e..409222d6e 100644 --- a/src/js/models/analytics/Analytics.js +++ b/src/js/models/analytics/Analytics.js @@ -8,7 +8,7 @@ define(["backbone"], function (Backbone) { * @classcategory Models/Analytics * @extends Backbone.Model * @constructs - * @since x.x.x + * @since 2.25.0 */ var Analytics = Backbone.Model.extend( /** @lends Analytics.prototype */ diff --git a/src/js/models/analytics/GoogleAnalytics.js b/src/js/models/analytics/GoogleAnalytics.js index 585c01502..47dce61fe 100644 --- a/src/js/models/analytics/GoogleAnalytics.js +++ b/src/js/models/analytics/GoogleAnalytics.js @@ -8,7 +8,7 @@ define(["models/analytics/Analytics"], function (Analytics) { * @extends Backbone.Model * @constructs * @extends Analytics - * @since x.x.x + * @since 2.25.0 */ var GoogleAnalytics = Analytics.extend( /** @lends GoogleAnalytics.prototype */ diff --git a/src/js/models/connectors/Filters-Map.js b/src/js/models/connectors/Filters-Map.js index 5f17652f8..505d89a62 100644 --- a/src/js/models/connectors/Filters-Map.js +++ b/src/js/models/connectors/Filters-Map.js @@ -18,14 +18,14 @@ define(["backbone", "collections/Filters", "models/maps/Map"], function ( * @extends Backbone.Model * @constructor * @classcategory Models/Connectors - * @since x.x.x + * @since 2.25.0 */ return Backbone.Model.extend( /** @lends FiltersMapConnector.prototype */ { /** * The type of Backbone.Model this is. * @type {string} - * @since x.x.x + * @since 2.25.0 * @default "FiltersMapConnector" */ type: "FiltersMapConnector", @@ -43,7 +43,7 @@ define(["backbone", "collections/Filters", "models/maps/Map"], function ( * @property {function} onMoveEnd A function to call when the map is * finished moving. This function will be called with the connector as * 'this'. - * @since x.x.x + * @since 2.25.0 */ defaults: function () { return { diff --git a/src/js/models/connectors/Filters-Search.js b/src/js/models/connectors/Filters-Search.js index 87423b583..5bce8368b 100644 --- a/src/js/models/connectors/Filters-Search.js +++ b/src/js/models/connectors/Filters-Search.js @@ -23,7 +23,7 @@ define([ /** * The type of Backbone.Model this is. * @type {string} - * @since x.x.x + * @since 2.25.0 * @default "FiltersSearchConnector */ type: "FiltersSearchConnector", @@ -78,7 +78,7 @@ define([ /** * Stops listening to changes in the Filters and SearchResults - * @since x.x.x + * @since 2.25.0 */ disconnect: function () { const filters = this.get("filters"); diff --git a/src/js/models/connectors/Map-Search-Filters.js b/src/js/models/connectors/Map-Search-Filters.js index 80cce41f1..cc7557aca 100644 --- a/src/js/models/connectors/Map-Search-Filters.js +++ b/src/js/models/connectors/Map-Search-Filters.js @@ -28,7 +28,7 @@ define([ * @extends Backbone.Model * @constructor * @classcategory Models/Connectors - * @since x.x.x + * @since 2.25.0 */ return Backbone.Model.extend( /** @lends MapSearchFiltersConnector.prototype */ { diff --git a/src/js/models/connectors/Map-Search.js b/src/js/models/connectors/Map-Search.js index eeaf5843d..827593203 100644 --- a/src/js/models/connectors/Map-Search.js +++ b/src/js/models/connectors/Map-Search.js @@ -21,7 +21,7 @@ define([ /** * The type of Backbone.Model this is. * @type {string} - * @since x.x.x + * @since 2.25.0 * @default "MapSearchConnector" */ type: "MapSearchConnector", diff --git a/src/js/models/filters/SpatialFilter.js b/src/js/models/filters/SpatialFilter.js index 07079efb9..d380387fe 100644 --- a/src/js/models/filters/SpatialFilter.js +++ b/src/js/models/filters/SpatialFilter.js @@ -68,7 +68,7 @@ define([ /** * Returns true if the filter has a valid set of coordinates * @returns {boolean} True if the filter has coordinates - * @since x.x.x + * @since 2.25.0 */ hasCoordinates: function () { return ( @@ -85,7 +85,7 @@ define([ * Coordinates will be adjusted if they are out of bounds. * @param {boolean} [silent=true] - Whether to trigger a change event in * the case where the coordinates are adjusted - * @since x.x.x + * @since 2.25.0 */ validateCoordinates: function (silent = true) { if (!this.hasCoordinates()) return; @@ -106,7 +106,7 @@ define([ /** * Set a listener that updates the filter when the coordinates & height * change - * @since x.x.x + * @since 2.25.0 */ setListeners: function () { const extentEvents = @@ -118,7 +118,7 @@ define([ /** * Convert the coordinate attributes to a bounds object * @returns {object} An object with north, south, east, and west props - * @since x.x.x + * @since 2.25.0 */ getBounds: function () { return { @@ -132,7 +132,7 @@ define([ /** * Returns true if the bounds set on the filter covers the entire earth * @returns {boolean} - * @since x.x.x + * @since 2.25.0 */ coversEarth: function () { const bounds = this.getBounds(); @@ -150,7 +150,7 @@ define([ * set a consolidated set of geohashes that cover the area at the * appropriate precision. It will also validate the coordinates to ensure * that they are within the bounds of the map. - * @since x.x.x + * @since 2.25.0 */ updateFilterFromExtent: function () { try { @@ -179,7 +179,7 @@ define([ * Coverts a geohash precision level to a field name for Solr * @param {number} precision The geohash precision level, e.g. 4 * @returns {string} The corresponding field name, e.g. "geohash_4" - * @since x.x.x + * @since 2.25.0 */ precisionToField: function (precision) { return precision && !isNaN(precision) ? "geohash_" + precision : null; @@ -191,7 +191,7 @@ define([ * @param {number[]} precisions The geohash precision levels, e.g. [4, 5] * @returns {string[]} The corresponding field names, e.g. ["geohash_4", * "geohash_5"] - * @since x.x.x + * @since 2.25.0 */ precisionsToFields: function (precisions) { let fields = []; @@ -211,7 +211,7 @@ define([ * by default because geohashes are already consolidated when they are * added as the spatial filter is used right now. * @return {string} The query fragment - * @since x.x.x + * @since 2.25.0 */ getQuery: function (consolidate = false) { try { @@ -264,7 +264,7 @@ define([ * @param {number[]} precisions The geohash precision levels, e.g. [4, 5] * @param {string[]} hashStrings The geohashes, e.g. ["9q8yy", "9q8yz"] * @returns {Filter} The filter model - * @since x.x.x + * @since 2.25.0 */ createBaseFilter: function (precisions = [], hashStrings = []) { return new Filter({ diff --git a/src/js/models/maps/AssetColor.js b/src/js/models/maps/AssetColor.js index 868b61317..63921061c 100644 --- a/src/js/models/maps/AssetColor.js +++ b/src/js/models/maps/AssetColor.js @@ -146,7 +146,7 @@ define( * Converts an 6 to 8 digit hex color value to RGBA values between 0 and 1 * @param {string} hex - A hex color code, e.g. '#44A96A' or '#44A96A88' * @return {Color} - The RGBA values of the color - * @since x.x.x + * @since 2.25.0 */ hexToRGBA: function (hex) { var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(hex); diff --git a/src/js/models/maps/Geohash.js b/src/js/models/maps/Geohash.js index ed9f1acbf..429e3c436 100644 --- a/src/js/models/maps/Geohash.js +++ b/src/js/models/maps/Geohash.js @@ -12,7 +12,7 @@ define(["jquery", "underscore", "backbone", "nGeohash"], function ( * @class Geohash * @name Geohash * @extends Backbone.Model - * @since x.x.x + * @since 2.25.0 * @constructor */ var Geohash = Backbone.Model.extend( diff --git a/src/js/models/maps/Map.js b/src/js/models/maps/Map.js index df23244d1..6b7390d08 100644 --- a/src/js/models/maps/Map.js +++ b/src/js/models/maps/Map.js @@ -125,7 +125,7 @@ define([ * The type of model this is. * @type {String} * @default "MapModel" - * @since x.x.x + * @since 2.25.0 */ type: "MapModel", @@ -315,7 +315,7 @@ define([ * @param {Cesium.Entity|Cesium.Cesium3DTileFeature|Feature[]} features - An * array of feature objects selected directly from the map view, or * @returns {Feature[]} An array of Feature models. - * @since x.x.x + * @since 2.25.0 */ convertFeatures: function (features) { const model = this; @@ -339,7 +339,7 @@ define([ * Reset the layers to the default layers. This will set a new MapAssets * collection on the layer attribute. * @returns {MapAssets} The new layers collection. - * @since x.x.x + * @since 2.25.0 */ resetLayers: function () { const newLayers = this.defaults()?.layers || new MapAssets(); @@ -354,7 +354,7 @@ define([ * @param {Object | MapAsset} layer - A map asset model or object with * attributes to set on a new map asset model. * @returns {MapAsset} The new layer model. - * @since x.x.x + * @since 2.25.0 */ addAsset: function (layer) { const layers = this.get("layers") || this.resetLayers(); diff --git a/src/js/models/maps/assets/Cesium3DTileset.js b/src/js/models/maps/assets/Cesium3DTileset.js index 7d78d6a87..f8f9c0021 100644 --- a/src/js/models/maps/assets/Cesium3DTileset.js +++ b/src/js/models/maps/assets/Cesium3DTileset.js @@ -335,7 +335,7 @@ define( * Return the label for a feature from a Cesium 3D tileset * @param {Cesium.Cesium3DTileFeature} feature A Cesium 3D Tile feature * @returns {string} The label - * @since x.x.x + * @since 2.25.0 */ getLabelFromFeature: function (feature) { if (!this.usesFeatureType(feature)) return null @@ -346,7 +346,7 @@ define( * Return the Cesium3DTileset model for a feature from a Cesium 3D tileset * @param {Cesium.Cesium3DTileFeature} feature A Cesium 3D Tile feature * @returns {Cesium3DTileset} The model - * @since x.x.x + * @since 2.25.0 */ getCesiumModelFromFeature: function (feature) { if (!this.usesFeatureType(feature)) return null @@ -357,7 +357,7 @@ define( * Return the ID used by Cesium for a feature from a Cesium 3D tileset * @param {Cesium.Cesium3DTileFeature} feature A Cesium 3D Tile feature * @returns {string} The ID - * @since x.x.x + * @since 2.25.0 */ getIDFromFeature: function (feature) { if (!this.usesFeatureType(feature)) return null diff --git a/src/js/models/maps/assets/CesiumGeohash.js b/src/js/models/maps/assets/CesiumGeohash.js index 9a1612ccf..439e6a6c8 100644 --- a/src/js/models/maps/assets/CesiumGeohash.js +++ b/src/js/models/maps/assets/CesiumGeohash.js @@ -117,7 +117,7 @@ define([ /** * Get the property that we want the geohashes to display, e.g. count. * @returns {string} The property of interest. - * @since x.x.x + * @since 2.25.0 */ getPropertyOfInterest: function () { return this.get("colorPalette")?.get("property"); @@ -126,7 +126,7 @@ define([ /** * For the property of interest (e.g. count) Get the min and max values * from the geohashes collection and update the color palette. - * @since x.x.x + * @since 2.25.0 * */ updateColorRangeValues: function () { @@ -148,7 +148,7 @@ define([ * Required that a mapModel be set on the model. If one is not set, then * the minimum precision from the geohash collection will be returned. * @returns {number} The precision level. - * @since x.x.x + * @since 2.25.0 */ getPrecision: function () { const limit = this.get("maxGeoHashes"); @@ -163,7 +163,7 @@ define([ * set. * @param {Geohash[]|Object[]} geohashes The new set of geohash models to * display or attributes for the new geohash models. - * @since x.x.x + * @since 2.25.0 */ replaceGeohashes: function (geohashes) { this.get("geohashes").reset(geohashes); @@ -171,7 +171,7 @@ define([ /** * Stop the model from listening to itself for changes. - * @since x.x.x + * @since 2.25.0 */ stopListeners: function () { this.stopListening(this.get("geohashes"), "add remove update reset"); @@ -180,7 +180,7 @@ define([ /** * Update and re-render the geohashes when the collection of geohashes * changes. - * @since x.x.x + * @since 2.25.0 */ startListening: function () { try { @@ -217,7 +217,7 @@ define([ /** * Get the geohashes that are currently in the map's extent. * @returns {Geohashes} The geohashes in the current extent. - * @since x.x.x + * @since 2.25.0 */ getGeohashesForExtent: function () { const extent = this.get("mapModel")?.get("currentViewExtent"); @@ -231,7 +231,7 @@ define([ * @param {Boolean} [limitToExtent = true] - Set to false to return the * GeoJSON for all geohashes, not just those in the current extent. * @returns {Object} The GeoJSON representation of the geohashes. - * @since x.x.x + * @since 2.25.0 */ getGeoJSON: function (limitToExtent = true) { const geohashes = this.getGeohashes(limitToExtent); @@ -243,7 +243,7 @@ define([ * @param {Boolean} [limitToExtent = true] - Set to false to return the * CZML for all geohashes, not just those in the current extent. * @returns {Object} The CZML representation of the geohashes. - * @since x.x.x + * @since 2.25.0 */ getCZML: function (limitToExtent = true) { const geohashes = this.getGeohashes(limitToExtent); @@ -286,7 +286,7 @@ define([ * Find the geohash Entity on the map and add it to the selected * features. * @param {string} geohash The geohash to select. - * @since x.x.x + * @since 2.25.0 */ selectGeohashes: function (geohashes) { const toSelect = [...new Set(geohashes.map((geohash) => { diff --git a/src/js/models/maps/assets/CesiumVectorData.js b/src/js/models/maps/assets/CesiumVectorData.js index 89f874ac5..1c7b9a265 100644 --- a/src/js/models/maps/assets/CesiumVectorData.js +++ b/src/js/models/maps/assets/CesiumVectorData.js @@ -287,7 +287,7 @@ define( * returns an object that may or may not be an Entity. * @param {Object} mapObject - An object returned from the Cesium map * @returns {Cesium.Entity} - The Entity object if found, otherwise null. - * @since x.x.x + * @since 2.25.0 */ getEntityFromMapObject(mapObject) { const entityType = this.get("featureType") @@ -298,7 +298,7 @@ define( /** * @inheritdoc - * @since x.x.x + * @since 2.25.0 */ getFeatureAttributes: function (feature) { feature = this.getEntityFromMapObject(feature) @@ -307,7 +307,7 @@ define( /** * @inheritdoc - * @since x.x.x + * @since 2.25.0 */ usesFeatureType: function (feature) { // This method could be passed the entity directly, or the object @@ -414,7 +414,7 @@ define( /** * Update the styles for a set of entities * @param {Array} entities - The entities to update - * @since x.x.x + * @since 2.25.0 */ styleEntities: function (entities) { @@ -445,7 +445,7 @@ define( * Update the styles for a polygon entity * @param {Cesium.Entity} entity - The entity to update * @param {Object} styles - Styles to apply, as returned by getStyles - * @since x.x.x + * @since 2.25.0 */ stylePolygon: function (entity, styles) { entity.polygon.material = styles.color @@ -458,7 +458,7 @@ define( * Update the styles for a point entity * @param {Cesium.Entity} entity - The entity to update * @param {Object} styles - Styles to apply, as returned by getStyles - * @since x.x.x + * @since 2.25.0 */ stylePoint: function (entity, styles) { entity.point.color = styles.color @@ -471,7 +471,7 @@ define( * Update the styles for a polyline entity * @param {Cesium.Entity} entity - The entity to update * @param {Object} styles - Styles to apply, as returned by getStyles - * @since x.x.x + * @since 2.25.0 */ stylePolyline: function (entity, styles) { entity.polyline.material = styles.color @@ -482,7 +482,7 @@ define( * Update the styles for a billboard entity * @param {Cesium.Entity} entity - The entity to update * @param {Object} styles - Styles to apply, as returned by getStyles - * @since x.x.x + * @since 2.25.0 */ styleBillboard: function (entity, styles) { if (!this.pinBuilder) { @@ -499,7 +499,7 @@ define( * Update the styles for a label entity * @param {Cesium.Entity} entity - The entity to update * @param {Object} styles - Styles to apply, as returned by getStyles - * @since x.x.x + * @since 2.25.0 */ styleLabel: function (entity, styles) { // TODO... @@ -510,7 +510,7 @@ define( * @param {Color} color A Color model * @returns {Cesium.Color|null} A Cesium Color or null if the color is * invalid - * @since x.x.x + * @since 2.25.0 */ colorToCesiumColor: function (color) { color = color?.get ? color.get("color") : color; @@ -526,7 +526,7 @@ define( * @param {Cesium.Entity} entity A Cesium Entity * @returns {Cesium.Color|null} A Cesium Color or null if the color is * invalid or alpha is 0 - * @since x.x.x + * @since 2.25.0 */ colorForEntity: function (entity) { const properties = this.getPropertiesFromFeature(entity); @@ -541,7 +541,7 @@ define( * Return the styles for a selected feature * @param {Cesium.Entity} entity A Cesium Entity * @returns {Object} An object containing the styles for the feature - * @since x.x.x + * @since 2.25.0 */ getSelectedStyles: function (entity) { const highlightColor = this.colorToCesiumColor( @@ -561,7 +561,7 @@ define( * Return the styles for a feature * @param {Cesium.Entity} entity A Cesium Entity * @returns {Object} An object containing the styles for the feature - * @since x.x.x + * @since 2.25.0 */ getStyles: function (entity) { if(!entity) return null diff --git a/src/js/models/maps/assets/MapAsset.js b/src/js/models/maps/assets/MapAsset.js index 25545b112..14029a89f 100644 --- a/src/js/models/maps/assets/MapAsset.js +++ b/src/js/models/maps/assets/MapAsset.js @@ -403,7 +403,7 @@ define( * @param {Cesium.Cesium3DTilesetFeature|Cesium.Entity} feature * @returns {boolean} true if the feature is an instance of the feature * type set on the asset model, false otherwise. - * @since x.x.x + * @since 2.25.0 */ usesFeatureType: function(feature) { const ft = this.get("featureType"); @@ -420,7 +420,7 @@ define( * in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature * @returns {boolean} Returns true if the given feature is part of the * selectedFeatures collection in this asset - * @since x.x.x + * @since 2.25.0 */ containsFeature: function (feature) { if (!this.usesFeatureType(feature)) return false diff --git a/src/js/views/AppView.js b/src/js/views/AppView.js index 684c39657..02aee0a0e 100644 --- a/src/js/views/AppView.js +++ b/src/js/views/AppView.js @@ -113,7 +113,7 @@ define([ /** * Change the web document's description - * @since x.x.x + * @since 2.25.0 */ changeDescription: function () { $("meta[name=description]").attr( diff --git a/src/js/views/filters/FilterGroupView.js b/src/js/views/filters/FilterGroupView.js index 05b9ebccc..9b874a2a1 100644 --- a/src/js/views/filters/FilterGroupView.js +++ b/src/js/views/filters/FilterGroupView.js @@ -53,7 +53,7 @@ define(['jquery', 'underscore', 'backbone', * If set to true, then all filters within this group will be collapsible. * See {@link FilterView#collapsible} * @type {boolean} - * @since x.x.x + * @since 2.25.0 * @default false */ collapsible: false, diff --git a/src/js/views/filters/FilterGroupsView.js b/src/js/views/filters/FilterGroupsView.js index 8e40ed76e..e19d757bc 100644 --- a/src/js/views/filters/FilterGroupsView.js +++ b/src/js/views/filters/FilterGroupsView.js @@ -74,7 +74,7 @@ define(['jquery', 'underscore', 'backbone', * If set to true, then all filters within this group will be collapsible. * See {@link FilterView#collapsible} * @type {boolean} - * @since x.x.x + * @since 2.25.0 * @default false */ collapsible: false, @@ -83,7 +83,7 @@ define(['jquery', 'underscore', 'backbone', * The initial query to use when the view is first rendered. This is a text value * that will be set on the general `text` Solr field. * @type {string} - * @since x.x.x + * @since 2.25.0 */ initialQuery: undefined, diff --git a/src/js/views/filters/FilterView.js b/src/js/views/filters/FilterView.js index 3f64d7d59..d3801ad6d 100644 --- a/src/js/views/filters/FilterView.js +++ b/src/js/views/filters/FilterView.js @@ -70,14 +70,14 @@ define(['jquery', 'underscore', 'backbone', * Whether the filter is collapsible. If true, the filter will have a button that * toggles the collapsed state. * @type {boolean} - * @since x.x.x + * @since 2.25.0 */ collapsible: false, /** * The class to add to the filter when it is collapsed. * @type {string} - * @since x.x.x + * @since 2.25.0 * @default "collapsed" */ collapsedClass: "collapsed", @@ -85,7 +85,7 @@ define(['jquery', 'underscore', 'backbone', /** * The class used for the button that toggles the collapsed state of the filter. * @type {string} - * @since x.x.x + * @since 2.25.0 * @default "collapse-toggle" */ collapseToggleClass: "collapse-toggle", @@ -95,7 +95,7 @@ define(['jquery', 'underscore', 'backbone', * Whatever this value is set to at initialization, will be how the filter is * initially rendered. * @type {boolean} - * @since x.x.x + * @since 2.25.0 * @default true */ collapsed: true, @@ -429,7 +429,7 @@ define(['jquery', 'underscore', 'backbone', * state is currently set. * @param {boolean} [collapse] Whether to collapse the filter. If not provided, the * filter will be collapsed if it is currently expanded, and vice versa. - * @since x.x.x + * @since 2.25.0 */ toggleCollapse: function (collapse) { try { diff --git a/src/js/views/search/CatalogSearchView.js b/src/js/views/search/CatalogSearchView.js index 5f23aa7c9..2dccc5559 100644 --- a/src/js/views/search/CatalogSearchView.js +++ b/src/js/views/search/CatalogSearchView.js @@ -69,7 +69,7 @@ define([ * The template to use in case there is a major error in rendering the * view. * @type {string} - * @since x.x.x + * @since 2.25.0 */ errorTemplate: `