@corpsmap/corpsmap 4.0.35 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/corpsmap.css +1 -0
- package/dist/corpsmap.es.js +63856 -0
- package/dist/corpsmap.umd.js +384 -0
- package/dist/vite.svg +1 -0
- package/package.json +73 -32
- package/src/App.css +42 -0
- package/src/App.jsx +12 -0
- package/src/application-bundles/_create-container-bundle.js +102 -0
- package/src/application-bundles/api-bundle.js +76 -0
- package/src/application-bundles/basic-toolbar-bundle.js +57 -0
- package/src/application-bundles/config-bundle.js +38 -0
- package/src/application-bundles/create-ol-map-bundle.jsx +278 -0
- package/src/application-bundles/export-bundle.js +125 -0
- package/src/application-bundles/identify-bundle.js +119 -0
- package/src/application-bundles/index.js +53 -0
- package/src/application-bundles/map-basemap-bundle.js +73 -0
- package/src/application-bundles/map-core-bundle.js +25 -0
- package/src/application-bundles/map-drawing-bundle.js +120 -0
- package/src/application-bundles/map-interaction-bundle.js +50 -0
- package/src/application-bundles/map-layers-bundle.js +816 -0
- package/src/application-bundles/map-proj-bundle.js +144 -0
- package/src/application-bundles/map-view-bundle.jsx +334 -0
- package/src/application-bundles/modal-window-bundle.js +5 -0
- package/src/application-bundles/notification-bundle.js +56 -0
- package/src/application-bundles/plugin-bundle.js +180 -0
- package/src/application-bundles/primary-panel-bundle.js +85 -0
- package/src/application-bundles/search-bundle.js +122 -0
- package/src/application-bundles/south-region-bundle.js +96 -0
- package/src/application-bundles/theme-bundle.js +45 -0
- package/src/application-bundles/vertical-layout-bundle.js +88 -0
- package/src/application-bundles/viewport-bundle.js +43 -0
- package/src/application-bundles/window-location-bundle.js +90 -0
- package/src/application-bundles-old/auth-bundle.js +130 -0
- package/src/application-bundles-old/config-bundle.js +29 -0
- package/src/application-bundles-old/ui-bundle.js +406 -0
- package/src/application-containers/basic-toolbar.jsx +24 -0
- package/src/application-containers/corpsmap.jsx +91 -0
- package/src/application-containers/left-sidebar.jsx +43 -0
- package/src/application-containers/lower-right-toolbar.jsx +29 -0
- package/src/application-containers/map.jsx +57 -0
- package/src/application-containers/modal-window.jsx +34 -0
- package/src/application-containers/north-region.jsx +26 -0
- package/src/application-containers/notification-pane.jsx +37 -0
- package/src/application-containers/notification-quadrant.jsx +20 -0
- package/src/application-containers/notification.jsx +91 -0
- package/src/application-containers/primary-panel.jsx +94 -0
- package/src/application-containers/right-sidebar.jsx +44 -0
- package/src/application-containers/south-region-tab.jsx +60 -0
- package/src/application-containers/south-region.jsx +75 -0
- package/src/application-containers/upper-right-toolbar.jsx +28 -0
- package/src/application-controls/basic-toolbar-button.jsx +124 -0
- package/src/application-controls/basic-toolbar-menu-divider.jsx +11 -0
- package/src/application-controls/basic-toolbar-menu-item.jsx +91 -0
- package/src/application-controls/basic-toolbar-menu-up.jsx +13 -0
- package/src/application-controls/basic-toolbar-menu.jsx +13 -0
- package/src/application-controls/basic-toolbar-submenu.jsx +14 -0
- package/src/application-controls/index.jsx +35 -0
- package/src/application-controls/loading-indicator.jsx +19 -0
- package/src/application-controls/search-input.jsx +55 -0
- package/src/application-controls/search-results-list-item.jsx +50 -0
- package/src/application-controls/search-results-list.jsx +19 -0
- package/src/application-controls/sidebar-button.jsx +69 -0
- package/src/application-controls/sidebar-panel-opener.jsx +63 -0
- package/src/application-controls/tree-list-folder.jsx +46 -0
- package/src/application-controls/tree-list-item.jsx +83 -0
- package/src/application-controls/tree-list.jsx +35 -0
- package/src/application-controls/tree-view.jsx +42 -0
- package/src/application-exports/map-provider.jsx +122 -0
- package/src/assets/react.svg +1 -0
- package/src/config/default-config.js +593 -0
- package/src/core-plugins/add-data/add-data-button.jsx +34 -0
- package/src/core-plugins/add-data/add-geojson.jsx +47 -0
- package/src/core-plugins/add-data/add-kmlfile.jsx +46 -0
- package/src/core-plugins/add-data/add-shapefile.jsx +47 -0
- package/src/core-plugins/add-data/bundle.js +226 -0
- package/src/core-plugins/add-data/index.js +15 -0
- package/src/core-plugins/basemap-switcher/basemap-switcher-button.jsx +18 -0
- package/src/core-plugins/basemap-switcher/basemap-switcher-list-item.jsx +48 -0
- package/src/core-plugins/basemap-switcher/basemap-switcher-list.jsx +37 -0
- package/src/core-plugins/basemap-switcher/index.js +13 -0
- package/src/core-plugins/bookmarks/bookmark-button.jsx +18 -0
- package/src/core-plugins/bookmarks/bookmark-list-item.jsx +79 -0
- package/src/core-plugins/bookmarks/bookmark-list.jsx +31 -0
- package/src/core-plugins/bookmarks/bookmark-panel.jsx +191 -0
- package/src/core-plugins/bookmarks/bundle.js +92 -0
- package/src/core-plugins/bookmarks/index.js +15 -0
- package/src/core-plugins/catalog/bundle.js +109 -0
- package/src/core-plugins/catalog/catalog-button.jsx +33 -0
- package/src/core-plugins/catalog/catalog-error-item.jsx +14 -0
- package/src/core-plugins/catalog/catalog-list-item-loader.jsx +12 -0
- package/src/core-plugins/catalog/catalog-list-item.jsx +118 -0
- package/src/core-plugins/catalog/catalog-list.jsx +78 -0
- package/src/core-plugins/catalog/catalog-modal-window.jsx +100 -0
- package/src/core-plugins/catalog/index.js +15 -0
- package/src/core-plugins/change-log/bundle.js +180 -0
- package/src/core-plugins/change-log/change-log-button.jsx +40 -0
- package/src/core-plugins/change-log/change-log-modal.jsx +190 -0
- package/src/core-plugins/change-log/index.js +15 -0
- package/src/core-plugins/change-log/select-district.jsx +73 -0
- package/src/core-plugins/contact-form/bundle.js +239 -0
- package/src/core-plugins/contact-form/index.js +17 -0
- package/src/core-plugins/contact-form/question-button.jsx +36 -0
- package/src/core-plugins/contact-form/question-modal.jsx +215 -0
- package/src/core-plugins/coordinate-display/bundle.jsx +269 -0
- package/src/core-plugins/coordinate-display/coordinate-display-bar.jsx +66 -0
- package/src/core-plugins/coordinate-display/coordinate-display-proj-item.jsx +60 -0
- package/src/core-plugins/coordinate-display/coordinate-display-settings.jsx +173 -0
- package/src/core-plugins/coordinate-display/coordinate-interaction-bar.jsx +60 -0
- package/src/core-plugins/coordinate-display/coordinate-lat-lon-input.jsx +35 -0
- package/src/core-plugins/coordinate-display/coordinate-popup.jsx +27 -0
- package/src/core-plugins/coordinate-display/index.js +20 -0
- package/src/core-plugins/draw-tools/create-draw-bundle.js +242 -0
- package/src/core-plugins/draw-tools/draw-button.jsx +204 -0
- package/src/core-plugins/draw-tools/draw-label-bundle.js +116 -0
- package/src/core-plugins/draw-tools/draw-modify-bundle.js +156 -0
- package/src/core-plugins/draw-tools/draw-save-bundle.jsx +181 -0
- package/src/core-plugins/draw-tools/draw-styles.js +110 -0
- package/src/core-plugins/draw-tools/draw-tool-item.jsx +67 -0
- package/src/core-plugins/draw-tools/index.js +34 -0
- package/src/core-plugins/draw-tools-old/create-draw-bundle.js +222 -0
- package/src/core-plugins/draw-tools-old/draw-button.js +189 -0
- package/src/core-plugins/draw-tools-old/draw-label-bundle.js +116 -0
- package/src/core-plugins/draw-tools-old/draw-modify-bundle.js +156 -0
- package/src/core-plugins/draw-tools-old/draw-styles.js +110 -0
- package/src/core-plugins/draw-tools-old/draw-tool-item.js +67 -0
- package/src/core-plugins/draw-tools-old/index.js +32 -0
- package/src/core-plugins/editor/bundle.js +472 -0
- package/src/core-plugins/editor/date-editor.js +63 -0
- package/src/core-plugins/editor/date-formatter.js +17 -0
- package/src/core-plugins/editor/editor-base.js +29 -0
- package/src/core-plugins/editor/editor-button.js +224 -0
- package/src/core-plugins/editor/editor-table.js +151 -0
- package/src/core-plugins/editor/index.js +15 -0
- package/src/core-plugins/editor/number-editor.js +57 -0
- package/src/core-plugins/editor/string-editor.js +42 -0
- package/src/core-plugins/geocoder/bundle.jsx +186 -0
- package/src/core-plugins/geocoder/index.js +15 -0
- package/src/core-plugins/geocoder/overlay.jsx +30 -0
- package/src/core-plugins/geocoder/search-bar.js copy.save +123 -0
- package/src/core-plugins/geocoder/search-bar.jsx +121 -0
- package/src/core-plugins/identify/bundle.jsx +709 -0
- package/src/core-plugins/identify/identify-buffer-section.jsx +52 -0
- package/src/core-plugins/identify/identify-buffer-settings.jsx +48 -0
- package/src/core-plugins/identify/identify-button.jsx +100 -0
- package/src/core-plugins/identify/identify-details-table.jsx +121 -0
- package/src/core-plugins/identify/identify-details.js +69 -0
- package/src/core-plugins/identify/identify-popup.jsx +136 -0
- package/src/core-plugins/identify/identify-sidebar-list-item.jsx +106 -0
- package/src/core-plugins/identify/identify-sidebar-list.jsx +63 -0
- package/src/core-plugins/identify/identify-sidebar.jsx +103 -0
- package/src/core-plugins/identify/identify-table-cell.jsx +49 -0
- package/src/core-plugins/identify/identify-table.jsx +319 -0
- package/src/core-plugins/identify/index.js +27 -0
- package/src/core-plugins/identify/listeners/arcgis.js +158 -0
- package/src/core-plugins/identify/listeners/geojson.jsx +164 -0
- package/src/core-plugins/identify/listeners/raster.js +89 -0
- package/src/core-plugins/identify/listeners/vector.jsx +106 -0
- package/src/core-plugins/identify-arcgis-rest/bundle.js +169 -0
- package/src/core-plugins/identify-arcgis-rest/index.js +10 -0
- package/src/core-plugins/identify-cm/bundle.js +82 -0
- package/src/core-plugins/identify-cm/index.js +10 -0
- package/src/core-plugins/identify-geojson/bundle.js +164 -0
- package/src/core-plugins/identify-geojson/index.js +10 -0
- package/src/core-plugins/identify-raster/bundle.js +89 -0
- package/src/core-plugins/identify-raster/index.js +10 -0
- package/src/core-plugins/identify-vector/bundle.jsx +135 -0
- package/src/core-plugins/identify-vector/index.js +10 -0
- package/src/core-plugins/identify-wms/bundle.js +138 -0
- package/src/core-plugins/identify-wms/index.js +10 -0
- package/src/core-plugins/legend/bundle.js +1044 -0
- package/src/core-plugins/legend/index.js +17 -0
- package/src/core-plugins/legend/legend-button.jsx +18 -0
- package/src/core-plugins/legend/legend-header.jsx +43 -0
- package/src/core-plugins/legend/legend-item-multiple.jsx +32 -0
- package/src/core-plugins/legend/legend-item.jsx +20 -0
- package/src/core-plugins/legend/legend-panel.jsx +73 -0
- package/src/core-plugins/login/index.js +13 -0
- package/src/core-plugins/login/login-button.jsx +49 -0
- package/src/core-plugins/map-loading-indicator/bundle.js +31 -0
- package/src/core-plugins/map-loading-indicator/index.js +17 -0
- package/src/core-plugins/map-loading-indicator/loading-indicator.jsx +30 -0
- package/src/core-plugins/measure-tools/bundle.js +286 -0
- package/src/core-plugins/measure-tools/index.js +15 -0
- package/src/core-plugins/measure-tools/measure-options.jsx +89 -0
- package/src/core-plugins/measure-tools/measure-tools-button.jsx +129 -0
- package/src/core-plugins/measure-tools/measure-utils.js +76 -0
- package/src/core-plugins/permalink/bundle.js +57 -0
- package/src/core-plugins/permalink/index.js +15 -0
- package/src/core-plugins/permalink/permalink-button.jsx +38 -0
- package/src/core-plugins/permalink/permalink-modal.jsx +67 -0
- package/src/core-plugins/print-map/bundle.jsx +316 -0
- package/src/core-plugins/print-map/button.jsx +17 -0
- package/src/core-plugins/print-map/index.js +17 -0
- package/src/core-plugins/resources/bundle.js +96 -0
- package/src/core-plugins/resources/index.js +15 -0
- package/src/core-plugins/resources/resources-button.jsx +40 -0
- package/src/core-plugins/resources/resources-modal.jsx +151 -0
- package/src/core-plugins/rotate-north/index.js +13 -0
- package/src/core-plugins/rotate-north/rotate-north-button.jsx +38 -0
- package/src/core-plugins/theme-switcher/bundle.js +16 -0
- package/src/core-plugins/theme-switcher/index.js +15 -0
- package/src/core-plugins/theme-switcher/theme-list-item.jsx +25 -0
- package/src/core-plugins/theme-switcher/theme-list.jsx +28 -0
- package/src/core-plugins/theme-switcher/theme-switcher-button.jsx +18 -0
- package/src/core-plugins/theme-switcher/themes.js +121 -0
- package/src/core-plugins/three-d/index.js +13 -0
- package/src/core-plugins/three-d/three-d-button.jsx +44 -0
- package/src/core-plugins/tree-view/boundary-drop-target.jsx +42 -0
- package/src/core-plugins/tree-view/bundle.js +513 -0
- package/src/core-plugins/tree-view/dataset-info-modal.jsx +141 -0
- package/src/core-plugins/tree-view/dataset-legend.jsx +122 -0
- package/src/core-plugins/tree-view/defaults-container.jsx +27 -0
- package/src/core-plugins/tree-view/download-bundle.js +156 -0
- package/src/core-plugins/tree-view/favorites-container.jsx +27 -0
- package/src/core-plugins/tree-view/index.js +25 -0
- package/src/core-plugins/tree-view/layer-subpanel/defaults-toggle.jsx +28 -0
- package/src/core-plugins/tree-view/layer-subpanel/download-layer.jsx +54 -0
- package/src/core-plugins/tree-view/layer-subpanel/favorites-toggle.jsx +28 -0
- package/src/core-plugins/tree-view/layer-subpanel/label-toggle.jsx +39 -0
- package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.jsx +179 -0
- package/src/core-plugins/tree-view/layer-subpanel/natick-rgb-options.jsx +66 -0
- package/src/core-plugins/tree-view/layer-subpanel/natick-rgb.jsx +112 -0
- package/src/core-plugins/tree-view/layer-subpanel/opacity-slider.jsx +51 -0
- package/src/core-plugins/tree-view/layer-subpanel/remove-layer.jsx +75 -0
- package/src/core-plugins/tree-view/tree-list-container.jsx +22 -0
- package/src/core-plugins/tree-view/tree-list-item-dataset.jsx +174 -0
- package/src/core-plugins/tree-view/tree-list-item-folder.jsx +161 -0
- package/src/core-plugins/tree-view/tree-list-item.jsx +35 -0
- package/src/core-plugins/tree-view/tree-list.jsx +37 -0
- package/src/core-plugins/tree-view/tree-view-button.jsx +18 -0
- package/src/core-plugins/tree-view/tree-view-panel.jsx +139 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/add-all.jsx +28 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/defaults.jsx +40 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/favorites.jsx +40 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/remove-all.jsx +28 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/toggle-expand.jsx +47 -0
- package/src/core-plugins/tree-view/tree-view-toolbar/toggle-filter.jsx +39 -0
- package/src/core-plugins/vector-search/bundle.js +96 -0
- package/src/core-plugins/vector-search/index.js +10 -0
- package/src/core-plugins/zoom-home/bundle.js +77 -0
- package/src/core-plugins/zoom-home/index.js +19 -0
- package/src/core-plugins/zoom-home/zoom-home-button.jsx +57 -0
- package/src/core-plugins/zoom-in-out/index.js +23 -0
- package/src/core-plugins/zoom-in-out/zoom-in-button.jsx +28 -0
- package/src/core-plugins/zoom-in-out/zoom-out-button.jsx +28 -0
- package/src/core-plugins/zoom-level/bundle.js +35 -0
- package/src/core-plugins/zoom-level/index.js +17 -0
- package/src/core-plugins/zoom-level/zoom-indicator.jsx +34 -0
- package/src/core-plugins/zoom-to-box/bundle.js +80 -0
- package/src/core-plugins/zoom-to-box/index.jsx +15 -0
- package/src/core-plugins/zoom-to-box/zoom-to-box-button.jsx +53 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-paper.css +7606 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-paper.min.css +8083 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-simplex.min.css +7328 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.css +587 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.css.map +1 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.min.css +6 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap-theme.min.css.map +1 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.css +7137 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.css.map +142 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.min.css +7132 -0
- package/src/css/_deprecated_bootstrap/css/bootstrap.min.css.map +143 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- package/src/css/_deprecated_bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/src/css/_deprecated_bootstrap/js/bootstrap.js +2377 -0
- package/src/css/_deprecated_bootstrap/js/bootstrap.min.js +7 -0
- package/src/css/_deprecated_bootstrap/js/npm.js +13 -0
- package/src/css/_deprecated_maki/css/maki.css +304 -0
- package/src/css/_deprecated_maki/fonts/maki.eot +0 -0
- package/src/css/_deprecated_maki/fonts/maki.svg +98 -0
- package/src/css/_deprecated_maki/fonts/maki.ttf +0 -0
- package/src/css/_deprecated_maki/fonts/maki.woff +0 -0
- package/src/css/bg-colors.css +121 -0
- package/src/css/cm-icons/css/cm-icons.css +90 -0
- package/src/css/cm-icons/fonts/cm.eot +0 -0
- package/src/css/cm-icons/fonts/cm.svg +27 -0
- package/src/css/cm-icons/fonts/cm.ttf +0 -0
- package/src/css/cm-icons/fonts/cm.woff +0 -0
- package/src/css/corpsmap-namespaced.css +9505 -0
- package/src/css/corpsmap.css +10178 -0
- package/src/css/loading-indicator.css +109 -0
- package/src/css/mapskin/OFL.txt +94 -0
- package/src/css/mapskin/css/mapskin.css +815 -0
- package/src/css/mapskin/css/mapskin.min.css +8 -0
- package/src/css/mapskin/fonts/mapskin.eot +0 -0
- package/src/css/mapskin/fonts/mapskin.svg +282 -0
- package/src/css/mapskin/fonts/mapskin.ttf +0 -0
- package/src/css/mapskin/fonts/mapskin.woff +0 -0
- package/src/css/mdi/.github/ISSUE_TEMPLATE.md +3 -0
- package/src/css/mdi/README.md +24 -0
- package/src/css/mdi/bower.json +22 -0
- package/src/css/mdi/css/materialdesignicons.css +18654 -0
- package/src/css/mdi/css/materialdesignicons.css.map +16 -0
- package/src/css/mdi/css/materialdesignicons.min.css +3 -0
- package/src/css/mdi/css/materialdesignicons.min.css.map +16 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.eot +0 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.ttf +0 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.woff +0 -0
- package/src/css/mdi/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/src/css/mdi/license.md +97 -0
- package/src/css/mdi/package.json +37 -0
- package/src/css/mdi/preview.html +717 -0
- package/src/css/mdi/scss/_animated.scss +27 -0
- package/src/css/mdi/scss/_core.scss +10 -0
- package/src/css/mdi/scss/_extras.scss +65 -0
- package/src/css/mdi/scss/_functions.scss +20 -0
- package/src/css/mdi/scss/_icons.scss +10 -0
- package/src/css/mdi/scss/_path.scss +10 -0
- package/src/css/mdi/scss/_variables.scss +4606 -0
- package/src/css/mdi/scss/materialdesignicons.scss +8 -0
- package/src/css/navigation.css +174 -0
- package/src/css/parse-css.js +26 -0
- package/src/css/reset.css +48 -0
- package/src/index.css +68 -0
- package/src/index.jsx +113 -0
- package/src/main.jsx +3 -0
- package/src/openlayers-utils/format-utilities.js +178 -0
- package/src/openlayers-utils/interaction-creator.js +31 -0
- package/src/openlayers-utils/layer-utilities.js +309 -0
- package/src/openlayers-utils/map-utils.js +25 -0
- package/src/openlayers-utils/resource-utilities.js +38 -0
- package/src/openlayers-utils/vector-style.js +131 -0
- package/src/utils/cache.js +6 -0
- package/src/utils/check-webgl.js +6 -0
- package/src/utils/error-boundary.js +26 -0
- package/src/utils/load-plugins.js +32 -0
- package/src/utils/load-plugins.test.js +36 -0
- package/src/utils/plugin-region.jsx +26 -0
- package/src/utils/redux-bundler-react.jsx +69 -0
- package/src/utils/scale-to-zoom-level.js +37 -0
- package/src/utils/vector-styles.js +7 -0
- package/.babelrc +0 -7
- package/config/basemaps.js +0 -22
- package/css/corpsmap.css +0 -7982
- package/index.js +0 -5
- package/lib/dev.js +0 -41517
- package/lib/prod.js +0 -41483
- package/rollup.config.js +0 -30
- package/src/bundles/_template-bundle-creator.js +0 -49
- package/src/bundles/create-basemap-bundle-old.js +0 -107
- package/src/bundles/create-basemap-bundle.js +0 -133
- package/src/bundles/create-ol-map-bundle.js +0 -166
- package/src/bundles/create-ol-view-bundle.js +0 -79
- package/src/bundles/map-basemap-bundle.js +0 -42
- package/src/bundles/map-bundle.js +0 -90
- package/src/bundles/map-interaction-bundle.js +0 -57
- package/src/bundles/map-measure-bundle.js +0 -61
- package/src/bundles/map-view-bundle.js +0 -34
- package/src/components/BasemapSwitcherLight/BasemapMenu.js +0 -26
- package/src/components/BasemapSwitcherLight/BasemapMenuItem.js +0 -31
- package/src/components/BasemapSwitcherLight/index.js +0 -25
- package/src/components/Control-Regions/BtnContainer.js +0 -20
- package/src/components/Control-Regions/Right.js +0 -30
- package/src/components/Control-Regions/Top.js +0 -19
- package/src/components/Control-Regions/index.js +0 -4
- package/src/components/LayerTree/index.js +0 -10
- package/src/components/Map.js +0 -56
- package/src/components/MeasureTool/Content.js +0 -38
- package/src/components/MeasureTool/index.js +0 -125
- package/src/components/MeasureTool/measure-utils.js +0 -57
- package/src/components/Zoom/index.js +0 -28
- package/src/components/index.js +0 -3
- package/src/index.js +0 -11
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
import MarkdownIt from "markdown-it";
|
|
4
|
+
import xhr from "xhr";
|
|
5
|
+
|
|
6
|
+
class DatasetLegend extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.state = {
|
|
10
|
+
__html: "<p>Loading</p>",
|
|
11
|
+
};
|
|
12
|
+
this.close = this.close.bind(this);
|
|
13
|
+
this.renderAsync = this.renderAsync.bind(this);
|
|
14
|
+
this.renderContent = this.renderContent.bind(this);
|
|
15
|
+
this.renderMarkdown = this.renderMarkdown.bind(this);
|
|
16
|
+
this.renderIframe = this.renderIframe.bind(this);
|
|
17
|
+
this.renderImage = this.renderImage.bind(this);
|
|
18
|
+
this.renderRawAsync = this.renderRawAsync.bind(this);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
componentDidMount() {
|
|
22
|
+
const { item } = this.props;
|
|
23
|
+
if (item.info) {
|
|
24
|
+
if (item.info.url) {
|
|
25
|
+
if (item.info.iframe) {
|
|
26
|
+
return this.renderIframe();
|
|
27
|
+
} else if (item.info.img) {
|
|
28
|
+
return this.renderImage();
|
|
29
|
+
} else if (item.info.raw) {
|
|
30
|
+
return this.renderRawAsync();
|
|
31
|
+
} else {
|
|
32
|
+
return this.renderAsync();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (item.info.content) {
|
|
36
|
+
if (item.info.raw) {
|
|
37
|
+
return this.renderRawContent();
|
|
38
|
+
} else {
|
|
39
|
+
return this.renderContent();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
close() {
|
|
46
|
+
const { doModalClose } = this.props;
|
|
47
|
+
doModalClose();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
renderMarkdown(content) {
|
|
51
|
+
const md = new MarkdownIt();
|
|
52
|
+
this.setState({
|
|
53
|
+
__html: md.render(content),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
renderContent() {
|
|
58
|
+
const { item } = this.props;
|
|
59
|
+
const { content } = item.info;
|
|
60
|
+
return this.renderMarkdown(content);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
renderRawContent() {
|
|
64
|
+
const { item } = this.props;
|
|
65
|
+
const { content } = item.info;
|
|
66
|
+
return this.setState({ __html: content });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
renderAsync() {
|
|
70
|
+
const { item } = this.props;
|
|
71
|
+
const { url } = item.info;
|
|
72
|
+
xhr.get(url, (err, response, body) => {
|
|
73
|
+
if (err) {
|
|
74
|
+
this.renderMarkdown("Error Loading Content");
|
|
75
|
+
} else {
|
|
76
|
+
this.renderMarkdown(body);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
renderRawAsync() {
|
|
82
|
+
const { item } = this.props;
|
|
83
|
+
const { url } = item.info;
|
|
84
|
+
xhr.get(url, (err, response, body) => {
|
|
85
|
+
if (err) {
|
|
86
|
+
this.setState({ __html: "<p>Error Loading Content</p>" });
|
|
87
|
+
} else {
|
|
88
|
+
this.setState({ __html: body });
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
renderIframe() {
|
|
94
|
+
const { item } = this.props;
|
|
95
|
+
const { url } = item.info;
|
|
96
|
+
this.setState({
|
|
97
|
+
__html: `<iframe src="${url}" frameborder="0"></iframe>`,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
renderImage() {
|
|
102
|
+
const { item } = this.props;
|
|
103
|
+
const { url } = item.info;
|
|
104
|
+
this.setState({
|
|
105
|
+
__html: `<img src="${url}"></img>`,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
render() {
|
|
110
|
+
const { theme, item } = this.props;
|
|
111
|
+
return (
|
|
112
|
+
<div>
|
|
113
|
+
<div
|
|
114
|
+
style={{ paddingLeft: "30px" }}
|
|
115
|
+
dangerouslySetInnerHTML={this.state}
|
|
116
|
+
></div>
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export default connect("selectTheme", DatasetLegend);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TreeList from "./tree-list";
|
|
3
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
4
|
+
|
|
5
|
+
class DefaultsContainer extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
const { userDefaultLayers, treeRootNode } = this.props;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div>
|
|
11
|
+
<TreeList
|
|
12
|
+
items={userDefaultLayers}
|
|
13
|
+
isFolder={true}
|
|
14
|
+
collapsed={false}
|
|
15
|
+
listStyle={{ padding: 0 }}
|
|
16
|
+
showUserDefaultLayers={true}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default connect(
|
|
24
|
+
"selectUserDefaultLayers",
|
|
25
|
+
"selectTreeRootNode",
|
|
26
|
+
DefaultsContainer
|
|
27
|
+
);
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
let req = null;
|
|
2
|
+
export const treeViewDownload = {
|
|
3
|
+
name: "treeviewDownload",
|
|
4
|
+
|
|
5
|
+
getReducer() {
|
|
6
|
+
const initialData = {
|
|
7
|
+
enabled: false,
|
|
8
|
+
_shouldFormatData: false,
|
|
9
|
+
_shouldFormatUrl: false,
|
|
10
|
+
activeFormat: "geojson",
|
|
11
|
+
formats: ["geojson", "shapefile", "FileGDB"],
|
|
12
|
+
data: null,
|
|
13
|
+
url: null,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return (state = initialData, { type, payload }) => {
|
|
17
|
+
switch (type) {
|
|
18
|
+
case "TREEVIEW_DETAILS_DISPLAYED":
|
|
19
|
+
return Object.assign({}, state, {
|
|
20
|
+
_shouldFormatUrl: true,
|
|
21
|
+
});
|
|
22
|
+
case "TREEVIEW_DOWNLOAD_ENABLED":
|
|
23
|
+
case "TREEVIEW_DOWNLOAD_FORMAT_UPDATED":
|
|
24
|
+
case "TREEVIEW_DOWNLOAD_FETCHED_DATA":
|
|
25
|
+
case "TREEVIEW_DOWNLOAD_FORMAT_INITIATED":
|
|
26
|
+
case "TREEVIEW_DOWNLOAD_FORMAT_URL_INITIATED":
|
|
27
|
+
case "TREEVIEW_DOWNLOAD_FORMAT_URL_COMPLETED":
|
|
28
|
+
return Object.assign({}, state, payload);
|
|
29
|
+
default:
|
|
30
|
+
return state;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
doEnableTreeViewLayerDownload:
|
|
35
|
+
() =>
|
|
36
|
+
({ dispatch }) => {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: "TREEVIEW_DOWNLOAD_ENABLED",
|
|
39
|
+
payload: { enabled: true },
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
doUpdateTreeViewLayerDownloadFormat:
|
|
43
|
+
(e) =>
|
|
44
|
+
({ dispatch, store }) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
const layer = store.selectTreeViewSelectedItem();
|
|
48
|
+
const format = e.target.value;
|
|
49
|
+
let url = null;
|
|
50
|
+
if (layer.identifyType === "MAP") {
|
|
51
|
+
const params = `?&service=WFS&version=1.1.0&request=GetFeature&typeName=${layer.layerList}&outputformat=${format}&outfile=${layer.layerList}`;
|
|
52
|
+
url = `${layer.url}${params}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
dispatch({
|
|
56
|
+
type: "TREEVIEW_DOWNLOAD_FORMAT_UPDATED",
|
|
57
|
+
payload: { activeFormat: format, url: url },
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
doFetchLayerInfoForTreeView:
|
|
61
|
+
(url) =>
|
|
62
|
+
({ dispatch, store, anonGet }) => {
|
|
63
|
+
if (req) req.abort();
|
|
64
|
+
req = anonGet(url, (err, response, body) => {
|
|
65
|
+
if (err || response.statusCode !== 200) {
|
|
66
|
+
console.log(err);
|
|
67
|
+
dispatch({
|
|
68
|
+
type: "TREEVIEW_DOWNLOAD_FETCHED_DATA",
|
|
69
|
+
payload: {
|
|
70
|
+
data: null,
|
|
71
|
+
notification: {
|
|
72
|
+
level: "danger",
|
|
73
|
+
title: "Error Retrieving Data",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
const data = JSON.parse(body);
|
|
80
|
+
dispatch({
|
|
81
|
+
type: "TREEVIEW_DOWNLOAD_FETCHED_DATA",
|
|
82
|
+
payload: { data: data, _shouldFormatData: true },
|
|
83
|
+
});
|
|
84
|
+
} catch (error) {
|
|
85
|
+
console.log(error);
|
|
86
|
+
dispatch({
|
|
87
|
+
type: "TREEVIEW_DOWNLOAD_FETCHED_DATA",
|
|
88
|
+
payload: {
|
|
89
|
+
data: null,
|
|
90
|
+
notification: {
|
|
91
|
+
level: "danger",
|
|
92
|
+
title: "Error Retrieving Data",
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
doFormatTreeViewDownloadUrl:
|
|
100
|
+
() =>
|
|
101
|
+
({ dispatch, store }) => {
|
|
102
|
+
dispatch({
|
|
103
|
+
type: "TREEVIEW_DOWNLOAD_FORMAT_URL_INITIATED",
|
|
104
|
+
payload: { _shouldFormatUrl: false },
|
|
105
|
+
});
|
|
106
|
+
const layer = store.selectTreeViewSelectedItem();
|
|
107
|
+
const format = store.selectTreeViewDownloadActiveFormat();
|
|
108
|
+
let url = null;
|
|
109
|
+
switch (layer.identifyType) {
|
|
110
|
+
case "MAP":
|
|
111
|
+
const params = `?&service=WFS&version=1.1.0&request=GetFeature&typeName=${layer.layerList}&outputformat=${format}&outfile=${layer.layerList}`;
|
|
112
|
+
url = `${layer.url}${params}`;
|
|
113
|
+
break;
|
|
114
|
+
default:
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
dispatch({
|
|
118
|
+
type: "TREEVIEW_DOWNLOAD_FORMAT_URL_COMPLETED",
|
|
119
|
+
payload: { url: url },
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
doFormatTreeViewDownloadData:
|
|
123
|
+
() =>
|
|
124
|
+
({ dispatch, store }) => {
|
|
125
|
+
dispatch({
|
|
126
|
+
type: "TREEVIEW_DOWNLOAD_FORMAT_INITIATED",
|
|
127
|
+
payload: { _shouldFormatData: false },
|
|
128
|
+
});
|
|
129
|
+
const format = store.selectTreeViewDownloadActiveFormat();
|
|
130
|
+
const data = store.selectTreeViewDownloadLayerData();
|
|
131
|
+
},
|
|
132
|
+
selectTreeViewDownloadEnabled: (state) => {
|
|
133
|
+
return state.treeviewDownload.enabled;
|
|
134
|
+
},
|
|
135
|
+
selectTreeViewDownloadActiveFormat: (state) => {
|
|
136
|
+
return state.treeviewDownload.activeFormat;
|
|
137
|
+
},
|
|
138
|
+
selectTreeViewDownloadFormats: (state) => {
|
|
139
|
+
return state.treeviewDownload.formats;
|
|
140
|
+
},
|
|
141
|
+
selectTreeViewDownloadLayerData: (state) => {
|
|
142
|
+
return state.treeviewDownload.data;
|
|
143
|
+
},
|
|
144
|
+
selectTreeViewDownloadLayerUrl: (state) => {
|
|
145
|
+
return state.treeviewDownload.url;
|
|
146
|
+
},
|
|
147
|
+
reactTreeViewDownloadShouldFormatData: (state) => {
|
|
148
|
+
if (state.treeviewDownload._shouldFormatData)
|
|
149
|
+
return { actionCreator: "doFormatTreeViewDownloadData" };
|
|
150
|
+
},
|
|
151
|
+
reactTreeViewDownloadShouldFormatUrl: (state) => {
|
|
152
|
+
if (state.treeviewDownload._shouldFormatUrl)
|
|
153
|
+
return { actionCreator: "doFormatTreeViewDownloadUrl" };
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
export default treeViewDownload;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TreeList from "./tree-list";
|
|
3
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
4
|
+
|
|
5
|
+
class FavoritesContainer extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
const { favoriteLayers, treeRootNode } = this.props;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div>
|
|
11
|
+
<TreeList
|
|
12
|
+
items={favoriteLayers}
|
|
13
|
+
isFolder={true}
|
|
14
|
+
collapsed={false}
|
|
15
|
+
listStyle={{ padding: 0 }}
|
|
16
|
+
showFavorites={true}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default connect(
|
|
24
|
+
"selectFavoriteLayers",
|
|
25
|
+
"selectTreeRootNode",
|
|
26
|
+
FavoritesContainer
|
|
27
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import TreeviewButton from "./tree-view-button";
|
|
2
|
+
import bundle from "./bundle";
|
|
3
|
+
import downloadBundle from "./download-bundle";
|
|
4
|
+
|
|
5
|
+
export const plugin = (controls) => {
|
|
6
|
+
return {
|
|
7
|
+
pluginName: "LayerTree",
|
|
8
|
+
enabled: true,
|
|
9
|
+
bundle: controls
|
|
10
|
+
? [bundle(controls), downloadBundle]
|
|
11
|
+
: [
|
|
12
|
+
bundle(["toggleExpand", "addAll", "removeAll", "toggleFilter"]),
|
|
13
|
+
downloadBundle,
|
|
14
|
+
],
|
|
15
|
+
components: [
|
|
16
|
+
{
|
|
17
|
+
component: TreeviewButton,
|
|
18
|
+
region: "left-sidebar-top",
|
|
19
|
+
sortOrder: 20,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default plugin;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../../utils/redux-bundler-react";
|
|
3
|
+
|
|
4
|
+
const DefaultsToggle = (props) => {
|
|
5
|
+
const { doToggleUserDefaultLayersAdd, layer } = props;
|
|
6
|
+
const btnTxt = layer.userDefaultLayer
|
|
7
|
+
? "REMOVE FROM DEFAULT LAYERS"
|
|
8
|
+
: "ADD TO DEFAULT LAYERS";
|
|
9
|
+
if (!layer.id) {
|
|
10
|
+
return null;
|
|
11
|
+
} else {
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<button
|
|
15
|
+
onClick={() => {
|
|
16
|
+
doToggleUserDefaultLayersAdd(layer, !layer.userDefaultLayer);
|
|
17
|
+
}}
|
|
18
|
+
type="button"
|
|
19
|
+
className="cm-btn cm-btn-xs cm-btn-default"
|
|
20
|
+
title={btnTxt}
|
|
21
|
+
>
|
|
22
|
+
{btnTxt}
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export default connect("doToggleUserDefaultLayersAdd", DefaultsToggle);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../../utils/redux-bundler-react";
|
|
3
|
+
|
|
4
|
+
const DownloadLayer = (props) => {
|
|
5
|
+
const {
|
|
6
|
+
treeViewDownloadActiveFormat,
|
|
7
|
+
treeViewDownloadFormats,
|
|
8
|
+
treeViewDownloadLayerUrl,
|
|
9
|
+
doUpdateTreeViewLayerDownloadFormat,
|
|
10
|
+
} = props;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<form className="cm-form-inline">
|
|
14
|
+
<div className="cm-form-group">
|
|
15
|
+
<label>
|
|
16
|
+
<b>Download Type:</b>
|
|
17
|
+
</label>
|
|
18
|
+
<select
|
|
19
|
+
onChange={(e) => {
|
|
20
|
+
doUpdateTreeViewLayerDownloadFormat(e);
|
|
21
|
+
}}
|
|
22
|
+
value={treeViewDownloadActiveFormat}
|
|
23
|
+
className="cm-form-control"
|
|
24
|
+
style={{ margin: "0 5px" }}
|
|
25
|
+
>
|
|
26
|
+
{treeViewDownloadFormats.map((format) => {
|
|
27
|
+
return (
|
|
28
|
+
<option key={format} value={format}>
|
|
29
|
+
{format}
|
|
30
|
+
</option>
|
|
31
|
+
);
|
|
32
|
+
})}
|
|
33
|
+
</select>
|
|
34
|
+
</div>
|
|
35
|
+
<a
|
|
36
|
+
rel="noopener noreferrer"
|
|
37
|
+
type="submit"
|
|
38
|
+
href={treeViewDownloadLayerUrl}
|
|
39
|
+
title="Download Layer"
|
|
40
|
+
target="_blank"
|
|
41
|
+
className="cm-btn cm-btn-xs cm-btn-link"
|
|
42
|
+
>
|
|
43
|
+
<i className="mdi mdi-cloud-download" style={{ fontSize: "22px" }} />
|
|
44
|
+
</a>
|
|
45
|
+
</form>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
export default connect(
|
|
49
|
+
"selectTreeViewDownloadActiveFormat",
|
|
50
|
+
"selectTreeViewDownloadFormats",
|
|
51
|
+
"selectTreeViewDownloadLayerUrl",
|
|
52
|
+
"doUpdateTreeViewLayerDownloadFormat",
|
|
53
|
+
DownloadLayer
|
|
54
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../../utils/redux-bundler-react";
|
|
3
|
+
|
|
4
|
+
const FavoritesToggle = (props) => {
|
|
5
|
+
const { doToggleLayerFavoritesAdd, layer } = props;
|
|
6
|
+
const btnTxt = layer.favorite
|
|
7
|
+
? "REMOVE FROM FAVORITE LAYERS"
|
|
8
|
+
: "ADD TO FAVORITE LAYERS";
|
|
9
|
+
if (!layer.id) {
|
|
10
|
+
return null;
|
|
11
|
+
} else {
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<button
|
|
15
|
+
onClick={() => {
|
|
16
|
+
doToggleLayerFavoritesAdd(layer, !layer.favorite);
|
|
17
|
+
}}
|
|
18
|
+
type="button"
|
|
19
|
+
className="cm-btn cm-btn-xs cm-btn-default"
|
|
20
|
+
title={btnTxt}
|
|
21
|
+
>
|
|
22
|
+
{btnTxt}
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export default connect("doToggleLayerFavoritesAdd", FavoritesToggle);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../utils/redux-bundler-react";
|
|
3
|
+
|
|
4
|
+
class LabelToggle extends React.Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
this.toggleLabels = this.toggleLabels.bind(this);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
toggleLabels(e) {
|
|
11
|
+
const { layer, doLayerSetLabels } = this.props;
|
|
12
|
+
doLayerSetLabels(layer.uid, !layer.labelsOn);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
render() {
|
|
16
|
+
const { layer } = this.props;
|
|
17
|
+
const { labelsOn } = layer;
|
|
18
|
+
if (!layer.labelEnabled) return null;
|
|
19
|
+
return (
|
|
20
|
+
<div>
|
|
21
|
+
<hr />
|
|
22
|
+
<div>
|
|
23
|
+
<div className="checkbox">
|
|
24
|
+
<label>
|
|
25
|
+
<input
|
|
26
|
+
checked={labelsOn}
|
|
27
|
+
onChange={this.toggleLabels}
|
|
28
|
+
type="checkbox"
|
|
29
|
+
/>
|
|
30
|
+
Label Features
|
|
31
|
+
</label>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default connect("selectAppTime", "doLayerSetLabels", LabelToggle);
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "../../../utils/redux-bundler-react";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import OpacitySlider from "./opacity-slider";
|
|
5
|
+
import RemoveLayer from "./remove-layer";
|
|
6
|
+
import DownloadLayer from "./download-layer";
|
|
7
|
+
import FavoritesToggle from "./favorites-toggle";
|
|
8
|
+
import DefaultsToggle from "./defaults-toggle";
|
|
9
|
+
|
|
10
|
+
const LayerSubpanel = (props) => {
|
|
11
|
+
const {
|
|
12
|
+
treeViewSelectedItem,
|
|
13
|
+
doRenderTreeView,
|
|
14
|
+
primaryPanelShowClose,
|
|
15
|
+
mapZoom,
|
|
16
|
+
treeViewDownloadEnabled,
|
|
17
|
+
primaryPanelShowFavoritesBtn,
|
|
18
|
+
primaryPanelShowUserDefaultLayersBtn,
|
|
19
|
+
treeRootNode,
|
|
20
|
+
sortOrderStatus,
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
23
|
+
const listClass = classnames({
|
|
24
|
+
"sidebar-list": !primaryPanelShowClose,
|
|
25
|
+
"thin-scrollbar": true,
|
|
26
|
+
"sidebar-list-show-close-btn": primaryPanelShowClose,
|
|
27
|
+
});
|
|
28
|
+
const listTop = primaryPanelShowClose ? 70 : 30;
|
|
29
|
+
const showDownload =
|
|
30
|
+
treeViewDownloadEnabled && treeViewSelectedItem.identifyType === "MAP"
|
|
31
|
+
? true
|
|
32
|
+
: false;
|
|
33
|
+
const url =
|
|
34
|
+
treeViewSelectedItem.identifyType == "MAP"
|
|
35
|
+
? `${treeViewSelectedItem.url}?&service=WMS&version=1.3.0&request=GetCapabilities&layers=${treeViewSelectedItem.layerList}&query_layers=${treeViewSelectedItem.layerList}`
|
|
36
|
+
: treeViewSelectedItem.url;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div>
|
|
40
|
+
<div>
|
|
41
|
+
<span
|
|
42
|
+
onClick={doRenderTreeView}
|
|
43
|
+
title="Go back"
|
|
44
|
+
style={{
|
|
45
|
+
fontSize: 24,
|
|
46
|
+
cursor: "pointer",
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
<i className="mdi mdi-arrow-left"></i>
|
|
50
|
+
</span>
|
|
51
|
+
</div>
|
|
52
|
+
<div className={listClass} style={{ top: listTop }}>
|
|
53
|
+
<p>
|
|
54
|
+
{treeViewSelectedItem.favorite ? (
|
|
55
|
+
<i className="mdi mdi-star" title="Layer saved to favorites list" />
|
|
56
|
+
) : null}
|
|
57
|
+
{treeViewSelectedItem.userDefaultLayer ? (
|
|
58
|
+
<i
|
|
59
|
+
className="mdi mdi-account"
|
|
60
|
+
title="Layer saved to user default layer list"
|
|
61
|
+
/>
|
|
62
|
+
) : null}
|
|
63
|
+
<b>{treeViewSelectedItem.displayName}</b>
|
|
64
|
+
</p>
|
|
65
|
+
<p>
|
|
66
|
+
{" "}
|
|
67
|
+
<a
|
|
68
|
+
rel="noopener noreferrer"
|
|
69
|
+
title={`Source for ${treeViewSelectedItem.displayName}`}
|
|
70
|
+
href={url}
|
|
71
|
+
target="_blank"
|
|
72
|
+
>
|
|
73
|
+
Source{" "}
|
|
74
|
+
</a>
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
{treeViewSelectedItem.moreInfo ? (
|
|
78
|
+
<p>
|
|
79
|
+
{" "}
|
|
80
|
+
<a
|
|
81
|
+
rel="noopener noreferrer"
|
|
82
|
+
title={`Source for ${treeViewSelectedItem.displayName}`}
|
|
83
|
+
href={treeViewSelectedItem.moreInfo}
|
|
84
|
+
target="_blank"
|
|
85
|
+
>
|
|
86
|
+
More Info{" "}
|
|
87
|
+
</a>
|
|
88
|
+
</p>
|
|
89
|
+
) : null}
|
|
90
|
+
|
|
91
|
+
{treeViewSelectedItem.resourceDownload ? (
|
|
92
|
+
<p>
|
|
93
|
+
{" "}
|
|
94
|
+
<a
|
|
95
|
+
rel="noopener noreferrer"
|
|
96
|
+
title={`Download Resource for ${treeViewSelectedItem.displayName}`}
|
|
97
|
+
href={treeViewSelectedItem.resourceDownload}
|
|
98
|
+
target="_blank"
|
|
99
|
+
>
|
|
100
|
+
Resource Download{" "}
|
|
101
|
+
</a>
|
|
102
|
+
</p>
|
|
103
|
+
) : null}
|
|
104
|
+
|
|
105
|
+
<p>
|
|
106
|
+
<b>Layer(s):</b> {treeViewSelectedItem.layerList}{" "}
|
|
107
|
+
</p>
|
|
108
|
+
<p>
|
|
109
|
+
<b>Service Type:</b> {treeViewSelectedItem.type}{" "}
|
|
110
|
+
</p>
|
|
111
|
+
<p>
|
|
112
|
+
<b>Identify Type:</b> {treeViewSelectedItem.identifyType}{" "}
|
|
113
|
+
</p>
|
|
114
|
+
<div>
|
|
115
|
+
{treeViewSelectedItem.groupTag ? (
|
|
116
|
+
<p>
|
|
117
|
+
<b>Group Tag:</b> {treeViewSelectedItem.groupTag.toString()}{" "}
|
|
118
|
+
</p>
|
|
119
|
+
) : null}
|
|
120
|
+
</div>
|
|
121
|
+
<div>
|
|
122
|
+
{sortOrderStatus ? (
|
|
123
|
+
<p>
|
|
124
|
+
<b>Sort Order:</b> {treeViewSelectedItem.sortOrder}{" "}
|
|
125
|
+
</p>
|
|
126
|
+
) : null}
|
|
127
|
+
</div>
|
|
128
|
+
<p>
|
|
129
|
+
<b>Min Zoom:</b> {treeViewSelectedItem.minzoom}{" "}
|
|
130
|
+
</p>
|
|
131
|
+
<p>
|
|
132
|
+
<b>Max Zoom:</b> {treeViewSelectedItem.maxzoom}{" "}
|
|
133
|
+
</p>
|
|
134
|
+
<p>
|
|
135
|
+
<b>Current Zoom:</b> {Math.floor(mapZoom)}{" "}
|
|
136
|
+
</p>
|
|
137
|
+
|
|
138
|
+
{treeViewSelectedItem.attributions ? (
|
|
139
|
+
<p>
|
|
140
|
+
<b>Credits:</b> {treeViewSelectedItem.attributions}{" "}
|
|
141
|
+
</p>
|
|
142
|
+
) : null}
|
|
143
|
+
|
|
144
|
+
{treeViewSelectedItem.layerDescription ? (
|
|
145
|
+
<p>
|
|
146
|
+
<b>Layer Description:</b> {treeViewSelectedItem.layerDescription}{" "}
|
|
147
|
+
</p>
|
|
148
|
+
) : null}
|
|
149
|
+
|
|
150
|
+
{primaryPanelShowFavoritesBtn ? (
|
|
151
|
+
<FavoritesToggle layer={treeViewSelectedItem} />
|
|
152
|
+
) : null}
|
|
153
|
+
<p></p>
|
|
154
|
+
{primaryPanelShowUserDefaultLayersBtn ? (
|
|
155
|
+
<DefaultsToggle layer={treeViewSelectedItem} />
|
|
156
|
+
) : null}
|
|
157
|
+
|
|
158
|
+
{showDownload ? <DownloadLayer /> : null}
|
|
159
|
+
|
|
160
|
+
<OpacitySlider layer={treeViewSelectedItem.mapLayer} />
|
|
161
|
+
|
|
162
|
+
<RemoveLayer layer={treeViewSelectedItem} />
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export default connect(
|
|
169
|
+
"selectSortOrderStatus",
|
|
170
|
+
"selectTreeViewSelectedItem",
|
|
171
|
+
"selectPrimaryPanelShowClose",
|
|
172
|
+
"selectMapZoom",
|
|
173
|
+
"selectTreeViewDownloadEnabled",
|
|
174
|
+
"selectPrimaryPanelShowFavoritesBtn",
|
|
175
|
+
"selectPrimaryPanelShowUserDefaultLayersBtn",
|
|
176
|
+
"selectTreeRootNode",
|
|
177
|
+
"doRenderTreeView",
|
|
178
|
+
LayerSubpanel
|
|
179
|
+
);
|