From 9288e969cbd9d59246b9d2ec89a529d686f023df Mon Sep 17 00:00:00 2001 From: Robyn Thiessen-Bock Date: Fri, 2 Dec 2022 16:22:26 -0500 Subject: [PATCH] Remove references to dataCatalogMap option Fixes #2075 --- src/js/views/DataCatalogView.js | 36 +--------------------- src/js/views/DataCatalogViewWithFilters.js | 3 -- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/src/js/views/DataCatalogView.js b/src/js/views/DataCatalogView.js index 225d078f0..05b7b3f7e 100644 --- a/src/js/views/DataCatalogView.js +++ b/src/js/views/DataCatalogView.js @@ -163,9 +163,6 @@ define(["jquery", // 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) @@ -1843,7 +1840,7 @@ define(["jquery", 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; @@ -1855,31 +1852,6 @@ define(["jquery", $("body").addClass("mapMode"); } - // Render Cesium maps, if that is the map type rendered. - if (this.mapType == "cesium") { - var mapContainer = $("#map-container").append("
"); - - 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"); @@ -2169,12 +2141,6 @@ define(["jquery", **/ 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; diff --git a/src/js/views/DataCatalogViewWithFilters.js b/src/js/views/DataCatalogViewWithFilters.js index 161952eae..138f5285d 100644 --- a/src/js/views/DataCatalogViewWithFilters.js +++ b/src/js/views/DataCatalogViewWithFilters.js @@ -105,9 +105,6 @@ define(["jquery", 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(); }