Skip to content

Commit 6ef83c3

Browse files
committed
Hide the map download panel by default
Add option to MapConfig to show it Issue #1889
1 parent a0b8184 commit 6ef83c3

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/js/models/maps/Map.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ define([
8383
* users to click on map features to show more information about them. If
8484
* true, the {@link MapView} will render a {@link FeatureInfoView} and
8585
* will initialize "picking" in the {@link CesiumWidgetView}.
86+
* @property {boolean} [showDownloadPanel=false] - Set to true to enable
87+
* the partial download panel, see {@link DownloadPanelView}.
88+
* `showLayerList` must also be set to true.
8689
* @property {string} [clickFeatureAction="showDetails"] - The default
8790
* action to take when a user clicks on a feature on the map. The
8891
* available options are "showDetails" (show the feature details in the
@@ -214,6 +217,9 @@ define([
214217
* scale bar.
215218
* @property {boolean} [showFeatureInfo=true] - Whether or not to allow
216219
* users to click on map features to show more information about them.
220+
* @property {boolean} [showDownloadPanel=false] Whether or not to show
221+
* users the panel that allows partial download of data. `showLayerList`
222+
* must also be set to true.
217223
* @property {string} [clickFeatureAction="showDetails"] - The default
218224
* action to take when a user clicks on a feature on the map. The
219225
* available options are "showDetails" (show the feature details in the
@@ -257,6 +263,7 @@ define([
257263
toolbarOpen: false,
258264
showScaleBar: true,
259265
showFeatureInfo: true,
266+
showDownloadPanel: false,
260267
clickFeatureAction: "showDetails",
261268
showNavHelp: true,
262269
showFeedback: false,

src/js/views/maps/ToolbarView.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,8 @@ define([
196196
view.inactivateSection(downloadSectionEl);
197197
});
198198
},
199-
isVisible(_model) {
200-
// TODO: Add an option to show or hide the download panel
201-
// to the map model. It should be false by default, but
202-
// we should update the PDG portal to true.
203-
// return model.get("showDownloadPanel");
204-
return true;
199+
isVisible(model) {
200+
return model.get("showDownloadPanel") && model.get("showLayerList");
205201
},
206202
},
207203
{

0 commit comments

Comments
 (0)