@corpsmap/corpsmap 3.2.96 → 3.2.98
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/dist/corpsmap.es.js +34436 -34129
- package/dist/corpsmap.umd.js +149 -149
- package/package.json +12 -2
- 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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
.corpsmap .sidebar {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: absolute;
|
|
4
|
+
-ms-flex-order: 1;
|
|
5
|
+
-webkit-order: 1;
|
|
6
|
+
order: 1;
|
|
7
|
+
flex: 1;
|
|
8
|
+
top: 0;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
height: 100%;
|
|
11
|
+
min-width: 49px;
|
|
12
|
+
z-index: 100;
|
|
13
|
+
}
|
|
14
|
+
.corpsmap .sidebar-left {
|
|
15
|
+
left: 0;
|
|
16
|
+
}
|
|
17
|
+
.corpsmap .sidebar-right {
|
|
18
|
+
right: 0;
|
|
19
|
+
}
|
|
20
|
+
.corpsmap .sidebar-buttons-top {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
align-items: left;
|
|
25
|
+
}
|
|
26
|
+
.corpsmap .sidebar-buttons-bottom {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
align-items: left;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: 100%;
|
|
34
|
+
}
|
|
35
|
+
.corpsmap .sidebar-panel {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 42px;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
z-index: 101;
|
|
40
|
+
background-color: #ffffff;
|
|
41
|
+
color: #666666;
|
|
42
|
+
padding-right: 30px;
|
|
43
|
+
/* JB
|
|
44
|
+
padding-right: 15px;
|
|
45
|
+
*/
|
|
46
|
+
/* box-shadow: 1px -2px 4px rgba(0,0,0,0.4); */
|
|
47
|
+
}
|
|
48
|
+
.corpsmap .sidebar-list {
|
|
49
|
+
overflow-x: hidden;
|
|
50
|
+
overflow-y: auto;
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 5px;
|
|
53
|
+
bottom: 0;
|
|
54
|
+
left: 0;
|
|
55
|
+
right: 5px;
|
|
56
|
+
padding: 5px;
|
|
57
|
+
margin: 0;
|
|
58
|
+
}
|
|
59
|
+
.corpsmap .sidebar-list-show-close-btn {
|
|
60
|
+
overflow-x: hidden;
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 35px;
|
|
64
|
+
bottom: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
right: 5px;
|
|
67
|
+
padding: 5px;
|
|
68
|
+
margin: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.corpsmap .cm-north-container {
|
|
72
|
+
position: relative;
|
|
73
|
+
left: 0;
|
|
74
|
+
right: 0;
|
|
75
|
+
top: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.corpsmap .toolbar {
|
|
79
|
+
position: absolute;
|
|
80
|
+
min-height: 40px;
|
|
81
|
+
z-index: 102;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.corpsmap .toolbar-horizontal {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.corpsmap .toolbar-horizontal-right {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.corpsmap .toolbar-top-left {
|
|
97
|
+
top: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.corpsmap .toolbar-lower-right {
|
|
101
|
+
bottom: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.corpsmap .toolbar-upper-right {
|
|
105
|
+
top: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.corpsmap .toolbar-btn {
|
|
109
|
+
position: relative;
|
|
110
|
+
border-radius: 0;
|
|
111
|
+
background-color: inherit;
|
|
112
|
+
color: inherit;
|
|
113
|
+
box-shadow: inherit;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.corpsmap .toolbar-btn:active {
|
|
117
|
+
color: inherit;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.corpsmap .toolbar-btn:hover {
|
|
121
|
+
color: inherit;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.corpsmap .cm-nav-btn {
|
|
125
|
+
display: inline-block;
|
|
126
|
+
margin-bottom: 0;
|
|
127
|
+
font-weight: normal;
|
|
128
|
+
text-align: center;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
vertical-align: middle;
|
|
131
|
+
-ms-touch-action: manipulation;
|
|
132
|
+
touch-action: manipulation;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
background-image: none;
|
|
135
|
+
border: 1px solid transparent;
|
|
136
|
+
border-radius: 3px;
|
|
137
|
+
-webkit-user-select: none;
|
|
138
|
+
-moz-user-select: none;
|
|
139
|
+
-ms-user-select: none;
|
|
140
|
+
user-select: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.corpsmap .cm-nav-btn i {
|
|
144
|
+
font-size: inherit;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.corpsmap .cm-nav-icon {
|
|
148
|
+
padding: 6px 16px;
|
|
149
|
+
font-size: 18px;
|
|
150
|
+
line-height: 1.8;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.corpsmap .cm-nav-icon-lg {
|
|
154
|
+
padding: 10px 16px;
|
|
155
|
+
font-size: 24px;
|
|
156
|
+
line-height: 1.2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.corpsmap .cm-nav-btn:focus,
|
|
160
|
+
.corpsmap .cm-nav-btn:active:focus,
|
|
161
|
+
.corpsmap .cm-nav-btn.active:focus,
|
|
162
|
+
.corpsmap .cm-nav-btn.focus,
|
|
163
|
+
.corpsmap .cm-nav-btn:active.focus,
|
|
164
|
+
.corpsmap .cm-nav-btn.active.focus {
|
|
165
|
+
outline: 5px auto -webkit-focus-ring-color;
|
|
166
|
+
outline-offset: -2px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.corpsmap .cm-nav-btn:active,
|
|
170
|
+
.corpsmap .cm-nav-btn.active {
|
|
171
|
+
background-image: none;
|
|
172
|
+
outline: 0;
|
|
173
|
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
174
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This script can be run at the command line to add the .corpsmap prefix
|
|
3
|
+
* to all selectors in a css file, currently pointed at ./corpsmap.css
|
|
4
|
+
* Probably not much use fot this from no on, so not going to make it any better
|
|
5
|
+
* it's here if you want to see what it does.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
var css = require("css");
|
|
9
|
+
var fs = require("fs");
|
|
10
|
+
var stylesheet = fs.readFileSync("./corpsmap.css", {
|
|
11
|
+
encoding: "utf8",
|
|
12
|
+
});
|
|
13
|
+
var obj = css.parse(stylesheet, { source: "./corpsmap.css" });
|
|
14
|
+
|
|
15
|
+
const rules = obj.stylesheet.rules;
|
|
16
|
+
|
|
17
|
+
rules.forEach((rule) => {
|
|
18
|
+
if (rule.selectors && rule.selectors.length) {
|
|
19
|
+
rule.selectors.forEach((sel, i) => {
|
|
20
|
+
// if (sel.indexOf(" ") !== -1) console.log(sel);
|
|
21
|
+
rule.selectors[i] = ".corpsmap " + sel;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
fs.writeFileSync("./corpsmap-namespaced.css", css.stringify(obj));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
2
|
+
v2.0 | 20110126
|
|
3
|
+
License: none (public domain)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
html, body, div, span, applet, object, iframe,
|
|
7
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
8
|
+
a, abbr, acronym, address, big, cite, code,
|
|
9
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
10
|
+
small, strike, strong, sub, sup, tt, var,
|
|
11
|
+
b, u, i, center,
|
|
12
|
+
dl, dt, dd, ol, ul, li,
|
|
13
|
+
fieldset, form, label, legend,
|
|
14
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
15
|
+
article, aside, canvas, details, embed,
|
|
16
|
+
figure, figcaption, footer, header, hgroup,
|
|
17
|
+
menu, nav, output, ruby, section, summary,
|
|
18
|
+
time, mark, audio, video {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
border: 0;
|
|
22
|
+
font-size: 100%;
|
|
23
|
+
font: inherit;
|
|
24
|
+
vertical-align: baseline;
|
|
25
|
+
}
|
|
26
|
+
/* HTML5 display-role reset for older browsers */
|
|
27
|
+
article, aside, details, figcaption, figure,
|
|
28
|
+
footer, header, hgroup, menu, nav, section {
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
body {
|
|
32
|
+
line-height: 1;
|
|
33
|
+
}
|
|
34
|
+
ol, ul {
|
|
35
|
+
list-style: none;
|
|
36
|
+
}
|
|
37
|
+
blockquote, q {
|
|
38
|
+
quotes: none;
|
|
39
|
+
}
|
|
40
|
+
blockquote:before, blockquote:after,
|
|
41
|
+
q:before, q:after {
|
|
42
|
+
content: '';
|
|
43
|
+
content: none;
|
|
44
|
+
}
|
|
45
|
+
table {
|
|
46
|
+
border-collapse: collapse;
|
|
47
|
+
border-spacing: 0;
|
|
48
|
+
}
|
package/src/index.css
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: #646cff;
|
|
19
|
+
text-decoration: inherit;
|
|
20
|
+
}
|
|
21
|
+
a:hover {
|
|
22
|
+
color: #535bf2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
place-items: center;
|
|
29
|
+
min-width: 320px;
|
|
30
|
+
min-height: 100vh;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
h1 {
|
|
34
|
+
font-size: 3.2em;
|
|
35
|
+
line-height: 1.1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
button {
|
|
39
|
+
border-radius: 8px;
|
|
40
|
+
border: 1px solid transparent;
|
|
41
|
+
padding: 0.6em 1.2em;
|
|
42
|
+
font-size: 1em;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
background-color: #1a1a1a;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition: border-color 0.25s;
|
|
48
|
+
}
|
|
49
|
+
button:hover {
|
|
50
|
+
border-color: #646cff;
|
|
51
|
+
}
|
|
52
|
+
button:focus,
|
|
53
|
+
button:focus-visible {
|
|
54
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (prefers-color-scheme: light) {
|
|
58
|
+
:root {
|
|
59
|
+
color: #213547;
|
|
60
|
+
background-color: #ffffff;
|
|
61
|
+
}
|
|
62
|
+
a:hover {
|
|
63
|
+
color: #747bff;
|
|
64
|
+
}
|
|
65
|
+
button {
|
|
66
|
+
background-color: #f9f9f9;
|
|
67
|
+
}
|
|
68
|
+
}
|
package/src/index.jsx
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./App.css";
|
|
3
|
+
import Map from "./application-exports/map-provider";
|
|
4
|
+
import { connect, Provider } from "./utils/redux-bundler-react";
|
|
5
|
+
import {
|
|
6
|
+
SearchInput,
|
|
7
|
+
SearchResultsList,
|
|
8
|
+
SearchResultsListItem,
|
|
9
|
+
SidebarButton,
|
|
10
|
+
SidebarPanelOpenerButton,
|
|
11
|
+
LoadingIndicator,
|
|
12
|
+
BasicToolbarButton,
|
|
13
|
+
BasicToolbarMenu,
|
|
14
|
+
BasicToolbarMenuUp,
|
|
15
|
+
BasicToolbarSubmenu,
|
|
16
|
+
BasicToolbarMenuDivider,
|
|
17
|
+
BasicToolbarMenuItem,
|
|
18
|
+
TreeView,
|
|
19
|
+
TreeList,
|
|
20
|
+
TreeListItem,
|
|
21
|
+
TreeListFolder,
|
|
22
|
+
} from "./application-controls";
|
|
23
|
+
|
|
24
|
+
// plugins
|
|
25
|
+
import addData from "./core-plugins/add-data";
|
|
26
|
+
import arcgisIdent from "./core-plugins/identify-arcgis-rest";
|
|
27
|
+
import basemapSwitcher from "./core-plugins/basemap-switcher";
|
|
28
|
+
import bookmarks from "./core-plugins/bookmarks";
|
|
29
|
+
import changeLog from "./core-plugins/change-log";
|
|
30
|
+
import resources from "./core-plugins/resources";
|
|
31
|
+
// import catalog from './core-plugins/catalog';
|
|
32
|
+
// import cmIdent from './core-plugins/identify-cm';
|
|
33
|
+
|
|
34
|
+
import coordDisplay from "./core-plugins/coordinate-display";
|
|
35
|
+
import draw from "./core-plugins/draw-tools";
|
|
36
|
+
// import editor from './core-plugins/editor';
|
|
37
|
+
import geocoder from "./core-plugins/geocoder";
|
|
38
|
+
import geojsonIdent from "./core-plugins/identify-geojson";
|
|
39
|
+
import esriIdent from "./core-plugins/identify-arcgis-rest";
|
|
40
|
+
import identify from "./core-plugins/identify";
|
|
41
|
+
import legend from "./core-plugins/legend";
|
|
42
|
+
// import login from './core-plugins/login';
|
|
43
|
+
import measureTools from "./core-plugins/measure-tools";
|
|
44
|
+
import permalink from "./core-plugins/permalink";
|
|
45
|
+
import printMap from "./core-plugins/print-map";
|
|
46
|
+
import questionsTab from "./core-plugins/contact-form";
|
|
47
|
+
import rasterIdent from "./core-plugins/identify-raster";
|
|
48
|
+
import rotateNorth from "./core-plugins/rotate-north";
|
|
49
|
+
import themeSwitcher from "./core-plugins/theme-switcher";
|
|
50
|
+
import treeView from "./core-plugins/tree-view";
|
|
51
|
+
import treeViewPanel from "./core-plugins/tree-view/tree-view-panel";
|
|
52
|
+
import vectorIdent from "./core-plugins/identify-vector";
|
|
53
|
+
import vectorSearch from "./core-plugins/vector-search";
|
|
54
|
+
import zoomInOut from "./core-plugins/zoom-in-out";
|
|
55
|
+
import zoomLevel from "./core-plugins/zoom-level";
|
|
56
|
+
import zoomHome from "./core-plugins/zoom-home";
|
|
57
|
+
import zoomToBox from "./core-plugins/zoom-to-box";
|
|
58
|
+
import mapLoadingIndicator from "./core-plugins/map-loading-indicator";
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
Map,
|
|
62
|
+
connect,
|
|
63
|
+
Provider,
|
|
64
|
+
SearchInput,
|
|
65
|
+
SearchResultsList,
|
|
66
|
+
SearchResultsListItem,
|
|
67
|
+
SidebarButton,
|
|
68
|
+
SidebarPanelOpenerButton,
|
|
69
|
+
LoadingIndicator,
|
|
70
|
+
BasicToolbarButton,
|
|
71
|
+
BasicToolbarMenu,
|
|
72
|
+
BasicToolbarMenuUp,
|
|
73
|
+
BasicToolbarSubmenu,
|
|
74
|
+
BasicToolbarMenuDivider,
|
|
75
|
+
BasicToolbarMenuItem,
|
|
76
|
+
TreeView,
|
|
77
|
+
TreeList,
|
|
78
|
+
TreeListItem,
|
|
79
|
+
TreeListFolder,
|
|
80
|
+
addData,
|
|
81
|
+
arcgisIdent,
|
|
82
|
+
basemapSwitcher,
|
|
83
|
+
bookmarks,
|
|
84
|
+
changeLog,
|
|
85
|
+
resources,
|
|
86
|
+
// catalog,
|
|
87
|
+
// cmIdent,
|
|
88
|
+
zoomLevel,
|
|
89
|
+
coordDisplay,
|
|
90
|
+
draw,
|
|
91
|
+
// editor,
|
|
92
|
+
geocoder,
|
|
93
|
+
geojsonIdent,
|
|
94
|
+
esriIdent,
|
|
95
|
+
identify,
|
|
96
|
+
legend,
|
|
97
|
+
// // login,
|
|
98
|
+
mapLoadingIndicator,
|
|
99
|
+
measureTools,
|
|
100
|
+
permalink,
|
|
101
|
+
printMap,
|
|
102
|
+
questionsTab,
|
|
103
|
+
rasterIdent,
|
|
104
|
+
rotateNorth,
|
|
105
|
+
themeSwitcher,
|
|
106
|
+
treeView,
|
|
107
|
+
treeViewPanel,
|
|
108
|
+
vectorIdent,
|
|
109
|
+
vectorSearch,
|
|
110
|
+
zoomInOut,
|
|
111
|
+
zoomHome,
|
|
112
|
+
zoomToBox,
|
|
113
|
+
};
|
package/src/main.jsx
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
const formatArcgisrest = function (attributes) {
|
|
2
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
3
|
+
let result =
|
|
4
|
+
String(value).includes("https:") || String(value).includes("http:")
|
|
5
|
+
? value
|
|
6
|
+
: null;
|
|
7
|
+
|
|
8
|
+
if (String(value).includes("<a href")) {
|
|
9
|
+
result = null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (result) {
|
|
13
|
+
attributes[key] = `<a href="${value}" target="_new" > ${value} </a>`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return attributes;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const formatArcgisVector = function (results) {
|
|
20
|
+
results.map((feat) => {
|
|
21
|
+
for (const [key, value] of Object.entries(feat.properties)) {
|
|
22
|
+
let result =
|
|
23
|
+
String(value).includes("https:") || String(value).includes("http:")
|
|
24
|
+
? value
|
|
25
|
+
: null;
|
|
26
|
+
|
|
27
|
+
if (String(value).includes("<a href")) {
|
|
28
|
+
result = null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (result) {
|
|
32
|
+
feat.properties[
|
|
33
|
+
key
|
|
34
|
+
] = `<a href="${value}" target="_new" > ${value} </a>`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return results;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const identifyColumnsArcgisrest = function (data, excludedColumns) {
|
|
42
|
+
data.results.forEach((result) => {
|
|
43
|
+
if (result.attributes) {
|
|
44
|
+
excludedColumns.forEach((column) => {
|
|
45
|
+
delete result.attributes[column];
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return result.attributes;
|
|
49
|
+
});
|
|
50
|
+
return data;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const identifyExcludeColumnsArcgisvector = function (data, excludedColumns) {
|
|
54
|
+
data.forEach((feature) => {
|
|
55
|
+
if (feature.properties) {
|
|
56
|
+
excludedColumns.forEach((column) => {
|
|
57
|
+
delete feature.properties[column];
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return feature.properties;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
return data;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const identifyIncludeColumnsArcgisvector = function (data, identifyFields) {
|
|
67
|
+
data.forEach((feature) => {
|
|
68
|
+
console.log(feature, feature.properties);
|
|
69
|
+
if (feature.properties) {
|
|
70
|
+
for (const [key, value] of Object.entries(feature.properties)) {
|
|
71
|
+
let reducedProperties = {};
|
|
72
|
+
identifyFields.forEach((property) => {
|
|
73
|
+
if (feature.properties[property]) {
|
|
74
|
+
reducedProperties[property] = feature.properties[property];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
feature.properties = reducedProperties;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
return data;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const identifyRenameColumnsArcgisvector = function (
|
|
86
|
+
data,
|
|
87
|
+
identifyRenameColums
|
|
88
|
+
) {
|
|
89
|
+
data.forEach((feature) => {
|
|
90
|
+
if (feature.properties) {
|
|
91
|
+
let wkData = {};
|
|
92
|
+
for (const [featureKey, featureValue] of Object.entries(
|
|
93
|
+
feature.properties
|
|
94
|
+
)) {
|
|
95
|
+
for (const [key, value] of Object.entries(identifyRenameColums)) {
|
|
96
|
+
if (featureKey === key) {
|
|
97
|
+
// feature.properties[value] = feature.properties[featureKey];
|
|
98
|
+
wkData[value] = feature.properties[featureKey];
|
|
99
|
+
delete feature.properties[featureKey];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
feature.properties = Object.assign(wkData, feature.properties);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return data;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const identifyFormatColumnsArcgisvector = function (
|
|
111
|
+
data,
|
|
112
|
+
identifyFormatColumns
|
|
113
|
+
) {
|
|
114
|
+
data.forEach((feature) => {
|
|
115
|
+
if (feature.properties) {
|
|
116
|
+
for (const [key, value] of Object.entries(identifyFormatColumns)) {
|
|
117
|
+
console.log(key, value);
|
|
118
|
+
if (feature.properties.hasOwnProperty(key)) {
|
|
119
|
+
feature.properties[key] = formatColumns(
|
|
120
|
+
feature.properties[key],
|
|
121
|
+
value
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
return data;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const formatColumns = function (value, formatType) {
|
|
132
|
+
if (formatType === "PERCENT") {
|
|
133
|
+
value = (value * 100).toFixed(0) + "%";
|
|
134
|
+
}
|
|
135
|
+
if (formatType === "BOOLEAN") {
|
|
136
|
+
value = value === 0 ? "No" : "Yes";
|
|
137
|
+
}
|
|
138
|
+
if (formatType === "UNIXDATE") {
|
|
139
|
+
if (value === null || value === "null") {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const unixTimestamp = value;
|
|
143
|
+
const milliseconds = unixTimestamp; // * 1000 in some cases.
|
|
144
|
+
const dateObject = new Date(milliseconds);
|
|
145
|
+
value = dateObject.toLocaleString();
|
|
146
|
+
}
|
|
147
|
+
if (formatType === "UNIXDATE_NOTIME") {
|
|
148
|
+
if (value === null || value === "null") {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
const unixTimestamp = value;
|
|
152
|
+
const milliseconds = unixTimestamp; // * 1000 in some cases.
|
|
153
|
+
const dateObject = new Date(milliseconds);
|
|
154
|
+
const dateFormatted = new Intl.DateTimeFormat("en-US", {
|
|
155
|
+
year: "numeric",
|
|
156
|
+
month: "2-digit",
|
|
157
|
+
day: "2-digit",
|
|
158
|
+
}).format(dateObject);
|
|
159
|
+
value = dateFormatted;
|
|
160
|
+
}
|
|
161
|
+
if (formatType === "ICEJAM") {
|
|
162
|
+
let url = `https://icejam.sec.usace.army.mil/ords/f?p=1001:2:::::IR_INDEX_NUMBER:${value}`;
|
|
163
|
+
let result = `<span><a href="${url}" target="_blank"> ${value} </a></span>`;
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return value;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export {
|
|
171
|
+
formatArcgisVector,
|
|
172
|
+
formatArcgisrest,
|
|
173
|
+
identifyColumnsArcgisrest,
|
|
174
|
+
identifyExcludeColumnsArcgisvector,
|
|
175
|
+
identifyIncludeColumnsArcgisvector,
|
|
176
|
+
identifyRenameColumnsArcgisvector,
|
|
177
|
+
identifyFormatColumnsArcgisvector,
|
|
178
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import DragBox from 'ol/interaction/DragBox';
|
|
3
|
+
import Draw from 'ol/interaction/Draw';
|
|
4
|
+
import Modify from 'ol/interaction/Modify';
|
|
5
|
+
import Snap from 'ol/interaction/Snap';
|
|
6
|
+
import Select from 'ol/interaction/Select';
|
|
7
|
+
|
|
8
|
+
const interactions = {
|
|
9
|
+
dragbox: DragBox,
|
|
10
|
+
draw: Draw,
|
|
11
|
+
modify: Modify,
|
|
12
|
+
snap: Snap,
|
|
13
|
+
select: Select
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default (options) => {
|
|
17
|
+
|
|
18
|
+
const olOptions = _.omit(options, ['on', 'interaction']);
|
|
19
|
+
|
|
20
|
+
if(!interactions.hasOwnProperty(options.interaction)) throw new Error(`${options.interaction} is not a valid interaction`);
|
|
21
|
+
|
|
22
|
+
const interaction = new interactions[options.interaction](olOptions);
|
|
23
|
+
|
|
24
|
+
if(options.on && options.on.length){
|
|
25
|
+
options.on.forEach((l) => {
|
|
26
|
+
interaction.on(l.event, l.listener, l.scope);
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return interaction;
|
|
31
|
+
}
|