@corpsmap/corpsmap 3.1.3 → 3.1.5
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 +14 -17
- package/lib/prod.js +14 -17
- package/package.json +1 -1
- package/src/config/default-config.js +3 -3
- package/src/core-plugins/geocoder/bundle.js +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
|
@@ -106159,7 +106159,7 @@ var config = {
|
|
|
106159
106159
|
id: "MapBoxStreets",
|
|
106160
106160
|
name: "MapBox Streets",
|
|
106161
106161
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106162
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106162
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106163
106163
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106164
106164
|
subdomains: "abcd",
|
|
106165
106165
|
accessToken: "<your accessToken>",
|
|
@@ -106168,7 +106168,7 @@ var config = {
|
|
|
106168
106168
|
id: "MapBoxAerial",
|
|
106169
106169
|
name: "MapBox Aerial",
|
|
106170
106170
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106171
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106171
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106172
106172
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106173
106173
|
subdomains: "abcd",
|
|
106174
106174
|
accessToken: "<your accessToken>",
|
|
@@ -106177,7 +106177,7 @@ var config = {
|
|
|
106177
106177
|
id: "MapBoxOutdoor",
|
|
106178
106178
|
name: "MapBox Outdoor",
|
|
106179
106179
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106180
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106180
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106181
106181
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106182
106182
|
subdomains: "abcd",
|
|
106183
106183
|
accessToken: "<your accessToken>",
|
|
@@ -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.5";
|
|
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
|
})
|
|
@@ -135704,7 +135698,7 @@ var bundle$4 = {
|
|
|
135704
135698
|
var c = transform(store.selectViewCenter(), mapProjection, geoProjection);
|
|
135705
135699
|
if (q.length < 2) return;
|
|
135706
135700
|
q = encodeURIComponent(q);
|
|
135707
|
-
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=pk.
|
|
135701
|
+
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA"), function (err, response, body) {
|
|
135708
135702
|
if (err) return callback(err);
|
|
135709
135703
|
var results = JSON.parse(body);
|
|
135710
135704
|
return callback(null, results.features.map(function (r) {
|
|
@@ -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
|
@@ -106073,7 +106073,7 @@ var config = {
|
|
|
106073
106073
|
id: "MapBoxStreets",
|
|
106074
106074
|
name: "MapBox Streets",
|
|
106075
106075
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106076
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106076
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106077
106077
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106078
106078
|
subdomains: "abcd",
|
|
106079
106079
|
accessToken: "<your accessToken>",
|
|
@@ -106082,7 +106082,7 @@ var config = {
|
|
|
106082
106082
|
id: "MapBoxAerial",
|
|
106083
106083
|
name: "MapBox Aerial",
|
|
106084
106084
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106085
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106085
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106086
106086
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106087
106087
|
subdomains: "abcd",
|
|
106088
106088
|
accessToken: "<your accessToken>",
|
|
@@ -106091,7 +106091,7 @@ var config = {
|
|
|
106091
106091
|
id: "MapBoxOutdoor",
|
|
106092
106092
|
name: "MapBox Outdoor",
|
|
106093
106093
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106094
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106094
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106095
106095
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106096
106096
|
subdomains: "abcd",
|
|
106097
106097
|
accessToken: "<your accessToken>",
|
|
@@ -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.5";
|
|
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
|
})
|
|
@@ -135618,7 +135612,7 @@ var bundle$4 = {
|
|
|
135618
135612
|
var c = transform(store.selectViewCenter(), mapProjection, geoProjection);
|
|
135619
135613
|
if (q.length < 2) return;
|
|
135620
135614
|
q = encodeURIComponent(q);
|
|
135621
|
-
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=pk.
|
|
135615
|
+
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA"), function (err, response, body) {
|
|
135622
135616
|
if (err) return callback(err);
|
|
135623
135617
|
var results = JSON.parse(body);
|
|
135624
135618
|
return callback(null, results.features.map(function (r) {
|
|
@@ -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
|
@@ -30,7 +30,7 @@ const config = {
|
|
|
30
30
|
oldUrl:
|
|
31
31
|
"https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
32
32
|
url:
|
|
33
|
-
"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
33
|
+
"https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
34
34
|
attributions:
|
|
35
35
|
'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
36
36
|
subdomains: "abcd",
|
|
@@ -43,7 +43,7 @@ const config = {
|
|
|
43
43
|
oldUrl:
|
|
44
44
|
"https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
45
45
|
url:
|
|
46
|
-
"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
46
|
+
"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
47
47
|
attributions:
|
|
48
48
|
'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
49
49
|
subdomains: "abcd",
|
|
@@ -56,7 +56,7 @@ const config = {
|
|
|
56
56
|
oldUrl:
|
|
57
57
|
"https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
58
58
|
url:
|
|
59
|
-
"https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
59
|
+
"https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
60
60
|
attributions:
|
|
61
61
|
'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
62
62
|
subdomains: "abcd",
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
138
138
|
apiGet(
|
|
139
139
|
`https://api.mapbox.com/geocoding/v5/mapbox.places/${q}.json?proximity=${c.toString()}${
|
|
140
140
|
countries && countries.length ? `&country=${countries.join(",")}` : ""
|
|
141
|
-
}&access_token=pk.
|
|
141
|
+
}&access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA`,
|
|
142
142
|
(err, response, body) => {
|
|
143
143
|
if (err) return callback(err);
|
|
144
144
|
|
|
@@ -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 };
|