@corpsmap/corpsmap 4.1.31 → 4.1.33
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 +62 -56
- package/dist/corpsmap.umd.js +5 -5
- package/package.json +1 -1
- package/src/application-bundles/map-layers-bundle.js +7 -1
- package/src/core-plugins/identify/listeners/vector.jsx +1 -1
- package/src/core-plugins/identify-arcgis-rest/bundle.js +2 -2
- package/src/core-plugins/identify-geoserver/bundle.js +1 -1
- package/src/core-plugins/identify-map-server/bundle.js +1 -1
- package/src/core-plugins/identify-vector/bundle.jsx +2 -2
package/package.json
CHANGED
|
@@ -16,6 +16,10 @@ const createNode = (options, map) => {
|
|
|
16
16
|
if (!options.minzoom) options.minzoom = scaleToMapZoom(options.maxscale, 0);
|
|
17
17
|
if (!options.maxzoom) options.maxzoom = scaleToMapZoom(options.minscale, 20);
|
|
18
18
|
|
|
19
|
+
// Accept the correct spelling and the legacy misspelled one (identifyRenameColums).
|
|
20
|
+
const renameColumns =
|
|
21
|
+
options.identifyRenameColumns ?? options.identifyRenameColums;
|
|
22
|
+
|
|
19
23
|
const node = {
|
|
20
24
|
id: options.id,
|
|
21
25
|
teamDatasetId: options.teamDatasetId,
|
|
@@ -43,7 +47,9 @@ const createNode = (options, map) => {
|
|
|
43
47
|
identifyType: options.identifyType,
|
|
44
48
|
identifyLayers: options.identifyLayers,
|
|
45
49
|
identifyFields: options.identifyFields,
|
|
46
|
-
|
|
50
|
+
identifyRenameColumns: renameColumns,
|
|
51
|
+
// Deprecated alias for the original misspelling; remove in the next major version.
|
|
52
|
+
identifyRenameColums: renameColumns,
|
|
47
53
|
identifyFormatColumns: options.identifyFormatColumns,
|
|
48
54
|
legend: options.legend,
|
|
49
55
|
legendOverride: !!options.legendOverride,
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
const src = mapLayer.getSource();
|
|
57
57
|
let excludedColumns = store.selectIdentifyColumnsExclude();
|
|
58
58
|
const identifyFields = lyr.identifyFields;
|
|
59
|
-
const identifyRenameColumns = lyr.identifyRenameColumns
|
|
59
|
+
const identifyRenameColumns = lyr.identifyRenameColumns;
|
|
60
60
|
const identifyFormatColumns = lyr.identifyFormatColumns;
|
|
61
61
|
src.forEachFeatureIntersectingExtent(identifyExtent, (f) => {
|
|
62
62
|
const geoJsonFeature = geoJSON.writeFeatureObject(f, {
|
|
@@ -118,11 +118,11 @@ export default {
|
|
|
118
118
|
})
|
|
119
119
|
}
|
|
120
120
|
// Column Renaming
|
|
121
|
-
if (visibleLayer.
|
|
121
|
+
if (visibleLayer.identifyRenameColumns) {
|
|
122
122
|
data.results.forEach((result) => {
|
|
123
123
|
if(result.attributes){
|
|
124
124
|
for (const [featureKey, featureValue] of Object.entries(result.attributes)) {
|
|
125
|
-
for (const [key, value] of Object.entries(visibleLayer.
|
|
125
|
+
for (const [key, value] of Object.entries(visibleLayer.identifyRenameColumns)){
|
|
126
126
|
if (featureKey === key) {
|
|
127
127
|
result.attributes[value] = result.attributes[featureKey];
|
|
128
128
|
delete result.attributes[featureKey];
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
const identifyRenameColumns =
|
|
108
|
-
lyr.identifyRenameColumns
|
|
108
|
+
lyr.identifyRenameColumns;
|
|
109
109
|
if (identifyRenameColumns) {
|
|
110
110
|
outFeatures = identifyRenameColumnsArcgisvector(
|
|
111
111
|
outFeatures,
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
const identifyRenameColumns =
|
|
161
|
-
lyr.identifyRenameColumns
|
|
161
|
+
lyr.identifyRenameColumns;
|
|
162
162
|
if (identifyRenameColumns) {
|
|
163
163
|
outFeatures = identifyRenameColumnsArcgisvector(
|
|
164
164
|
outFeatures,
|
|
@@ -98,11 +98,11 @@ export default {
|
|
|
98
98
|
})
|
|
99
99
|
}
|
|
100
100
|
//Column Renaming
|
|
101
|
-
if (layers[0].
|
|
101
|
+
if (layers[0].identifyRenameColumns) {
|
|
102
102
|
outFeatures.forEach((feature) => {
|
|
103
103
|
if(feature.properties){
|
|
104
104
|
for (const [featureKey, featureValue] of Object.entries(feature.properties)) {
|
|
105
|
-
for (const [key, value] of Object.entries(layers[0].
|
|
105
|
+
for (const [key, value] of Object.entries(layers[0].identifyRenameColumns)){
|
|
106
106
|
if (featureKey === key) {
|
|
107
107
|
feature.properties[value] = feature.properties[featureKey];
|
|
108
108
|
delete feature.properties[featureKey];
|