@corpsmap/corpsmap 4.0.36 → 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 -41440
- package/lib/prod.js +0 -41406
- package/rollup.config.js +0 -30
- package/src/bundles/DEPRECATE_map-view-bundle.js +0 -34
- 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/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 -53
- package/src/components/MeasureTool/index.js +0 -169
- package/src/components/MeasureTool/measure-utils.js +0 -69
- package/src/components/Zoom/index.js +0 -48
- package/src/components/index.js +0 -3
- package/src/index.js +0 -10
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import Collection from "ol/Collection";
|
|
2
|
+
import Style from "ol/style/Style";
|
|
3
|
+
import Fill from "ol/style/Fill";
|
|
4
|
+
import Stroke from "ol/style/Stroke";
|
|
5
|
+
import Circle from "ol/style/Circle";
|
|
6
|
+
import XYZ from "ol/source/XYZ";
|
|
7
|
+
import TileArcGISRest from "ol/source/TileArcGISRest";
|
|
8
|
+
import ImageArcGISRest from "ol/source/ImageArcGISRest";
|
|
9
|
+
import ImageWMS from "ol/source/ImageWMS";
|
|
10
|
+
import TileWMS from "ol/source/TileWMS";
|
|
11
|
+
import VectorSrc from "ol/source/Vector";
|
|
12
|
+
import Tile from "ol/layer/Tile";
|
|
13
|
+
import Image from "ol/layer/Image";
|
|
14
|
+
import Vector from "ol/layer/Vector";
|
|
15
|
+
import GeoJSON from "ol/format/GeoJSON";
|
|
16
|
+
import vectorStyleCreator from "./vector-style";
|
|
17
|
+
import xhr from "xhr";
|
|
18
|
+
import EsriJSON from "ol/format/EsriJSON.js";
|
|
19
|
+
import { tile, bbox } from "ol/loadingstrategy";
|
|
20
|
+
import TileGrid from "ol/tilegrid/TileGrid";
|
|
21
|
+
import { createXYZ } from "ol/tilegrid";
|
|
22
|
+
import async from "async";
|
|
23
|
+
// import { createStyleFunctionFromUrl, setMapProjection } from "ol-esri-style";
|
|
24
|
+
import { createStyleFunctionFromUrl } from "ol-esri-style";
|
|
25
|
+
|
|
26
|
+
const esrijsonFormat = new EsriJSON();
|
|
27
|
+
|
|
28
|
+
const origin = window.location.origin;
|
|
29
|
+
|
|
30
|
+
const isCrossOrigin = (url) => {
|
|
31
|
+
if (!!window.MSInputMethodContext && !!document.documentMode) return null;
|
|
32
|
+
if (url) {
|
|
33
|
+
if (url.indexOf(origin) === -1) return "anonymous";
|
|
34
|
+
} else {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// const defaultVectorStyle = new Style({
|
|
40
|
+
// fill: new Fill({
|
|
41
|
+
// color: 'rgba(255, 255, 255, 0.2)'
|
|
42
|
+
// }),
|
|
43
|
+
// stroke: new Stroke({
|
|
44
|
+
// color: 'rgba(0, 0, 0, 0.5)',
|
|
45
|
+
// lineDash: [10, 10],
|
|
46
|
+
// width: 2
|
|
47
|
+
// }),
|
|
48
|
+
// image: new Circle({
|
|
49
|
+
// radius: 3,
|
|
50
|
+
// stroke: new Stroke({
|
|
51
|
+
// color: 'rgba(0, 0, 0, 0.7)'
|
|
52
|
+
// }),
|
|
53
|
+
// fill: new Fill({
|
|
54
|
+
// color: 'rgba(255, 255, 255, 0.2)'
|
|
55
|
+
// })
|
|
56
|
+
// })
|
|
57
|
+
// });
|
|
58
|
+
|
|
59
|
+
function formatLabeledUrl(url) {
|
|
60
|
+
const delim = url.indexOf("?") === -1 ? "?" : "&";
|
|
61
|
+
return `${url}${delim}label=true`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function getXyzSource(options) {
|
|
65
|
+
const labelsOn = !!options.labelDefault;
|
|
66
|
+
const url = labelsOn ? formatLabeledUrl(options.url) : options.url;
|
|
67
|
+
return new XYZ({
|
|
68
|
+
attributions: options.attributions || options.attribution,
|
|
69
|
+
attributionsCollapsible: true,
|
|
70
|
+
maxZoom: options.maxzoom,
|
|
71
|
+
minZoom: options.minzoom,
|
|
72
|
+
url: url,
|
|
73
|
+
crossOrigin: isCrossOrigin(options.url),
|
|
74
|
+
// CWBI-13636 Prevent horizontal wrapping.
|
|
75
|
+
// Line may no longer be needed.
|
|
76
|
+
// wrapX: false,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getArcGISTiledSource(options) {
|
|
81
|
+
return new TileArcGISRest({
|
|
82
|
+
url: options.url,
|
|
83
|
+
params: {
|
|
84
|
+
LAYERS: "show:" + options.layerList,
|
|
85
|
+
},
|
|
86
|
+
crossOrigin: isCrossOrigin(options.url),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function getArcGISImageSource(options) {
|
|
91
|
+
return new ImageArcGISRest({
|
|
92
|
+
url: options.url,
|
|
93
|
+
params: {
|
|
94
|
+
LAYERS: "show:" + options.layerList,
|
|
95
|
+
},
|
|
96
|
+
crossOrigin: isCrossOrigin(options.url),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function getWmsSource(options) {
|
|
101
|
+
const params = options.params || options;
|
|
102
|
+
params.LAYERS = options.layerList || options.LAYERS;
|
|
103
|
+
if (options.tiled === true) {
|
|
104
|
+
return new TileWMS({
|
|
105
|
+
url: options.url,
|
|
106
|
+
params: params,
|
|
107
|
+
crossOrigin: isCrossOrigin(options.url),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return new ImageWMS({
|
|
111
|
+
url: options.url,
|
|
112
|
+
params: params,
|
|
113
|
+
crossOrigin: isCrossOrigin(options.url),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function getLocalVectorSource(options) {
|
|
118
|
+
const src = new VectorSrc();
|
|
119
|
+
const { features } = options;
|
|
120
|
+
if (features) src.addFeatures(features);
|
|
121
|
+
return src;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function getRemoteVectorSource(options) {
|
|
125
|
+
const src = new VectorSrc({
|
|
126
|
+
format: new GeoJSON(),
|
|
127
|
+
url: options.url,
|
|
128
|
+
});
|
|
129
|
+
// @TODO figure out how to re-enable adding features to the identify tool
|
|
130
|
+
// src.on('addfeature', (e) => {
|
|
131
|
+
// const uid = options.uid;
|
|
132
|
+
// const g = new GeoJSON();
|
|
133
|
+
// const geojson = g.writeFeatureObject(e.feature, { featureProjection: 'EPSG:3857', dataProjection: 'EPSG:4326' });
|
|
134
|
+
// window.store.doGeojsonIdentAddFeatures(uid, geojson);
|
|
135
|
+
// })
|
|
136
|
+
return src;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function getEsriVectorSource(options) {
|
|
140
|
+
let serviceUrl = options.url;
|
|
141
|
+
const layer = options.layerList;
|
|
142
|
+
const trailingSlashMatch = /\/$/;
|
|
143
|
+
|
|
144
|
+
if (!trailingSlashMatch.test(serviceUrl)) serviceUrl += "/";
|
|
145
|
+
|
|
146
|
+
const src = new VectorSrc({
|
|
147
|
+
loader: function (extent, resolution, projection) {
|
|
148
|
+
const g = encodeURIComponent(
|
|
149
|
+
`{"xmin":${extent[0]},"ymin":${extent[1]},"xmax":${extent[2]},"ymax":${extent[3]},"spatialReference":{"wkid":102100}}`
|
|
150
|
+
);
|
|
151
|
+
const url = `${serviceUrl}${layer}/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=${g}&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100`;
|
|
152
|
+
xhr.get(url, (err, response, body) => {
|
|
153
|
+
if (err) return console.log(err);
|
|
154
|
+
const data = JSON.parse(body);
|
|
155
|
+
const features = esrijsonFormat.readFeatures(data, {
|
|
156
|
+
featureProjection: projection,
|
|
157
|
+
});
|
|
158
|
+
if (features.length > 0) {
|
|
159
|
+
src.addFeatures(features);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
strategy: tile(
|
|
164
|
+
createXYZ({
|
|
165
|
+
tileSize: 512,
|
|
166
|
+
})
|
|
167
|
+
),
|
|
168
|
+
});
|
|
169
|
+
return src;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function getTileLayer(options, source) {
|
|
173
|
+
// CWBI-13636 Prevent horizontal wrapping.
|
|
174
|
+
// Line may no longer be needed.
|
|
175
|
+
// source.wrapX = false;
|
|
176
|
+
return new Tile({
|
|
177
|
+
source: source,
|
|
178
|
+
visible: options.visible,
|
|
179
|
+
zIndex: options.zIndex || 0,
|
|
180
|
+
opacity: options.opacity || 1,
|
|
181
|
+
maxZoom: options.maxzoom,
|
|
182
|
+
minZoom: options.minzoom,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function getImageLayer(options, source) {
|
|
187
|
+
// CWBI-13636 Prevent horizontal wrapping.
|
|
188
|
+
// Line may no longer be needed.
|
|
189
|
+
// source.wrapX = false;
|
|
190
|
+
return new Image({
|
|
191
|
+
source: source,
|
|
192
|
+
visible: options.visible,
|
|
193
|
+
zIndex: options.zIndex || 0,
|
|
194
|
+
opacity: options.opacity || 1,
|
|
195
|
+
maxZoom: options.maxzoom,
|
|
196
|
+
minZoom: options.minzoom,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function getLocalVectorLayer(options, source) {
|
|
201
|
+
return new Vector({
|
|
202
|
+
altitudeMode: "clampToGround",
|
|
203
|
+
source: source,
|
|
204
|
+
visible: options.visible,
|
|
205
|
+
style: vectorStyleCreator(options),
|
|
206
|
+
zIndex: options.zIndex || 0,
|
|
207
|
+
opacity: options.opacity || 1,
|
|
208
|
+
maxZoom: options.maxzoom,
|
|
209
|
+
minZoom: options.minzoom,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function getRemoteVectorLayer(options, source) {
|
|
214
|
+
const lyr = new Vector({
|
|
215
|
+
altitudeMode: "clampToGround",
|
|
216
|
+
source: source,
|
|
217
|
+
visible: options.visible,
|
|
218
|
+
style: vectorStyleCreator(options),
|
|
219
|
+
zIndex: options.zIndex || 0,
|
|
220
|
+
opacity: options.opacity || 1,
|
|
221
|
+
renderMode: "image",
|
|
222
|
+
maxZoom: options.maxzoom,
|
|
223
|
+
minZoom: options.minzoom,
|
|
224
|
+
});
|
|
225
|
+
const uid = options.uid;
|
|
226
|
+
// window.store.doGeojsonIdentAddFeatures(uid, null, lyr);
|
|
227
|
+
return lyr;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function getEsriVectorLayer(options, source, map) {
|
|
231
|
+
// JB Often map is null and map.getView blows up.
|
|
232
|
+
// if (map) {
|
|
233
|
+
// setMapProjection(map.getView().getProjection());
|
|
234
|
+
// }
|
|
235
|
+
|
|
236
|
+
const lyr = new Vector({
|
|
237
|
+
altitudeMode: "clampToGround",
|
|
238
|
+
source: source,
|
|
239
|
+
visible: options.visible,
|
|
240
|
+
zIndex: options.zIndex || 0,
|
|
241
|
+
opacity: options.opacity || 1,
|
|
242
|
+
renderMode: "image",
|
|
243
|
+
maxZoom: options.maxzoom,
|
|
244
|
+
minZoom: options.minzoom,
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
const proj = map ? map.getView().getProjection() : null;
|
|
248
|
+
|
|
249
|
+
if (options.styleFn) {
|
|
250
|
+
const styleFn = eval(options.styleFn);
|
|
251
|
+
lyr.setStyle(styleFn[0]);
|
|
252
|
+
} else {
|
|
253
|
+
createStyleFunctionFromUrl(`${options.url}/${options.layerList}`, proj)
|
|
254
|
+
.then((styleFunction) => {
|
|
255
|
+
lyr.setStyle(styleFunction);
|
|
256
|
+
})
|
|
257
|
+
.catch(function (error) {
|
|
258
|
+
console.log("$$$$$$$$$$$$$$$$$$$$$$$$");
|
|
259
|
+
console.log(`${options.url}/${options.layerList}: ${error}`);
|
|
260
|
+
console.log(error);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return lyr;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function getSource(options) {
|
|
267
|
+
switch (options.serviceType) {
|
|
268
|
+
case "XYZ":
|
|
269
|
+
return getXyzSource(options);
|
|
270
|
+
case "ArcGIS":
|
|
271
|
+
return getArcGISTiledSource(options);
|
|
272
|
+
case "ArcGISImage":
|
|
273
|
+
return getArcGISImageSource(options);
|
|
274
|
+
case "WMS":
|
|
275
|
+
return getWmsSource(options);
|
|
276
|
+
case "LocalVector":
|
|
277
|
+
return getLocalVectorSource(options);
|
|
278
|
+
case "RemoteVector":
|
|
279
|
+
return getRemoteVectorSource(options);
|
|
280
|
+
case "EsriFeatureService":
|
|
281
|
+
return getEsriVectorSource(options);
|
|
282
|
+
default:
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function getLayer(options, source, map) {
|
|
288
|
+
if (!source) source = getSource(options);
|
|
289
|
+
switch (options.serviceType) {
|
|
290
|
+
case "XYZ":
|
|
291
|
+
return getTileLayer(options, source);
|
|
292
|
+
case "ArcGIS":
|
|
293
|
+
return getTileLayer(options, source);
|
|
294
|
+
case "ArcGISImage":
|
|
295
|
+
return getImageLayer(options, source);
|
|
296
|
+
case "WMS":
|
|
297
|
+
return getImageLayer(options, source);
|
|
298
|
+
case "LocalVector":
|
|
299
|
+
return getLocalVectorLayer(options, source);
|
|
300
|
+
case "RemoteVector":
|
|
301
|
+
return getRemoteVectorLayer(options, source);
|
|
302
|
+
case "EsriFeatureService":
|
|
303
|
+
return getEsriVectorLayer(options, source, map);
|
|
304
|
+
default:
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export { getSource, getLayer };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import olMap from 'ol/Map.js';
|
|
2
|
+
import { transform } from 'ol/proj';
|
|
3
|
+
import { transformExtent } from 'ol/proj';
|
|
4
|
+
import View from 'ol/View';
|
|
5
|
+
import ScaleBar from 'ol/control/ScaleLine';
|
|
6
|
+
|
|
7
|
+
const createOlMap = (options, geoProjection, mapProjection) => {
|
|
8
|
+
const view = new View({
|
|
9
|
+
center: transform(options.center, geoProjection, mapProjection),
|
|
10
|
+
zoom: options.zoom,
|
|
11
|
+
rotation: options.rotation,
|
|
12
|
+
minZoom: options.minZoom,
|
|
13
|
+
maxZoom: options.maxZoom
|
|
14
|
+
})
|
|
15
|
+
return new olMap({
|
|
16
|
+
controls: [new ScaleBar({units:'us'})],
|
|
17
|
+
layers: options.layers || [],
|
|
18
|
+
target: options.target,
|
|
19
|
+
view: view,
|
|
20
|
+
loadTilesWhileAnimating: false,
|
|
21
|
+
loadTilesWhileInteracting: false
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { createOlMap, transform, transformExtent };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import olMap from 'ol/Map.js';
|
|
2
|
+
import { transform } from 'ol/proj';
|
|
3
|
+
import { transformExtent } from 'ol/proj';
|
|
4
|
+
import View from 'ol/View';
|
|
5
|
+
import ScaleBar from 'ol/control/ScaleLine';
|
|
6
|
+
|
|
7
|
+
const createResourceGroup = (items) => {
|
|
8
|
+
let resourceGroups = [];
|
|
9
|
+
|
|
10
|
+
for (let i = 0; i < items.length; i++) {
|
|
11
|
+
let id = items[i].resource_group_id;
|
|
12
|
+
|
|
13
|
+
if(id) {
|
|
14
|
+
let group = {
|
|
15
|
+
groupId: id,
|
|
16
|
+
groupDescription: items[i]["group description"],
|
|
17
|
+
groupName: items[i]["group name"],
|
|
18
|
+
groupSort: items[i]["group_sort"],
|
|
19
|
+
}
|
|
20
|
+
resourceGroups.push(group);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let filteredArr = resourceGroups.reduce((acc, current) => {
|
|
25
|
+
const x = acc.find(item => item.groupId === current.groupId);
|
|
26
|
+
if (!x) {
|
|
27
|
+
return acc.concat([current]);
|
|
28
|
+
} else {
|
|
29
|
+
return acc;
|
|
30
|
+
}
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
filteredArr.sort((a,b) => a.groupSort - b.groupSort);
|
|
34
|
+
|
|
35
|
+
return filteredArr;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { createResourceGroup };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import Style from "ol/style/Style";
|
|
2
|
+
import Fill from "ol/style/Fill";
|
|
3
|
+
import Stroke from "ol/style/Stroke";
|
|
4
|
+
import Circle from "ol/style/Circle";
|
|
5
|
+
import Txt from "ol/style/Text";
|
|
6
|
+
import RegularShape from "ol/style/RegularShape";
|
|
7
|
+
|
|
8
|
+
window.olStyle = {
|
|
9
|
+
Style: Style,
|
|
10
|
+
Fill: Fill,
|
|
11
|
+
Stroke: Stroke,
|
|
12
|
+
Circle: Circle,
|
|
13
|
+
Text: Txt,
|
|
14
|
+
RegularShape: RegularShape,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const defaultVectorStyle = [
|
|
18
|
+
new Style({
|
|
19
|
+
stroke: new Stroke({
|
|
20
|
+
color: "rgba(255, 255, 255, 0.9)",
|
|
21
|
+
width: 4
|
|
22
|
+
}),
|
|
23
|
+
fill: new Fill({
|
|
24
|
+
color: "rgba(255, 255, 255, 0.2)"
|
|
25
|
+
})
|
|
26
|
+
}),
|
|
27
|
+
new Style({
|
|
28
|
+
stroke: new Stroke({
|
|
29
|
+
color: "rgba(0, 0, 0, 0.8)",
|
|
30
|
+
lineDash: [4, 4],
|
|
31
|
+
width: 2
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
new Style({
|
|
35
|
+
image: new Circle({
|
|
36
|
+
radius: 8,
|
|
37
|
+
stroke: new Stroke({
|
|
38
|
+
color: "rgba(0, 0, 0, 0.8)",
|
|
39
|
+
width: 2
|
|
40
|
+
}),
|
|
41
|
+
fill: new Fill({
|
|
42
|
+
color: "rgba(255, 255, 255, 1)"
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export default options => {
|
|
49
|
+
if (options.styleFn) {
|
|
50
|
+
return eval(options.styleFn);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (options.style) {
|
|
54
|
+
return options.style;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (options.styleAttributes) {
|
|
58
|
+
return (feature, resolution) => {
|
|
59
|
+
const fillColor = feature.get("fillColor");
|
|
60
|
+
const strokeColor = feature.get("strokeColor");
|
|
61
|
+
const strokeWidth = feature.get("strokeWidth");
|
|
62
|
+
const strokeDash = feature.get("strokeDash");
|
|
63
|
+
const markerRadius = feature.get("markerRadius");
|
|
64
|
+
const markerColor = feature.get("markerColor");
|
|
65
|
+
const markerStrokeColor = feature.get("markerStrokeColor");
|
|
66
|
+
const markerStrokeWidth = feature.get("markerStrokeWidth");
|
|
67
|
+
const markerFillColor = feature.get("markerFillColor");
|
|
68
|
+
|
|
69
|
+
const style = new Style();
|
|
70
|
+
if (fillColor) {
|
|
71
|
+
style.setFill(
|
|
72
|
+
new Fill({
|
|
73
|
+
color: fillColor
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
if (strokeColor || strokeWidth || strokeDash) {
|
|
78
|
+
style.setStroke(
|
|
79
|
+
new Stroke({
|
|
80
|
+
color: strokeColor || "rgba(0, 0, 0, 0.5)",
|
|
81
|
+
lineDash: strokeDash ? strokeDash.split(",") : [10, 10],
|
|
82
|
+
width: strokeWidth || 2
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
if (
|
|
87
|
+
markerColor ||
|
|
88
|
+
markerRadius ||
|
|
89
|
+
markerStrokeColor ||
|
|
90
|
+
markerStrokeWidth ||
|
|
91
|
+
markerFillColor
|
|
92
|
+
) {
|
|
93
|
+
style.setImage(
|
|
94
|
+
new Circle({
|
|
95
|
+
radius: markerRadius || 3,
|
|
96
|
+
stroke: new Stroke({
|
|
97
|
+
color: markerStrokeColor || "rgba(0, 0, 0, 0.7)",
|
|
98
|
+
width: markerStrokeWidth || 0
|
|
99
|
+
}),
|
|
100
|
+
fill: new Fill({
|
|
101
|
+
color: markerFillColor || "rgba(255, 255, 255, 0.2)"
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return style;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return defaultVectorStyle;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// (
|
|
114
|
+
// function(f){
|
|
115
|
+
// const b = feature.get('briefit');
|
|
116
|
+
// const h = b === 'Y';
|
|
117
|
+
// const style = new Style({
|
|
118
|
+
// image: new Circle({
|
|
119
|
+
// radius: h ? 7 : 5,
|
|
120
|
+
// stroke: new Stroke({
|
|
121
|
+
// color: '#FFFFFF',
|
|
122
|
+
// width: 2
|
|
123
|
+
// }),
|
|
124
|
+
// fill: new Fill({
|
|
125
|
+
// color: h ? '#DEA500' : '#B85B2B'
|
|
126
|
+
// })
|
|
127
|
+
// })
|
|
128
|
+
// });
|
|
129
|
+
// return style;
|
|
130
|
+
// }
|
|
131
|
+
// )
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
class ErrorBoundary extends React.Component {
|
|
4
|
+
constructor(props) {
|
|
5
|
+
super(props);
|
|
6
|
+
this.state = {
|
|
7
|
+
hasError: false,
|
|
8
|
+
error: null,
|
|
9
|
+
info: null
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
componentDidCatch(error, info) {
|
|
14
|
+
this.setState({ hasError: true, error: error, info: info });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
const { hasError, error, info } = this.state;
|
|
19
|
+
if (hasError) {
|
|
20
|
+
console.log('error rendering', error, info)
|
|
21
|
+
}
|
|
22
|
+
return this.props.children;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default (store, plugins) => {
|
|
2
|
+
store.doStartLoadingPlugins();
|
|
3
|
+
const loaded = [];
|
|
4
|
+
|
|
5
|
+
// make sure we even get plugins
|
|
6
|
+
if (plugins && plugins.length) {
|
|
7
|
+
plugins.forEach((p) => {
|
|
8
|
+
const sig = btoa(p.pluginName);
|
|
9
|
+
|
|
10
|
+
// make sure we haven't loaded a plugin with this name yet.
|
|
11
|
+
if (loaded.indexOf(sig) === -1) {
|
|
12
|
+
// add any bundles that come along with the plugin
|
|
13
|
+
if (p.bundle) {
|
|
14
|
+
// we provide a single bundle or an array of bundles, either way, make it an array here
|
|
15
|
+
if (!p.bundle.length) p.bundle = [p.bundle];
|
|
16
|
+
p.bundle.forEach((b) => {
|
|
17
|
+
store.integrateBundles(b);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// add any UI components that come along with the plugin
|
|
22
|
+
if (p.hasOwnProperty("components")) {
|
|
23
|
+
store.doAddPluginComponents(p.components);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// mark this one as loaded
|
|
27
|
+
loaded.push(sig);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
store.doStopLoadingPlugins();
|
|
32
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// import { composeBundles } from 'redux-bundler';
|
|
2
|
+
// import loadPlugins from './load-plugins';
|
|
3
|
+
// import getStore from '../application-bundles';
|
|
4
|
+
// import pluginBundle from '../application-bundles/plugin-bundle';
|
|
5
|
+
|
|
6
|
+
// import addDataButton from '../core-plugins/add-data/add-data-button';
|
|
7
|
+
// import addDataPlugin from '../core-plugins/add-data';
|
|
8
|
+
// import basemapSwitcherPlugin from '../core-plugins/basemap-switcher';
|
|
9
|
+
// import bookmarksPlugin from '../core-plugins/bookmarks';
|
|
10
|
+
// import coordDisplayPlugin from '../core-plugins/coordinate-display';
|
|
11
|
+
// import drawPlugin from '../core-plugins/draw-tools';
|
|
12
|
+
// import geocoderPlugin from '../core-plugins/geocoder';
|
|
13
|
+
// import identifyPlugin from '../core-plugins/identify';
|
|
14
|
+
// import measureToolsPlugin from '../core-plugins/measure-tools';
|
|
15
|
+
// import rotateNorthPlugin from '../core-plugins/rotate-north';
|
|
16
|
+
// import themeSwitcherPlugin from '../core-plugins/theme-switcher';
|
|
17
|
+
// import treeViewPlugin from '../core-plugins/tree-view';
|
|
18
|
+
// import zoomInOutPlugin from '../core-plugins/zoom-in-out';
|
|
19
|
+
// import zoomHomePlugin from '../core-plugins/zoom-home';
|
|
20
|
+
// import zoomToBoxPlugin from '../core-plugins/zoom-to-box';
|
|
21
|
+
// import { extentFromProjection } from 'ol/tilegrid';
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// let store = getStore();
|
|
25
|
+
// let plugins = [addDataPlugin, basemapSwitcherPlugin, bookmarksPlugin, coordDisplayPlugin, drawPlugin,
|
|
26
|
+
// geocoderPlugin, identifyPlugin, measureToolsPlugin, rotateNorthPlugin, themeSwitcherPlugin, treeViewPlugin,
|
|
27
|
+
// zoomInOutPlugin, zoomHomePlugin, zoomToBoxPlugin];
|
|
28
|
+
|
|
29
|
+
// describe('Test loadPlugins', () => {
|
|
30
|
+
// test("should load 16 plugins", () => {
|
|
31
|
+
// // loadPlugins(store, plugins);
|
|
32
|
+
// // expect(store.getState()['plugins']['components'].length).toEqual(16);
|
|
33
|
+
// // expect(store.selectActiveBasemap()).toEqual(0)
|
|
34
|
+
// expect(true).toEqual(true)
|
|
35
|
+
// });
|
|
36
|
+
// });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ErrorBoundary from './error-boundary';
|
|
3
|
+
|
|
4
|
+
class PluginRegion extends React.Component {
|
|
5
|
+
render(){
|
|
6
|
+
const { className, styleOverride, components } = this.props;
|
|
7
|
+
return (
|
|
8
|
+
<div className={className}>
|
|
9
|
+
{
|
|
10
|
+
components.map((component, i) => {
|
|
11
|
+
const Comp = component;
|
|
12
|
+
return (
|
|
13
|
+
<ErrorBoundary key={i}>
|
|
14
|
+
<div style={styleOverride}>
|
|
15
|
+
<Comp />
|
|
16
|
+
</div>
|
|
17
|
+
</ErrorBoundary>
|
|
18
|
+
)
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default PluginRegion;
|