Created
February 24, 2020 16:00
-
-
Save gannebamm/d48d2e67ae0c1e4cdebb51e2219bbfb7 to your computer and use it in GitHub Desktop.
Add Group Button for Mapstore2 with GeoNode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Needs base_plugins and map_viewer_plugins | |
var MS2_EDIT_PLUGINS = { | |
"desktop": [ | |
// Map from base BackgroundSelector, Identify from map_plugins | |
{ | |
"name": "TOC", | |
"cfg": { | |
"activateQueryTool": true, | |
"activateAddLayerButton": true, | |
"activateMetedataTool": false, | |
// ### Activate the Group Button in TOC | |
"activateAddGroupButton": true, | |
"spatialOperations": [{ | |
"id": "INTERSECTS", | |
"name": "queryform.spatialfilter.operations.intersects" | |
}, | |
{ | |
"id": "BBOX", | |
"name": "queryform.spatialfilter.operations.bbox" | |
}, | |
{ | |
"id": "CONTAINS", | |
"name": "queryform.spatialfilter.operations.contains" | |
}, | |
{ | |
"id": "WITHIN", | |
"name": "queryform.spatialfilter.operations.within" | |
} | |
], | |
"spatialMethodOptions": [{ | |
"id": "Viewport", | |
"name": "queryform.spatialfilter.methods.viewport" | |
}, | |
{ | |
"id": "BBOX", | |
"name": "queryform.spatialfilter.methods.box" | |
}, | |
{ | |
"id": "Circle", | |
"name": "queryform.spatialfilter.methods.circle" | |
}, | |
{ | |
"id": "Polygon", | |
"name": "queryform.spatialfilter.methods.poly" | |
} | |
] | |
} | |
}, | |
// Setting, Toolbar, MapLoading, DrawerMenu, Cookie, OmniBar, Expander, | |
// Undo, Redo, BurgerMenu, MapFooter, Measure, Print | |
// ZoomAll, ZoomIn, ZoomOut from base | |
// ScaleBox, FeatureEditor, QueryPanel, MetadataExplorer, GoFull, FullScreen | |
// Widgets, WidgetsTray, SaveAs, Notifications TOCItemSettings, from map_viewer_plugins | |
// // ### Add the AddGroup Settings | |
"AddGroup", | |
{ | |
"name": "Settings", | |
"cfg": { | |
"wrap": true | |
} | |
}, | |
"WidgetsBuilder", | |
"Save" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2017, GeoSolutions Sas. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
// geonode specific epics | |
const epics = require("./epics"); | |
module.exports = { | |
plugins: { | |
// // ### Add the AddGroup Button | |
AddGroupPlugin: require('../MapStore2/web/client/plugins/AddGroup').default, | |
IdentifyPlugin: require('../MapStore2/web/client/plugins/Identify'), | |
TOCPlugin: require('../MapStore2/web/client/plugins/TOC'), | |
MapPlugin: require('../MapStore2/web/client/plugins/Map'), | |
ToolbarPlugin: require('../MapStore2/web/client/plugins/Toolbar'), | |
DrawerMenuPlugin: require('../MapStore2/web/client/plugins/DrawerMenu'), | |
ZoomAllPlugin: require('../MapStore2/web/client/plugins/ZoomAll'), | |
MapLoadingPlugin: require('../MapStore2/web/client/plugins/MapLoading'), | |
OmniBarPlugin: require('../MapStore2/web/client/plugins/OmniBar'), | |
BackgroundSelectorPlugin: require('../MapStore2/web/client/plugins/BackgroundSelector'), | |
FullScreenPlugin: require('../MapStore2/web/client/plugins/FullScreen'), | |
ZoomInPlugin: require('../MapStore2/web/client/plugins/ZoomIn'), | |
ZoomOutPlugin: require('../MapStore2/web/client/plugins/ZoomOut'), | |
ExpanderPlugin: require('../MapStore2/web/client/plugins/Expander'), | |
BurgerMenuPlugin: require('../MapStore2/web/client/plugins/BurgerMenu'), | |
UndoPlugin: require('../MapStore2/web/client/plugins/History'), | |
RedoPlugin: require('../MapStore2/web/client/plugins/History'), | |
ScaleBoxPlugin: require('../MapStore2/web/client/plugins/ScaleBox'), | |
MapFooterPlugin: require('../MapStore2/web/client/plugins/MapFooter'), | |
PrintPlugin: require('../MapStore2/web/client/plugins/Print'), | |
MeasurePlugin: require('../MapStore2/web/client/plugins/Measure'), | |
TOCItemsSettingsPlugin: require('../MapStore2/web/client/plugins/TOCItemsSettings'), | |
WidgetsPlugin: require('../MapStore2/web/client/plugins/Widgets'), | |
WidgetsBuilderPlugin: require('../MapStore2/web/client/plugins/WidgetsBuilder'), | |
WidgetsTrayPlugin: require('../MapStore2/web/client/plugins/WidgetsTray'), | |
NotificationsPlugin: require('../MapStore2/web/client/plugins/Notifications'), | |
FeatureEditorPlugin: require('../MapStore2/web/client/plugins/FeatureEditor'), | |
QueryPanelPlugin: require('../MapStore2/web/client/plugins/QueryPanel'), | |
SavePlugin: require('../MapStore2/web/client/plugins/Save'), | |
SaveAsPlugin: require('../MapStore2/web/client/plugins/SaveAs'), | |
MetadataExplorerPlugin: require('../MapStore2/web/client/plugins/MetadataExplorer'), | |
GridContainerPlugin: require('../MapStore2/web/client/plugins/GridContainer'), | |
StyleEditorPlugin: require('../MapStore2/web/client/plugins/StyleEditor'), | |
TimelinePlugin: require('../MapStore2/web/client/plugins/Timeline'), | |
PlaybackPlugin: require('../MapStore2/web/client/plugins/Playback'), | |
MousePositionPlugin: require('../MapStore2/web/client/plugins/MousePosition'), | |
SearchPlugin: require('../MapStore2/web/client/plugins/Search'), | |
SearchServicesConfigPlugin: require('../MapStore2/web/client/plugins/SearchServicesConfig'), | |
AddReducersAndEpics: { | |
reducers: { | |
security: require('../MapStore2/web/client/reducers/security'), | |
maps: require('../MapStore2/web/client/reducers/maps'), | |
currentMap: require('../MapStore2/web/client/reducers/currentMap'), | |
maplayout: require('../MapStore2/web/client/reducers/maplayout') | |
}, | |
epics | |
} | |
}, | |
requires: { | |
ReactSwipe: require('react-swipeable-views').default, | |
SwipeHeader: require('../MapStore2/web/client/components/data/identify/SwipeHeader') | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment