Skip to content

Commit

Permalink
Remove references to dataCatalogMap option
Browse files Browse the repository at this point in the history
Fixes #2075
  • Loading branch information
robyngit committed Feb 3, 2023
1 parent fc8912e commit 9288e96
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
36 changes: 1 addition & 35 deletions src/js/views/DataCatalogView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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("<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");
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions src/js/views/DataCatalogViewWithFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 9288e96

Please sign in to comment.