@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
package/package.json
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpsmap/corpsmap",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.98",
|
|
4
4
|
"main": "dist/corpsmap.umd.js",
|
|
5
5
|
"module": "dist/corpsmap.es.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"src"
|
|
9
10
|
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/corpsmap.es.js",
|
|
14
|
+
"require": "./dist/corpsmap.umd.js"
|
|
15
|
+
},
|
|
16
|
+
"./dist/corpsmap.css": "./dist/corpsmap.css",
|
|
17
|
+
"./css/corpsmap.css": "./dist/corpsmap.css",
|
|
18
|
+
"./src/*": "./src/*"
|
|
19
|
+
},
|
|
10
20
|
"scripts": {
|
|
11
21
|
"dev": "vite",
|
|
12
22
|
"build": "vite build --watch",
|
package/src/App.css
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#root {
|
|
2
|
+
max-width: 1280px;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
padding: 2rem;
|
|
5
|
+
text-align: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.logo {
|
|
9
|
+
height: 6em;
|
|
10
|
+
padding: 1.5em;
|
|
11
|
+
will-change: filter;
|
|
12
|
+
transition: filter 300ms;
|
|
13
|
+
}
|
|
14
|
+
.logo:hover {
|
|
15
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
16
|
+
}
|
|
17
|
+
.logo.react:hover {
|
|
18
|
+
filter: drop-shadow(0 0 2em #61dafbaa);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes logo-spin {
|
|
22
|
+
from {
|
|
23
|
+
transform: rotate(0deg);
|
|
24
|
+
}
|
|
25
|
+
to {
|
|
26
|
+
transform: rotate(360deg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
31
|
+
a:nth-of-type(2) .logo {
|
|
32
|
+
animation: logo-spin infinite 20s linear;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card {
|
|
37
|
+
padding: 2em;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.read-the-docs {
|
|
41
|
+
color: #888;
|
|
42
|
+
}
|
package/src/App.jsx
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import reactLogo from "./assets/react.svg";
|
|
3
|
+
import viteLogo from "/vite.svg";
|
|
4
|
+
import "./App.css";
|
|
5
|
+
|
|
6
|
+
import React from "react";
|
|
7
|
+
|
|
8
|
+
const App = () => {
|
|
9
|
+
return <div>Hello! This is a React 19 module.</div>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default MyComponent;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export default (opts) => {
|
|
2
|
+
|
|
3
|
+
const defaults = {
|
|
4
|
+
name: 'container',
|
|
5
|
+
children: null,
|
|
6
|
+
options: null,
|
|
7
|
+
openedBy: null,
|
|
8
|
+
addons: {},
|
|
9
|
+
additionalActions: [],
|
|
10
|
+
additionalState: {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const config = Object.assign({}, defaults, opts);
|
|
14
|
+
|
|
15
|
+
const uCaseName = config.name.charAt(0).toUpperCase() + config.name.slice(1);
|
|
16
|
+
const baseType = config.name.toUpperCase();
|
|
17
|
+
|
|
18
|
+
// actions
|
|
19
|
+
const actions = {
|
|
20
|
+
OPENED: `${baseType}_OPENED`,
|
|
21
|
+
CLOSED: `${baseType}_CLOSED`
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// action creators
|
|
25
|
+
const doOpen = `do${uCaseName}Open`;
|
|
26
|
+
const doClose = `do${uCaseName}Close`;
|
|
27
|
+
|
|
28
|
+
// selectors
|
|
29
|
+
const selectChildren = `select${uCaseName}Children`;
|
|
30
|
+
const selectOptions = `select${uCaseName}Options`;
|
|
31
|
+
const selectOpenedBy = `select${uCaseName}OpenedBy`;
|
|
32
|
+
|
|
33
|
+
// reactors
|
|
34
|
+
|
|
35
|
+
const result = Object.assign(
|
|
36
|
+
{},
|
|
37
|
+
{
|
|
38
|
+
name: config.name,
|
|
39
|
+
|
|
40
|
+
getReducer: () => {
|
|
41
|
+
const initialData = Object.assign({
|
|
42
|
+
children: config.children,
|
|
43
|
+
options: config.options,
|
|
44
|
+
openedBy: config.openedBy
|
|
45
|
+
}, config.additionalState)
|
|
46
|
+
|
|
47
|
+
return (state = initialData, { type, payload }) => {
|
|
48
|
+
// allow some monkeypatching
|
|
49
|
+
if(config.additionalActions.indexOf(type) !== -1){
|
|
50
|
+
return Object.assign({}, state, payload);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
switch(type){
|
|
54
|
+
case actions.OPENED:
|
|
55
|
+
case actions.CLOSED:
|
|
56
|
+
return Object.assign({}, state, payload);
|
|
57
|
+
default:
|
|
58
|
+
return state;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
[doOpen]: ({ children, options, openedBy }) => ({ dispatch }) => {
|
|
64
|
+
if(!children.length) children = [children];
|
|
65
|
+
dispatch({
|
|
66
|
+
type: actions.OPENED,
|
|
67
|
+
payload: {
|
|
68
|
+
children: children,
|
|
69
|
+
options: options,
|
|
70
|
+
openedBy: openedBy
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
[doClose]: () => ({ dispatch }) => {
|
|
76
|
+
dispatch({
|
|
77
|
+
type: actions.CLOSED,
|
|
78
|
+
payload: {
|
|
79
|
+
children: null,
|
|
80
|
+
options: null,
|
|
81
|
+
openedBy: null
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
[selectChildren]: (state) => {
|
|
87
|
+
return state[config.name].children;
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
[selectOptions]: (state) => {
|
|
91
|
+
return state[config.name].options;
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
[selectOpenedBy]: (state) => {
|
|
95
|
+
return state[config.name].openedBy;
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
config.addons
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import xhr from "xhr";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
name: "api",
|
|
5
|
+
|
|
6
|
+
getReducer: () => {
|
|
7
|
+
const initialData = {
|
|
8
|
+
// root: process.env.REACT_APP_CM_ENV
|
|
9
|
+
root: import.meta.env.VITE_APP_CM_ENV,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return (state = initialData, { type, payload }) => {
|
|
13
|
+
return state;
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
selectApiRoot: (state) => {
|
|
18
|
+
return process.env.NODE_ENV === "development"
|
|
19
|
+
? state.api.root
|
|
20
|
+
: state.windowLocation.origin;
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
getExtraArgs: (store) => {
|
|
24
|
+
return {
|
|
25
|
+
anonGet: (path, callback) => {
|
|
26
|
+
const options = {
|
|
27
|
+
url: path,
|
|
28
|
+
};
|
|
29
|
+
xhr.get(options, callback);
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
apiGet: (path, callback) => {
|
|
33
|
+
// const token = store.selectTokenRaw();
|
|
34
|
+
const token = null;
|
|
35
|
+
const options = {
|
|
36
|
+
url: path,
|
|
37
|
+
};
|
|
38
|
+
if (token) {
|
|
39
|
+
options.headers = {
|
|
40
|
+
Authorization: "Bearer " + token,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
xhr.get(options, callback);
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
apiPost: (path, payload, callback) => {
|
|
47
|
+
// const token = store.selectTokenRaw();
|
|
48
|
+
const token = null;
|
|
49
|
+
const options = {
|
|
50
|
+
url: path,
|
|
51
|
+
json: payload,
|
|
52
|
+
};
|
|
53
|
+
if (token) {
|
|
54
|
+
options.headers = {
|
|
55
|
+
Authorization: "Bearer " + token,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
xhr.post(options, callback);
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
apiDel: (path, callback) => {
|
|
62
|
+
// const token = store.selectTokenRaw();
|
|
63
|
+
const token = null;
|
|
64
|
+
const options = {
|
|
65
|
+
url: path,
|
|
66
|
+
};
|
|
67
|
+
if (token) {
|
|
68
|
+
options.headers = {
|
|
69
|
+
Authorization: "Bearer " + token,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
xhr.del(options, callback);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: "basicToolbar",
|
|
3
|
+
|
|
4
|
+
getReducer: () => {
|
|
5
|
+
const initialData = {
|
|
6
|
+
activeTool: null,
|
|
7
|
+
open: false,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
return (state = initialData, { type, payload }) => {
|
|
11
|
+
switch (type) {
|
|
12
|
+
case "BASIC_TOOL_ACTIVATE":
|
|
13
|
+
case "BASIC_TOOL_DEACTIVATE":
|
|
14
|
+
return Object.assign({}, state, payload);
|
|
15
|
+
default:
|
|
16
|
+
return state;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
doBasicToolbarActivate: ({ activeTool }) => ({ dispatch }) => {
|
|
22
|
+
dispatch({
|
|
23
|
+
type: "BASIC_TOOL_ACTIVATE",
|
|
24
|
+
payload: {
|
|
25
|
+
activeTool: activeTool,
|
|
26
|
+
open: true,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
doBasicToolbarToggle: (activeTool, newTool) => ({ store }) => {
|
|
31
|
+
if (activeTool !== newTool) {
|
|
32
|
+
store.doBasicToolbarDeactivate();
|
|
33
|
+
store.doBasicToolbarActivate({
|
|
34
|
+
activeTool: newTool,
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
store.doBasicToolbarDeactivate();
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
doBasicToolbarDeactivate: () => ({ dispatch }) => {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: "BASIC_TOOL_DEACTIVATE",
|
|
44
|
+
payload: {
|
|
45
|
+
activeTool: null,
|
|
46
|
+
open: false,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
selectBasicToolbarActiveTool: (state) => {
|
|
52
|
+
return state.basicToolbar.activeTool;
|
|
53
|
+
},
|
|
54
|
+
selectBasicToolbarOpen: (state) => {
|
|
55
|
+
return state.basicToolbar.open;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
export default {
|
|
3
|
+
name: 'config',
|
|
4
|
+
|
|
5
|
+
getReducer(){
|
|
6
|
+
const initialData = {
|
|
7
|
+
default:{}
|
|
8
|
+
}
|
|
9
|
+
return (state = initialData, { type, payload }) => {
|
|
10
|
+
return state;
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
selectDefaultConfig: (state) => {
|
|
15
|
+
return state.config.default;
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
selectBasemapList: (state) => {
|
|
19
|
+
return state.config.default.basemaps.map((b) => {
|
|
20
|
+
if(b.url.indexOf('{accessToken}') !== -1) b.url = b.url.replace(/{accessToken}/ig, b.accessToken || '');
|
|
21
|
+
if(b.url.indexOf('{s}') !== -1) b.url = b.url.replace(/{s}/ig, b.accessToken || '{a-c}');
|
|
22
|
+
return b;
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
selectBasemapImages: (state) => {
|
|
27
|
+
return state.config.default.basemapImageIDs;
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
selectDefaultLayers: (state) => {
|
|
31
|
+
return state.config.default.datasets;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
selectLimitMapExtent: (state) => {
|
|
35
|
+
return state.config.default.limitMapExtent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { createSelector } from "redux-bundler";
|
|
2
|
+
import olMap from "ol/Map.js";
|
|
3
|
+
import View from "ol/View";
|
|
4
|
+
import { get, transform, fromLonLat, transformExtent } from "ol/proj";
|
|
5
|
+
import ScaleBar from "ol/control/ScaleLine";
|
|
6
|
+
import debounce from "lodash/debounce";
|
|
7
|
+
|
|
8
|
+
import "ol/ol.css";
|
|
9
|
+
|
|
10
|
+
export default (opts) => {
|
|
11
|
+
const defaults = {
|
|
12
|
+
name: "map",
|
|
13
|
+
center: [-98.579, 39.828],
|
|
14
|
+
zoom: 5,
|
|
15
|
+
rotation: 0,
|
|
16
|
+
minZoom: 0,
|
|
17
|
+
maxZoom: 22,
|
|
18
|
+
addons: {},
|
|
19
|
+
limitMapExtent: false,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const config = Object.assign({}, defaults, opts);
|
|
23
|
+
|
|
24
|
+
return Object.assign(
|
|
25
|
+
{},
|
|
26
|
+
{
|
|
27
|
+
name: config.name,
|
|
28
|
+
|
|
29
|
+
getReducer: () => {
|
|
30
|
+
const initialData = {
|
|
31
|
+
map: null,
|
|
32
|
+
opts: null,
|
|
33
|
+
geoProjection: get("EPSG:4326"),
|
|
34
|
+
webProjection: get("EPSG:3857"),
|
|
35
|
+
center: config.center,
|
|
36
|
+
zoom: config.zoom,
|
|
37
|
+
rotation: config.rotation,
|
|
38
|
+
minZoom: config.minZoom,
|
|
39
|
+
maxZoom: config.maxZoom,
|
|
40
|
+
limitMapExtent: config.limitMapExtent,
|
|
41
|
+
shouldInitialize: false,
|
|
42
|
+
shouldResetViewState: false,
|
|
43
|
+
shouldUpdateViewState: false,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (state = initialData, { type, payload }) => {
|
|
47
|
+
console.log(type, payload);
|
|
48
|
+
if (config.additionalActions.indexOf(type) !== -1) {
|
|
49
|
+
return Object.assign({}, state, payload);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
switch (type) {
|
|
53
|
+
case "MAP_INITIALIZED":
|
|
54
|
+
case "MAP_RESET_MAP_VIEW":
|
|
55
|
+
case "MAP_UPDATED_VIEW_STATE_STARTED":
|
|
56
|
+
case "MAP_UPDATED_VIEW_STATE_FINISHED":
|
|
57
|
+
case "MAP_LOADING":
|
|
58
|
+
case "MAP_LOADED":
|
|
59
|
+
return Object.assign({}, state, payload);
|
|
60
|
+
default:
|
|
61
|
+
return state;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
doMapInitialize:
|
|
67
|
+
(el, opts) =>
|
|
68
|
+
({ dispatch, store }) => {
|
|
69
|
+
const existingMap = store.selectMap();
|
|
70
|
+
if (existingMap) return; // map already exists, don't create a new one
|
|
71
|
+
const geoProjection = store.selectMapGeoProjection();
|
|
72
|
+
const webProjection = store.selectMapWebProjection();
|
|
73
|
+
// CWBI-13636 Limit Map Extent
|
|
74
|
+
const limitMapExtent = opts.hasOwnProperty("limitMapExtent")
|
|
75
|
+
? opts.limitMapExtent
|
|
76
|
+
: null;
|
|
77
|
+
const extent = limitMapExtent
|
|
78
|
+
? transformExtent(
|
|
79
|
+
[-180, -85, 180, 85],
|
|
80
|
+
geoProjection,
|
|
81
|
+
webProjection
|
|
82
|
+
)
|
|
83
|
+
: null;
|
|
84
|
+
const center = opts.hasOwnProperty("center")
|
|
85
|
+
? opts.center
|
|
86
|
+
: store.selectMapCenter();
|
|
87
|
+
const zoom = opts.hasOwnProperty("zoom")
|
|
88
|
+
? opts.zoom
|
|
89
|
+
: store.selectMapZoom();
|
|
90
|
+
const rotation = opts.hasOwnProperty("rotation")
|
|
91
|
+
? opts.rotation
|
|
92
|
+
: store.selectMapRotation();
|
|
93
|
+
const minZoom = opts.hasOwnProperty("minZoom")
|
|
94
|
+
? opts.minZoom
|
|
95
|
+
: store.selectMapMinZoom();
|
|
96
|
+
const maxZoom = opts.hasOwnProperty("maxZoom")
|
|
97
|
+
? opts.maxZoom
|
|
98
|
+
: store.selectMapMaxZoom();
|
|
99
|
+
|
|
100
|
+
console.log("setting up at", opts.center, center);
|
|
101
|
+
|
|
102
|
+
const viewParams = {
|
|
103
|
+
center: transform(center, geoProjection, webProjection),
|
|
104
|
+
zoom: zoom,
|
|
105
|
+
rotation: rotation,
|
|
106
|
+
minZoom: minZoom,
|
|
107
|
+
maxZoom: maxZoom,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// CWBI-13636 Limit Map Extent
|
|
111
|
+
if (extent) {
|
|
112
|
+
viewParams.extent = extent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const view = new View(viewParams);
|
|
116
|
+
const map = new olMap({
|
|
117
|
+
controls: [new ScaleBar({ units: "us" })],
|
|
118
|
+
target: el,
|
|
119
|
+
view: view,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
map.on("moveend", debounce(store.doMapUpdateViewState, 200));
|
|
123
|
+
map.on("precompose", debounce(store.doMapPreCompose, 50));
|
|
124
|
+
map.on("rendercomplete", debounce(store.doMapRenderComplete, 200));
|
|
125
|
+
|
|
126
|
+
dispatch({
|
|
127
|
+
type: "MAP_INITIALIZED",
|
|
128
|
+
payload: { map: map, opts: opts },
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
doMapPreCompose:
|
|
132
|
+
() =>
|
|
133
|
+
({ dispatch }) => {
|
|
134
|
+
dispatch({
|
|
135
|
+
type: "MAP_LOADING",
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
doMapRenderComplete:
|
|
139
|
+
() =>
|
|
140
|
+
({ dispatch }) => {
|
|
141
|
+
dispatch({
|
|
142
|
+
type: "MAP_LOADED",
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
doMapUpdateSize:
|
|
147
|
+
() =>
|
|
148
|
+
({ dispatch, store }) => {
|
|
149
|
+
const map = store.selectMap();
|
|
150
|
+
if (map) map.updateSize();
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
doMapUpdateViewState:
|
|
154
|
+
() =>
|
|
155
|
+
({ dispatch, store }) => {
|
|
156
|
+
dispatch({
|
|
157
|
+
type: "MAP_UPDATED_VIEW_STATE_STARTED",
|
|
158
|
+
payload: { shouldUpdateViewState: false },
|
|
159
|
+
});
|
|
160
|
+
const epsg4326 = store.selectMapGeoProjection();
|
|
161
|
+
const epsg3857 = store.selectMapWebProjection();
|
|
162
|
+
const map = store.selectMap();
|
|
163
|
+
const view = map.getView();
|
|
164
|
+
const center = transform(view.getCenter(), epsg3857, epsg4326);
|
|
165
|
+
const rotation = view.getRotation() * (180 / Math.PI);
|
|
166
|
+
const zoom = view.getZoom();
|
|
167
|
+
const minZoom = view.getMinZoom();
|
|
168
|
+
const maxZoom = view.getMaxZoom();
|
|
169
|
+
dispatch({
|
|
170
|
+
type: "MAP_UPDATED_VIEW_STATE_FINISHED",
|
|
171
|
+
payload: {
|
|
172
|
+
center: center,
|
|
173
|
+
rotation: rotation,
|
|
174
|
+
zoom: zoom,
|
|
175
|
+
minZoom: minZoom,
|
|
176
|
+
maxZoom: maxZoom,
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
doMapResetViewState:
|
|
182
|
+
() =>
|
|
183
|
+
({ dispatch, store }) => {
|
|
184
|
+
dispatch({
|
|
185
|
+
type: "MAP_RESET_MAP_VIEW",
|
|
186
|
+
payload: { shouldResetViewState: false },
|
|
187
|
+
});
|
|
188
|
+
const { center, zoom, rotation } = config;
|
|
189
|
+
const map = store.selectMap();
|
|
190
|
+
const view = map.getView();
|
|
191
|
+
const geoProjection = store.selectMapGeoProjection();
|
|
192
|
+
const webProjection = store.selectMapWebProjection();
|
|
193
|
+
view.animate(
|
|
194
|
+
{
|
|
195
|
+
center: transform(center, geoProjection, webProjection),
|
|
196
|
+
zoom: zoom,
|
|
197
|
+
rotation: rotation,
|
|
198
|
+
},
|
|
199
|
+
200
|
|
200
|
+
);
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
doMapZoomTo:
|
|
204
|
+
(lonLat, z) =>
|
|
205
|
+
({ store }) => {
|
|
206
|
+
const map = store.selectMap();
|
|
207
|
+
const view = map.getView();
|
|
208
|
+
view.animate({
|
|
209
|
+
zoom: z || 10,
|
|
210
|
+
center: fromLonLat(lonLat),
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
// doLimitMapExtent: (value) => ({ dispatch, store }) => {
|
|
215
|
+
// dispatch({
|
|
216
|
+
// type: "MAP_SET_LIMIT_EXTENT",
|
|
217
|
+
// payload: { limitExtent: value, shouldResetViewState: true },
|
|
218
|
+
// });
|
|
219
|
+
// },
|
|
220
|
+
|
|
221
|
+
selectMap: (state) => {
|
|
222
|
+
return state.map.map;
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
selectMapOpts: (state) => {
|
|
226
|
+
return state.map.opts;
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
selectMapGeoProjection: (state) => {
|
|
230
|
+
return state.map.geoProjection;
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
selectMapWebProjection: (state) => {
|
|
234
|
+
return state.map.webProjection;
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
selectMapCenter: (state) => {
|
|
238
|
+
return state.map.center;
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
selectMapZoom: createSelector("selectAppTime", "selectMap", (_, map) => {
|
|
242
|
+
if (!map) return 0;
|
|
243
|
+
const view = map.getView();
|
|
244
|
+
return view.getZoom();
|
|
245
|
+
}),
|
|
246
|
+
|
|
247
|
+
selectMapRotation: (state) => {
|
|
248
|
+
return state.map.rotation;
|
|
249
|
+
},
|
|
250
|
+
|
|
251
|
+
selectMapMinZoom: (state) => {
|
|
252
|
+
return state.map.minZoom;
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
selectMapMaxZoom: (state) => {
|
|
256
|
+
return state.map.maxZoom;
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
reactMapShouldResetViewState: (state) => {
|
|
260
|
+
if (state.map.shouldResetViewState)
|
|
261
|
+
return { actionCreator: "doMapResetViewState" };
|
|
262
|
+
},
|
|
263
|
+
reactMapShouldUpdateViewState: (state) => {
|
|
264
|
+
if (state.map.shouldUpdateViewState)
|
|
265
|
+
return { actionCreator: "doMapUpdateViewState" };
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
persistActions: config.persistMapState
|
|
269
|
+
? ["MAP_UPDATED_VIEW_STATE_FINISHED", "MAP_RESET_MAP_VIEW"]
|
|
270
|
+
: [],
|
|
271
|
+
|
|
272
|
+
init: (store) => {
|
|
273
|
+
window.addEventListener("resize", store.doMapUpdateSize);
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
config.addons
|
|
277
|
+
);
|
|
278
|
+
};
|