@corpsmap/corpsmap 3.1.1 → 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 +57 -32
- package/lib/prod.js +57 -32
- package/package.json +1 -1
- package/src/application-bundles/config-bundle.js +5 -1
- package/src/application-bundles/create-ol-map-bundle.js +25 -6
- package/src/application-bundles/map-view-bundle.js +312 -308
- package/src/application-containers/map.js +5 -3
- package/src/application-exports/map-provider.js +6 -1
- package/src/config/default-config.js +561 -561
- 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/src/openlayers-utils/layer-utilities.js +7 -4
|
@@ -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 };
|
|
@@ -71,7 +71,8 @@ function getXyzSource(options) {
|
|
|
71
71
|
url: url,
|
|
72
72
|
crossOrigin: isCrossOrigin(options.url),
|
|
73
73
|
// CWBI-13636 Prevent horizontal wrapping.
|
|
74
|
-
|
|
74
|
+
// Line may no longer be needed.
|
|
75
|
+
// wrapX: false,
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -168,8 +169,9 @@ function getEsriVectorSource(options) {
|
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
function getTileLayer(options, source) {
|
|
171
|
-
// CWBI-13636 Prevent horizontal wrapping.
|
|
172
|
-
|
|
172
|
+
// CWBI-13636 Prevent horizontal wrapping.
|
|
173
|
+
// Line may no longer be needed.
|
|
174
|
+
// source.wrapX = false;
|
|
173
175
|
return new Tile({
|
|
174
176
|
source: source,
|
|
175
177
|
visible: options.visible,
|
|
@@ -182,7 +184,8 @@ function getTileLayer(options, source) {
|
|
|
182
184
|
|
|
183
185
|
function getImageLayer(options, source) {
|
|
184
186
|
// CWBI-13636 Prevent horizontal wrapping.
|
|
185
|
-
|
|
187
|
+
// Line may no longer be needed.
|
|
188
|
+
// source.wrapX = false;
|
|
186
189
|
return new Image({
|
|
187
190
|
source: source,
|
|
188
191
|
visible: options.visible,
|