@corpsmap/corpsmap 3.2.5 → 3.2.7
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/lib/dev.js +54 -6
- package/lib/prod.js +54 -6
- package/package.json +1 -1
- package/src/core-plugins/identify/bundle.js +13 -1
- package/src/core-plugins/identify/identify-table.js +3 -1
- package/src/core-plugins/identify-arcgis-rest/bundle.js +19 -17
- package/src/core-plugins/identify-vector/bundle.js +4 -2
- package/src/openlayers-utils/format-utilities.js +27 -1
package/lib/dev.js
CHANGED
|
@@ -106554,7 +106554,7 @@ var config = {
|
|
|
106554
106554
|
};
|
|
106555
106555
|
|
|
106556
106556
|
var name = "@corpsmap/corpsmap";
|
|
106557
|
-
var version$1 = "3.2.
|
|
106557
|
+
var version$1 = "3.2.7";
|
|
106558
106558
|
var description = "CorpsMap as React Components";
|
|
106559
106559
|
var main = "index.js";
|
|
106560
106560
|
var scripts = {
|
|
@@ -132855,6 +132855,32 @@ var formatArcgisVector = function formatArcgisVector(results) {
|
|
|
132855
132855
|
return results;
|
|
132856
132856
|
};
|
|
132857
132857
|
|
|
132858
|
+
var identifyColumnsArcgisrest = function identifyColumnsArcgisrest(data, excludedColumns) {
|
|
132859
|
+
data.results.forEach(function (result) {
|
|
132860
|
+
if (result.attributes) {
|
|
132861
|
+
excludedColumns.forEach(function (column) {
|
|
132862
|
+
delete result.attributes[column];
|
|
132863
|
+
});
|
|
132864
|
+
}
|
|
132865
|
+
|
|
132866
|
+
return result.attributes;
|
|
132867
|
+
});
|
|
132868
|
+
return data;
|
|
132869
|
+
};
|
|
132870
|
+
|
|
132871
|
+
var identifyColumnsArcgisvector = function identifyColumnsArcgisvector(data, excludedColumns) {
|
|
132872
|
+
data.forEach(function (feature) {
|
|
132873
|
+
if (feature.properties) {
|
|
132874
|
+
excludedColumns.forEach(function (column) {
|
|
132875
|
+
delete feature.properties[column];
|
|
132876
|
+
});
|
|
132877
|
+
}
|
|
132878
|
+
|
|
132879
|
+
return feature.properties;
|
|
132880
|
+
});
|
|
132881
|
+
return data;
|
|
132882
|
+
};
|
|
132883
|
+
|
|
132858
132884
|
function formatUrl(options) {
|
|
132859
132885
|
var url = "".concat(options.root, "/identify?");
|
|
132860
132886
|
var params = [];
|
|
@@ -132910,6 +132936,7 @@ var bundle$1 = {
|
|
|
132910
132936
|
anonGet = _ref3.anonGet;
|
|
132911
132937
|
var coords = store.selectIdentifyCoordinates();
|
|
132912
132938
|
var visibleLayers = store.selectVisibleLayers();
|
|
132939
|
+
var excludedColumns = store.selectIdentifyColumnsExclude();
|
|
132913
132940
|
var featureType = "Point";
|
|
132914
132941
|
if (!visibleLayers.length) return callback(null, []); //http://resources.esri.com/help/9.3/arcgisserver/apis/rest/identify.html
|
|
132915
132942
|
|
|
@@ -132953,7 +132980,8 @@ var bundle$1 = {
|
|
|
132953
132980
|
cb("Error for ".concat(visibleLayer.displayName));
|
|
132954
132981
|
} else {
|
|
132955
132982
|
try {
|
|
132956
|
-
var data = JSON.parse(body);
|
|
132983
|
+
var data = JSON.parse(body);
|
|
132984
|
+
data = identifyColumnsArcgisrest(data, excludedColumns); //Column Filtering
|
|
132957
132985
|
|
|
132958
132986
|
if (visibleLayer.identifyFields) {
|
|
132959
132987
|
data.results.forEach(function (result) {
|
|
@@ -132963,7 +132991,7 @@ var bundle$1 = {
|
|
|
132963
132991
|
key = _Object$entries$_i[0],
|
|
132964
132992
|
value = _Object$entries$_i[1];
|
|
132965
132993
|
|
|
132966
|
-
var reducedProperties =
|
|
132994
|
+
var reducedProperties = [];
|
|
132967
132995
|
visibleLayer.identifyFields.forEach(function (property) {
|
|
132968
132996
|
if (result.attributes[property]) {
|
|
132969
132997
|
reducedProperties[property] = result.attributes[property];
|
|
@@ -141622,6 +141650,8 @@ var IdentifyTable = /*#__PURE__*/function (_React$Component) {
|
|
|
141622
141650
|
key: "generateColumns",
|
|
141623
141651
|
value: function generateColumns(properties) {
|
|
141624
141652
|
return Object.keys(properties).map(function (key, i) {
|
|
141653
|
+
// Increase the width for longer column names.
|
|
141654
|
+
var width = key && key.length > 15 ? 150 + (key.length - 10) * 5 : 150;
|
|
141625
141655
|
return {
|
|
141626
141656
|
id: i,
|
|
141627
141657
|
key: key,
|
|
@@ -141629,7 +141659,7 @@ var IdentifyTable = /*#__PURE__*/function (_React$Component) {
|
|
|
141629
141659
|
editable: false,
|
|
141630
141660
|
sortable: true,
|
|
141631
141661
|
filterable: true,
|
|
141632
|
-
width:
|
|
141662
|
+
width: width,
|
|
141633
141663
|
resizable: true,
|
|
141634
141664
|
nullable: true,
|
|
141635
141665
|
formatter: Cell
|
|
@@ -142188,7 +142218,8 @@ var bundle$6 = {
|
|
|
142188
142218
|
geom: null,
|
|
142189
142219
|
results: [],
|
|
142190
142220
|
selectedFeature: null,
|
|
142191
|
-
selectedLayer: null
|
|
142221
|
+
selectedLayer: null,
|
|
142222
|
+
identifyColumnsExclude: []
|
|
142192
142223
|
};
|
|
142193
142224
|
return function () {
|
|
142194
142225
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
@@ -142210,6 +142241,7 @@ var bundle$6 = {
|
|
|
142210
142241
|
case "IDENTIFY_UI_BUFFER_UNIT_UPDATED":
|
|
142211
142242
|
case "IDENTIFY_UI_BUFFER_VALUE_UPDATED":
|
|
142212
142243
|
case "IDENTIFY_UI_BUFFER_FEATURE_UPDATED":
|
|
142244
|
+
case "IDENTIFY_EXCLUDED_COLUMNS_SET":
|
|
142213
142245
|
return Object.assign({}, state, payload);
|
|
142214
142246
|
|
|
142215
142247
|
case "IDENTIFY_ERROR":
|
|
@@ -142754,6 +142786,20 @@ var bundle$6 = {
|
|
|
142754
142786
|
store.doModalClose();
|
|
142755
142787
|
};
|
|
142756
142788
|
},
|
|
142789
|
+
doSetIdentifyColumnsExclude: function doSetIdentifyColumnsExclude(excludedColumn) {
|
|
142790
|
+
return function (_ref25) {
|
|
142791
|
+
var dispatch = _ref25.dispatch;
|
|
142792
|
+
dispatch({
|
|
142793
|
+
type: "IDENTIFY_EXCLUDED_COLUMNS_SET",
|
|
142794
|
+
payload: {
|
|
142795
|
+
identifyColumnsExclude: excludedColumn
|
|
142796
|
+
}
|
|
142797
|
+
});
|
|
142798
|
+
};
|
|
142799
|
+
},
|
|
142800
|
+
selectIdentifyColumnsExclude: function selectIdentifyColumnsExclude(state) {
|
|
142801
|
+
return state.identifyUi.identifyColumnsExclude;
|
|
142802
|
+
},
|
|
142757
142803
|
selectIdentifySelectBy: function selectIdentifySelectBy(state) {
|
|
142758
142804
|
return state.identifyUi.selectBy;
|
|
142759
142805
|
},
|
|
@@ -162681,13 +162727,15 @@ var bundle$e = {
|
|
|
162681
162727
|
var mapLayer = lyr.mapLayer;
|
|
162682
162728
|
var outFeatures = [];
|
|
162683
162729
|
var src = mapLayer.getSource();
|
|
162730
|
+
var excludedColumns = store.selectIdentifyColumnsExclude();
|
|
162684
162731
|
src.forEachFeatureIntersectingExtent(identifyExtent, function (f) {
|
|
162685
162732
|
var geoJsonFeature = geoJSON$3.writeFeatureObject(f, {
|
|
162686
162733
|
featureProjection: "EPSG:3857",
|
|
162687
162734
|
dataProjection: "EPSG:4326"
|
|
162688
162735
|
});
|
|
162689
162736
|
if (!booleanDisjoint(identifyFeature, geoJsonFeature)) outFeatures.push(geoJsonFeature);
|
|
162690
|
-
});
|
|
162737
|
+
});
|
|
162738
|
+
outFeatures = identifyColumnsArcgisvector(outFeatures, excludedColumns); //Column Filtering
|
|
162691
162739
|
|
|
162692
162740
|
if (layers[0].identifyFields) {
|
|
162693
162741
|
outFeatures.forEach(function (feature) {
|
package/lib/prod.js
CHANGED
|
@@ -106468,7 +106468,7 @@ var config = {
|
|
|
106468
106468
|
};
|
|
106469
106469
|
|
|
106470
106470
|
var name = "@corpsmap/corpsmap";
|
|
106471
|
-
var version$1 = "3.2.
|
|
106471
|
+
var version$1 = "3.2.7";
|
|
106472
106472
|
var description = "CorpsMap as React Components";
|
|
106473
106473
|
var main = "index.js";
|
|
106474
106474
|
var scripts = {
|
|
@@ -132769,6 +132769,32 @@ var formatArcgisVector = function formatArcgisVector(results) {
|
|
|
132769
132769
|
return results;
|
|
132770
132770
|
};
|
|
132771
132771
|
|
|
132772
|
+
var identifyColumnsArcgisrest = function identifyColumnsArcgisrest(data, excludedColumns) {
|
|
132773
|
+
data.results.forEach(function (result) {
|
|
132774
|
+
if (result.attributes) {
|
|
132775
|
+
excludedColumns.forEach(function (column) {
|
|
132776
|
+
delete result.attributes[column];
|
|
132777
|
+
});
|
|
132778
|
+
}
|
|
132779
|
+
|
|
132780
|
+
return result.attributes;
|
|
132781
|
+
});
|
|
132782
|
+
return data;
|
|
132783
|
+
};
|
|
132784
|
+
|
|
132785
|
+
var identifyColumnsArcgisvector = function identifyColumnsArcgisvector(data, excludedColumns) {
|
|
132786
|
+
data.forEach(function (feature) {
|
|
132787
|
+
if (feature.properties) {
|
|
132788
|
+
excludedColumns.forEach(function (column) {
|
|
132789
|
+
delete feature.properties[column];
|
|
132790
|
+
});
|
|
132791
|
+
}
|
|
132792
|
+
|
|
132793
|
+
return feature.properties;
|
|
132794
|
+
});
|
|
132795
|
+
return data;
|
|
132796
|
+
};
|
|
132797
|
+
|
|
132772
132798
|
function formatUrl(options) {
|
|
132773
132799
|
var url = "".concat(options.root, "/identify?");
|
|
132774
132800
|
var params = [];
|
|
@@ -132824,6 +132850,7 @@ var bundle$1 = {
|
|
|
132824
132850
|
anonGet = _ref3.anonGet;
|
|
132825
132851
|
var coords = store.selectIdentifyCoordinates();
|
|
132826
132852
|
var visibleLayers = store.selectVisibleLayers();
|
|
132853
|
+
var excludedColumns = store.selectIdentifyColumnsExclude();
|
|
132827
132854
|
var featureType = "Point";
|
|
132828
132855
|
if (!visibleLayers.length) return callback(null, []); //http://resources.esri.com/help/9.3/arcgisserver/apis/rest/identify.html
|
|
132829
132856
|
|
|
@@ -132867,7 +132894,8 @@ var bundle$1 = {
|
|
|
132867
132894
|
cb("Error for ".concat(visibleLayer.displayName));
|
|
132868
132895
|
} else {
|
|
132869
132896
|
try {
|
|
132870
|
-
var data = JSON.parse(body);
|
|
132897
|
+
var data = JSON.parse(body);
|
|
132898
|
+
data = identifyColumnsArcgisrest(data, excludedColumns); //Column Filtering
|
|
132871
132899
|
|
|
132872
132900
|
if (visibleLayer.identifyFields) {
|
|
132873
132901
|
data.results.forEach(function (result) {
|
|
@@ -132877,7 +132905,7 @@ var bundle$1 = {
|
|
|
132877
132905
|
key = _Object$entries$_i[0],
|
|
132878
132906
|
value = _Object$entries$_i[1];
|
|
132879
132907
|
|
|
132880
|
-
var reducedProperties =
|
|
132908
|
+
var reducedProperties = [];
|
|
132881
132909
|
visibleLayer.identifyFields.forEach(function (property) {
|
|
132882
132910
|
if (result.attributes[property]) {
|
|
132883
132911
|
reducedProperties[property] = result.attributes[property];
|
|
@@ -141536,6 +141564,8 @@ var IdentifyTable = /*#__PURE__*/function (_React$Component) {
|
|
|
141536
141564
|
key: "generateColumns",
|
|
141537
141565
|
value: function generateColumns(properties) {
|
|
141538
141566
|
return Object.keys(properties).map(function (key, i) {
|
|
141567
|
+
// Increase the width for longer column names.
|
|
141568
|
+
var width = key && key.length > 15 ? 150 + (key.length - 10) * 5 : 150;
|
|
141539
141569
|
return {
|
|
141540
141570
|
id: i,
|
|
141541
141571
|
key: key,
|
|
@@ -141543,7 +141573,7 @@ var IdentifyTable = /*#__PURE__*/function (_React$Component) {
|
|
|
141543
141573
|
editable: false,
|
|
141544
141574
|
sortable: true,
|
|
141545
141575
|
filterable: true,
|
|
141546
|
-
width:
|
|
141576
|
+
width: width,
|
|
141547
141577
|
resizable: true,
|
|
141548
141578
|
nullable: true,
|
|
141549
141579
|
formatter: Cell
|
|
@@ -142102,7 +142132,8 @@ var bundle$6 = {
|
|
|
142102
142132
|
geom: null,
|
|
142103
142133
|
results: [],
|
|
142104
142134
|
selectedFeature: null,
|
|
142105
|
-
selectedLayer: null
|
|
142135
|
+
selectedLayer: null,
|
|
142136
|
+
identifyColumnsExclude: []
|
|
142106
142137
|
};
|
|
142107
142138
|
return function () {
|
|
142108
142139
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
@@ -142124,6 +142155,7 @@ var bundle$6 = {
|
|
|
142124
142155
|
case "IDENTIFY_UI_BUFFER_UNIT_UPDATED":
|
|
142125
142156
|
case "IDENTIFY_UI_BUFFER_VALUE_UPDATED":
|
|
142126
142157
|
case "IDENTIFY_UI_BUFFER_FEATURE_UPDATED":
|
|
142158
|
+
case "IDENTIFY_EXCLUDED_COLUMNS_SET":
|
|
142127
142159
|
return Object.assign({}, state, payload);
|
|
142128
142160
|
|
|
142129
142161
|
case "IDENTIFY_ERROR":
|
|
@@ -142668,6 +142700,20 @@ var bundle$6 = {
|
|
|
142668
142700
|
store.doModalClose();
|
|
142669
142701
|
};
|
|
142670
142702
|
},
|
|
142703
|
+
doSetIdentifyColumnsExclude: function doSetIdentifyColumnsExclude(excludedColumn) {
|
|
142704
|
+
return function (_ref25) {
|
|
142705
|
+
var dispatch = _ref25.dispatch;
|
|
142706
|
+
dispatch({
|
|
142707
|
+
type: "IDENTIFY_EXCLUDED_COLUMNS_SET",
|
|
142708
|
+
payload: {
|
|
142709
|
+
identifyColumnsExclude: excludedColumn
|
|
142710
|
+
}
|
|
142711
|
+
});
|
|
142712
|
+
};
|
|
142713
|
+
},
|
|
142714
|
+
selectIdentifyColumnsExclude: function selectIdentifyColumnsExclude(state) {
|
|
142715
|
+
return state.identifyUi.identifyColumnsExclude;
|
|
142716
|
+
},
|
|
142671
142717
|
selectIdentifySelectBy: function selectIdentifySelectBy(state) {
|
|
142672
142718
|
return state.identifyUi.selectBy;
|
|
142673
142719
|
},
|
|
@@ -162595,13 +162641,15 @@ var bundle$e = {
|
|
|
162595
162641
|
var mapLayer = lyr.mapLayer;
|
|
162596
162642
|
var outFeatures = [];
|
|
162597
162643
|
var src = mapLayer.getSource();
|
|
162644
|
+
var excludedColumns = store.selectIdentifyColumnsExclude();
|
|
162598
162645
|
src.forEachFeatureIntersectingExtent(identifyExtent, function (f) {
|
|
162599
162646
|
var geoJsonFeature = geoJSON$3.writeFeatureObject(f, {
|
|
162600
162647
|
featureProjection: "EPSG:3857",
|
|
162601
162648
|
dataProjection: "EPSG:4326"
|
|
162602
162649
|
});
|
|
162603
162650
|
if (!booleanDisjoint(identifyFeature, geoJsonFeature)) outFeatures.push(geoJsonFeature);
|
|
162604
|
-
});
|
|
162651
|
+
});
|
|
162652
|
+
outFeatures = identifyColumnsArcgisvector(outFeatures, excludedColumns); //Column Filtering
|
|
162605
162653
|
|
|
162606
162654
|
if (layers[0].identifyFields) {
|
|
162607
162655
|
outFeatures.forEach(function (feature) {
|
package/package.json
CHANGED
|
@@ -117,6 +117,7 @@ export default {
|
|
|
117
117
|
results: [],
|
|
118
118
|
selectedFeature: null,
|
|
119
119
|
selectedLayer: null,
|
|
120
|
+
identifyColumnsExclude: [],
|
|
120
121
|
};
|
|
121
122
|
|
|
122
123
|
return (state = initialData, { type, payload }) => {
|
|
@@ -133,6 +134,7 @@ export default {
|
|
|
133
134
|
case "IDENTIFY_UI_BUFFER_UNIT_UPDATED":
|
|
134
135
|
case "IDENTIFY_UI_BUFFER_VALUE_UPDATED":
|
|
135
136
|
case "IDENTIFY_UI_BUFFER_FEATURE_UPDATED":
|
|
137
|
+
case "IDENTIFY_EXCLUDED_COLUMNS_SET":
|
|
136
138
|
return Object.assign({}, state, payload);
|
|
137
139
|
case "IDENTIFY_ERROR":
|
|
138
140
|
return Object.assign({}, state, {
|
|
@@ -638,7 +640,17 @@ export default {
|
|
|
638
640
|
//close modal after selection
|
|
639
641
|
store.doModalClose();
|
|
640
642
|
},
|
|
641
|
-
|
|
643
|
+
doSetIdentifyColumnsExclude: (excludedColumn) => ({dispatch}) =>{
|
|
644
|
+
dispatch({
|
|
645
|
+
type: "IDENTIFY_EXCLUDED_COLUMNS_SET",
|
|
646
|
+
payload: {
|
|
647
|
+
identifyColumnsExclude: excludedColumn,
|
|
648
|
+
},
|
|
649
|
+
});
|
|
650
|
+
},
|
|
651
|
+
selectIdentifyColumnsExclude: (state) => {
|
|
652
|
+
return state.identifyUi.identifyColumnsExclude;
|
|
653
|
+
},
|
|
642
654
|
selectIdentifySelectBy: (state) => {
|
|
643
655
|
return state.identifyUi.selectBy;
|
|
644
656
|
},
|
|
@@ -104,6 +104,8 @@ class IdentifyTable extends React.Component {
|
|
|
104
104
|
|
|
105
105
|
generateColumns(properties) {
|
|
106
106
|
return Object.keys(properties).map((key, i) => {
|
|
107
|
+
// Increase the width for longer column names.
|
|
108
|
+
let width = key && key.length > 15 ? 150 + (key.length -10 ) * 5 : 150;
|
|
107
109
|
return {
|
|
108
110
|
id: i,
|
|
109
111
|
key: key,
|
|
@@ -111,7 +113,7 @@ class IdentifyTable extends React.Component {
|
|
|
111
113
|
editable: false,
|
|
112
114
|
sortable: true,
|
|
113
115
|
filterable: true,
|
|
114
|
-
width:
|
|
116
|
+
width: width,
|
|
115
117
|
resizable: true,
|
|
116
118
|
nullable: true,
|
|
117
119
|
formatter: Cell,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import async from "async";
|
|
2
|
-
import { formatArcgisrest} from "../../openlayers-utils/format-utilities";
|
|
2
|
+
import { formatArcgisrest, identifyColumnsArcgisrest} from "../../openlayers-utils/format-utilities";
|
|
3
3
|
|
|
4
4
|
function formatUrl(options) {
|
|
5
5
|
let url = `${options.root}/identify?`;
|
|
@@ -46,6 +46,7 @@ export default {
|
|
|
46
46
|
({ store, anonGet }) => {
|
|
47
47
|
const coords = store.selectIdentifyCoordinates();
|
|
48
48
|
const visibleLayers = store.selectVisibleLayers();
|
|
49
|
+
let excludedColumns = store.selectIdentifyColumnsExclude()
|
|
49
50
|
let featureType = "Point";
|
|
50
51
|
|
|
51
52
|
if (!visibleLayers.length) return callback(null, []);
|
|
@@ -90,22 +91,23 @@ export default {
|
|
|
90
91
|
if (err || response.statusCode !== 200) {
|
|
91
92
|
cb(`Error for ${visibleLayer.displayName}`);
|
|
92
93
|
} else {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
94
|
+
try {
|
|
95
|
+
let data = JSON.parse(body);
|
|
96
|
+
data = identifyColumnsArcgisrest(data, excludedColumns)
|
|
97
|
+
//Column Filtering
|
|
98
|
+
if (visibleLayer.identifyFields) {
|
|
99
|
+
data.results.forEach((result) => {
|
|
100
|
+
if(result.attributes){
|
|
101
|
+
for (const [key, value] of Object.entries(result.attributes)) {
|
|
102
|
+
let reducedProperties = [];
|
|
103
|
+
visibleLayer.identifyFields.forEach((property) => {
|
|
104
|
+
if (result.attributes[property]) {
|
|
105
|
+
reducedProperties[property] =
|
|
106
|
+
result.attributes[property];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
result.attributes = reducedProperties;
|
|
110
|
+
}
|
|
109
111
|
}
|
|
110
112
|
})
|
|
111
113
|
}
|
|
@@ -5,7 +5,7 @@ import disjoint from "@turf/boolean-disjoint";
|
|
|
5
5
|
import bbox from "@turf/bbox";
|
|
6
6
|
import GeoJSON from "ol/format/GeoJSON";
|
|
7
7
|
import { transformExtent } from "ol/proj";
|
|
8
|
-
import { formatArcgisVector } from "../../openlayers-utils/format-utilities";
|
|
8
|
+
import { formatArcgisVector, identifyColumnsArcgisvector } from "../../openlayers-utils/format-utilities";
|
|
9
9
|
|
|
10
10
|
const geoJSON = new GeoJSON();
|
|
11
11
|
|
|
@@ -67,8 +67,9 @@ export default {
|
|
|
67
67
|
layers.forEach((lyr) => {
|
|
68
68
|
if (lyr.identifyType === "arcgisvector") {
|
|
69
69
|
const { mapLayer } = lyr;
|
|
70
|
-
|
|
70
|
+
let outFeatures = [];
|
|
71
71
|
const src = mapLayer.getSource();
|
|
72
|
+
let excludedColumns = store.selectIdentifyColumnsExclude()
|
|
72
73
|
src.forEachFeatureIntersectingExtent(identifyExtent, (f) => {
|
|
73
74
|
const geoJsonFeature = geoJSON.writeFeatureObject(f, {
|
|
74
75
|
featureProjection: "EPSG:3857",
|
|
@@ -77,6 +78,7 @@ export default {
|
|
|
77
78
|
if (!disjoint(identifyFeature, geoJsonFeature))
|
|
78
79
|
outFeatures.push(geoJsonFeature);
|
|
79
80
|
});
|
|
81
|
+
outFeatures = identifyColumnsArcgisvector(outFeatures, excludedColumns)
|
|
80
82
|
//Column Filtering
|
|
81
83
|
if (layers[0].identifyFields) {
|
|
82
84
|
outFeatures.forEach((feature) => {
|
|
@@ -30,4 +30,30 @@ const formatArcgisVector = function (results) {
|
|
|
30
30
|
return results;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
const identifyColumnsArcgisrest = function (data, excludedColumns) {
|
|
34
|
+
data.results.forEach((result) => {
|
|
35
|
+
if(result.attributes){
|
|
36
|
+
excludedColumns.forEach((column) => {
|
|
37
|
+
delete result.attributes[column];
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return result.attributes
|
|
41
|
+
});
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const identifyColumnsArcgisvector = function (data, excludedColumns) {
|
|
46
|
+
data.forEach((feature) => {
|
|
47
|
+
if(feature.properties){
|
|
48
|
+
excludedColumns.forEach((column) => {
|
|
49
|
+
delete feature.properties[column];
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return feature.properties
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return data;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
export { formatArcgisVector, formatArcgisrest, identifyColumnsArcgisrest, identifyColumnsArcgisvector };
|