@corpsmap/corpsmap 3.0.11 → 3.0.14
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/css/corpsmap.css +15 -6
- package/lib/dev.js +5143 -1294
- package/lib/prod.js +5143 -1294
- package/package.json +6 -1
- package/src/application-bundles/map-layers-bundle.js +16 -13
- package/src/application-controls/tree-list-folder.js +45 -27
- package/src/core-plugins/add-data/add-data-button.js +7 -8
- package/src/core-plugins/add-data/add-geojson.js +23 -19
- package/src/core-plugins/add-data/add-kmlfile.js +46 -0
- package/src/core-plugins/add-data/bundle.js +185 -111
- package/src/core-plugins/identify-arcgis-rest/bundle.js +2 -1
- package/src/core-plugins/tree-view/download-bundle.js +2 -2
- package/src/core-plugins/tree-view/layer-subpanel/layer-subpanel.js +1 -1
- package/src/core-plugins/tree-view/tree-list-item-dataset.js +14 -3
- package/src/openlayers-utils/format-utilities.js +13 -0
- package/src/utils/load-plugins.test.js +36 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import async from "async";
|
|
2
|
+
import formatArcgisrest from "../../openlayers-utils/format-utilities";
|
|
2
3
|
|
|
3
4
|
function formatUrl(options) {
|
|
4
5
|
let url = `${options.root}/identify?`;
|
|
@@ -105,7 +106,7 @@ export default {
|
|
|
105
106
|
type: featureType,
|
|
106
107
|
coordinates: coords,
|
|
107
108
|
},
|
|
108
|
-
properties: feat.attributes,
|
|
109
|
+
properties: formatArcgisrest(feat.attributes),
|
|
109
110
|
};
|
|
110
111
|
}),
|
|
111
112
|
},
|
|
@@ -48,7 +48,7 @@ export const treeViewDownload = {
|
|
|
48
48
|
const format = e.target.value;
|
|
49
49
|
let url = null;
|
|
50
50
|
if (layer.identifyType === "MAP") {
|
|
51
|
-
const params =
|
|
51
|
+
const params = `?&service=WFS&version=1.1.0&request=GetFeature&typeName=${layer.layerList}&outputformat=${format}&outfile=${layer.layerList}`;
|
|
52
52
|
url = `${layer.url}${params}`;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -108,7 +108,7 @@ export const treeViewDownload = {
|
|
|
108
108
|
let url = null;
|
|
109
109
|
switch (layer.identifyType) {
|
|
110
110
|
case "MAP":
|
|
111
|
-
const params =
|
|
111
|
+
const params = `?&service=WFS&version=1.1.0&request=GetFeature&typeName=${layer.layerList}&outputformat=${format}&outfile=${layer.layerList}`;
|
|
112
112
|
url = `${layer.url}${params}`;
|
|
113
113
|
break;
|
|
114
114
|
default:
|
|
@@ -30,7 +30,7 @@ const LayerSubpanel = (props) => {
|
|
|
30
30
|
: false;
|
|
31
31
|
const url =
|
|
32
32
|
treeViewSelectedItem.identifyType == "MAP"
|
|
33
|
-
? `${treeViewSelectedItem.url}
|
|
33
|
+
? `${treeViewSelectedItem.url}?&service=WMS&version=1.3.0&request=GetCapabilities&layers=${treeViewSelectedItem.layerList}&query_layers=${treeViewSelectedItem.layerList}`
|
|
34
34
|
: treeViewSelectedItem.url;
|
|
35
35
|
|
|
36
36
|
return (
|
|
@@ -12,9 +12,11 @@ class TreeListItemDataset extends React.Component {
|
|
|
12
12
|
showLegend: false,
|
|
13
13
|
visible: props.item.visible,
|
|
14
14
|
displayName: props.item.displayName,
|
|
15
|
+
hoverText: props.item.hoverText,
|
|
15
16
|
type: props.item.type,
|
|
16
17
|
expanded: false,
|
|
17
18
|
};
|
|
19
|
+
|
|
18
20
|
this.toggleVisible = this.toggleVisible.bind(this);
|
|
19
21
|
this.zoomTo = this.zoomTo.bind(this);
|
|
20
22
|
this.openMetadata = this.openMetadata.bind(this);
|
|
@@ -77,7 +79,16 @@ class TreeListItemDataset extends React.Component {
|
|
|
77
79
|
render() {
|
|
78
80
|
const { item, isOver, theme, mapZoom } = this.props;
|
|
79
81
|
const { expanded } = this.state;
|
|
80
|
-
const {
|
|
82
|
+
const {
|
|
83
|
+
displayName,
|
|
84
|
+
type,
|
|
85
|
+
identifyType,
|
|
86
|
+
favorite,
|
|
87
|
+
userDefaultLayer,
|
|
88
|
+
hoverText,
|
|
89
|
+
} = item;
|
|
90
|
+
|
|
91
|
+
const hoverTextDisplay = hoverText ? hoverText : displayName;
|
|
81
92
|
|
|
82
93
|
if (!item.passFilter) return null;
|
|
83
94
|
|
|
@@ -111,7 +122,7 @@ class TreeListItemDataset extends React.Component {
|
|
|
111
122
|
</span>
|
|
112
123
|
<label
|
|
113
124
|
className={itemClass}
|
|
114
|
-
title={`${
|
|
125
|
+
title={`${hoverTextDisplay} ${!enabled ? "- zoom in to enable" : ""}`}
|
|
115
126
|
style={itemTxtStyle}
|
|
116
127
|
>
|
|
117
128
|
<input
|
|
@@ -135,7 +146,7 @@ class TreeListItemDataset extends React.Component {
|
|
|
135
146
|
title="Layer saved to favorites list"
|
|
136
147
|
/>
|
|
137
148
|
) : null}
|
|
138
|
-
|
|
149
|
+
{userDefaultLayer ? (
|
|
139
150
|
<i
|
|
140
151
|
style={{ fontSize: "11px" }}
|
|
141
152
|
className="mdi mdi-account"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const formatArcgisrest = function (attributes) {
|
|
2
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
3
|
+
const result =
|
|
4
|
+
value.includes("https:") || value.includes("http:") ? value : null;
|
|
5
|
+
|
|
6
|
+
if (result) {
|
|
7
|
+
attributes[key] = `<a href="${value}" target="_new" > ${value} </a>`;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return attributes;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default formatArcgisrest;
|
|
@@ -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
|
+
// });
|