@corpsmap/corpsmap 3.1.3 → 3.1.4
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 +10 -13
- package/lib/prod.js +10 -13
- package/package.json +1 -1
- package/src/core-plugins/identify/listeners/arcgis.js +2 -2
- package/src/core-plugins/identify/listeners/vector.js +2 -1
- package/src/core-plugins/identify-arcgis-rest/bundle.js +1 -1
- package/src/core-plugins/identify-vector/bundle.js +3 -2
- package/src/core-plugins/print-map/bundle.js +5 -2
- package/src/openlayers-utils/format-utilities.js +1 -2
package/lib/dev.js
CHANGED
|
@@ -106507,7 +106507,7 @@ var config = {
|
|
|
106507
106507
|
};
|
|
106508
106508
|
|
|
106509
106509
|
var name = "@corpsmap/corpsmap";
|
|
106510
|
-
var version$1 = "3.1.
|
|
106510
|
+
var version$1 = "3.1.4";
|
|
106511
106511
|
var description = "CorpsMap as React Components";
|
|
106512
106512
|
var main = "index.js";
|
|
106513
106513
|
var scripts = {
|
|
@@ -132799,17 +132799,11 @@ var formatArcgisVector = function formatArcgisVector(results) {
|
|
|
132799
132799
|
if (result) {
|
|
132800
132800
|
feat.properties[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
|
|
132801
132801
|
}
|
|
132802
|
-
}
|
|
132803
|
-
|
|
132802
|
+
}
|
|
132804
132803
|
});
|
|
132805
132804
|
return results;
|
|
132806
132805
|
};
|
|
132807
132806
|
|
|
132808
|
-
var formatUtilities = {
|
|
132809
|
-
formatArcgisVector: formatArcgisVector,
|
|
132810
|
-
formatArcgisrest: formatArcgisrest
|
|
132811
|
-
};
|
|
132812
|
-
|
|
132813
132807
|
function formatUrl(options) {
|
|
132814
132808
|
var url = "".concat(options.root, "/identify?");
|
|
132815
132809
|
var params = [];
|
|
@@ -132922,7 +132916,7 @@ var bundle$1 = {
|
|
|
132922
132916
|
type: featureType,
|
|
132923
132917
|
coordinates: coords
|
|
132924
132918
|
},
|
|
132925
|
-
properties:
|
|
132919
|
+
properties: formatArcgisrest(feat.attributes)
|
|
132926
132920
|
};
|
|
132927
132921
|
})
|
|
132928
132922
|
})
|
|
@@ -142812,7 +142806,7 @@ var ArcGisListener = {
|
|
|
142812
142806
|
type: featGeometry.getType(),
|
|
142813
142807
|
coordinates: featGeometry.getCoordinates()
|
|
142814
142808
|
},
|
|
142815
|
-
properties: feat.attributes
|
|
142809
|
+
properties: formatArcgisrest(feat.attributes)
|
|
142816
142810
|
};
|
|
142817
142811
|
})
|
|
142818
142812
|
})
|
|
@@ -142915,7 +142909,7 @@ var VectorListener = {
|
|
|
142915
142909
|
err: null,
|
|
142916
142910
|
result: _defineProperty({}, lyr.uid, {
|
|
142917
142911
|
type: "FeatureCollection",
|
|
142918
|
-
features: outFeatures
|
|
142912
|
+
features: formatArcgisVector(outFeatures)
|
|
142919
142913
|
})
|
|
142920
142914
|
});
|
|
142921
142915
|
}
|
|
@@ -160619,7 +160613,10 @@ var bundle$a = {
|
|
|
160619
160613
|
ctx.fillStyle = "white";
|
|
160620
160614
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
160621
160615
|
ctx.drawImage(mapCanvas, 0, 0);
|
|
160622
|
-
|
|
160616
|
+
|
|
160617
|
+
if (legendCanvas.height !== 0 && legendCanvas.width !== 0) {
|
|
160618
|
+
ctx.drawImage(legendCanvas, mapCanvas.width, 0); //draw legend to the right of mapCanvas
|
|
160619
|
+
}
|
|
160623
160620
|
|
|
160624
160621
|
print.download = "map.png";
|
|
160625
160622
|
print.href = canvas.toDataURL();
|
|
@@ -162069,7 +162066,7 @@ var bundle$d = {
|
|
|
162069
162066
|
err: null,
|
|
162070
162067
|
result: _defineProperty({}, lyr.uid, {
|
|
162071
162068
|
type: "FeatureCollection",
|
|
162072
|
-
features:
|
|
162069
|
+
features: formatArcgisVector(outFeatures)
|
|
162073
162070
|
})
|
|
162074
162071
|
});
|
|
162075
162072
|
}
|
package/lib/prod.js
CHANGED
|
@@ -106421,7 +106421,7 @@ var config = {
|
|
|
106421
106421
|
};
|
|
106422
106422
|
|
|
106423
106423
|
var name = "@corpsmap/corpsmap";
|
|
106424
|
-
var version$1 = "3.1.
|
|
106424
|
+
var version$1 = "3.1.4";
|
|
106425
106425
|
var description = "CorpsMap as React Components";
|
|
106426
106426
|
var main = "index.js";
|
|
106427
106427
|
var scripts = {
|
|
@@ -132713,17 +132713,11 @@ var formatArcgisVector = function formatArcgisVector(results) {
|
|
|
132713
132713
|
if (result) {
|
|
132714
132714
|
feat.properties[key] = "<a href=\"".concat(value, "\" target=\"_new\" > ").concat(value, " </a>");
|
|
132715
132715
|
}
|
|
132716
|
-
}
|
|
132717
|
-
|
|
132716
|
+
}
|
|
132718
132717
|
});
|
|
132719
132718
|
return results;
|
|
132720
132719
|
};
|
|
132721
132720
|
|
|
132722
|
-
var formatUtilities = {
|
|
132723
|
-
formatArcgisVector: formatArcgisVector,
|
|
132724
|
-
formatArcgisrest: formatArcgisrest
|
|
132725
|
-
};
|
|
132726
|
-
|
|
132727
132721
|
function formatUrl(options) {
|
|
132728
132722
|
var url = "".concat(options.root, "/identify?");
|
|
132729
132723
|
var params = [];
|
|
@@ -132836,7 +132830,7 @@ var bundle$1 = {
|
|
|
132836
132830
|
type: featureType,
|
|
132837
132831
|
coordinates: coords
|
|
132838
132832
|
},
|
|
132839
|
-
properties:
|
|
132833
|
+
properties: formatArcgisrest(feat.attributes)
|
|
132840
132834
|
};
|
|
132841
132835
|
})
|
|
132842
132836
|
})
|
|
@@ -142726,7 +142720,7 @@ var ArcGisListener = {
|
|
|
142726
142720
|
type: featGeometry.getType(),
|
|
142727
142721
|
coordinates: featGeometry.getCoordinates()
|
|
142728
142722
|
},
|
|
142729
|
-
properties: feat.attributes
|
|
142723
|
+
properties: formatArcgisrest(feat.attributes)
|
|
142730
142724
|
};
|
|
142731
142725
|
})
|
|
142732
142726
|
})
|
|
@@ -142829,7 +142823,7 @@ var VectorListener = {
|
|
|
142829
142823
|
err: null,
|
|
142830
142824
|
result: _defineProperty({}, lyr.uid, {
|
|
142831
142825
|
type: "FeatureCollection",
|
|
142832
|
-
features: outFeatures
|
|
142826
|
+
features: formatArcgisVector(outFeatures)
|
|
142833
142827
|
})
|
|
142834
142828
|
});
|
|
142835
142829
|
}
|
|
@@ -160533,7 +160527,10 @@ var bundle$a = {
|
|
|
160533
160527
|
ctx.fillStyle = "white";
|
|
160534
160528
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
160535
160529
|
ctx.drawImage(mapCanvas, 0, 0);
|
|
160536
|
-
|
|
160530
|
+
|
|
160531
|
+
if (legendCanvas.height !== 0 && legendCanvas.width !== 0) {
|
|
160532
|
+
ctx.drawImage(legendCanvas, mapCanvas.width, 0); //draw legend to the right of mapCanvas
|
|
160533
|
+
}
|
|
160537
160534
|
|
|
160538
160535
|
print.download = "map.png";
|
|
160539
160536
|
print.href = canvas.toDataURL();
|
|
@@ -161983,7 +161980,7 @@ var bundle$d = {
|
|
|
161983
161980
|
err: null,
|
|
161984
161981
|
result: _defineProperty({}, lyr.uid, {
|
|
161985
161982
|
type: "FeatureCollection",
|
|
161986
|
-
features:
|
|
161983
|
+
features: formatArcgisVector(outFeatures)
|
|
161987
161984
|
})
|
|
161988
161985
|
});
|
|
161989
161986
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import async from "async";
|
|
2
2
|
import EsriJSON from "ol/format/EsriJSON";
|
|
3
|
+
import { formatArcgisrest } from "../../../openlayers-utils/format-utilities";
|
|
3
4
|
const esrijsonFormat = new EsriJSON();
|
|
4
5
|
|
|
5
6
|
function formatUrl(options) {
|
|
@@ -74,7 +75,6 @@ export default {
|
|
|
74
75
|
visibleLayer.identifyType &&
|
|
75
76
|
visibleLayer.identifyType === "arcgisrest"
|
|
76
77
|
) {
|
|
77
|
-
|
|
78
78
|
const layerList = visibleLayer.layerList;
|
|
79
79
|
params["layers"] = `all:${layerList}`;
|
|
80
80
|
const p = Object.assign({}, params, { root: visibleLayer.url });
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
type: featGeometry.getType(),
|
|
114
114
|
coordinates: featGeometry.getCoordinates(),
|
|
115
115
|
},
|
|
116
|
-
properties: feat.attributes,
|
|
116
|
+
properties: formatArcgisrest(feat.attributes),
|
|
117
117
|
};
|
|
118
118
|
}),
|
|
119
119
|
},
|
|
@@ -5,6 +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
9
|
|
|
9
10
|
const geoJSON = new GeoJSON();
|
|
10
11
|
|
|
@@ -71,7 +72,7 @@ export default {
|
|
|
71
72
|
result: {
|
|
72
73
|
[lyr.uid]: {
|
|
73
74
|
type: "FeatureCollection",
|
|
74
|
-
features: outFeatures,
|
|
75
|
+
features: formatArcgisVector(outFeatures),
|
|
75
76
|
},
|
|
76
77
|
},
|
|
77
78
|
});
|
|
@@ -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
|
|
8
|
+
import { formatArcgisVector } from "../../openlayers-utils/format-utilities";
|
|
9
9
|
|
|
10
10
|
const geoJSON = new GeoJSON();
|
|
11
11
|
|
|
@@ -77,6 +77,7 @@ export default {
|
|
|
77
77
|
if (!disjoint(identifyFeature, geoJsonFeature))
|
|
78
78
|
outFeatures.push(geoJsonFeature);
|
|
79
79
|
});
|
|
80
|
+
|
|
80
81
|
out.push({
|
|
81
82
|
dataset: lyr.uid,
|
|
82
83
|
layerName: lyr.displayName,
|
|
@@ -84,7 +85,7 @@ export default {
|
|
|
84
85
|
result: {
|
|
85
86
|
[lyr.uid]: {
|
|
86
87
|
type: "FeatureCollection",
|
|
87
|
-
features:
|
|
88
|
+
features: formatArcgisVector(outFeatures),
|
|
88
89
|
},
|
|
89
90
|
},
|
|
90
91
|
});
|
|
@@ -291,8 +291,11 @@ export default {
|
|
|
291
291
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
292
292
|
|
|
293
293
|
ctx.drawImage(mapCanvas, 0, 0);
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
|
|
295
|
+
if(legendCanvas.height !== 0 && legendCanvas.width !== 0) {
|
|
296
|
+
ctx.drawImage(legendCanvas, mapCanvas.width, 0); //draw legend to the right of mapCanvas
|
|
297
|
+
}
|
|
298
|
+
|
|
296
299
|
print.download = "map.png";
|
|
297
300
|
print.href = canvas.toDataURL();
|
|
298
301
|
document.body.appendChild(print);
|
|
@@ -26,9 +26,8 @@ const formatArcgisVector = function (results) {
|
|
|
26
26
|
] = `<a href="${value}" target="_new" > ${value} </a>`;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
// results.properties = feat.properties;
|
|
30
29
|
});
|
|
31
30
|
return results;
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
export
|
|
33
|
+
export { formatArcgisVector, formatArcgisrest };
|