@opengeoweb/webmap-react 20.0.1-nightly-20261015 → 20.1.0
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/index.esm.js +370 -58
- package/dist/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +6 -1
- package/dist/src/lib/edr-layer-api/api.d.ts +2 -0
- package/dist/src/lib/edr-layer-api/hooks.d.ts +1 -1
- package/dist/src/lib/edr-layer-api/index.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -863,6 +863,50 @@ var openLayersGetMapImageStore = new WMImageStore(NUM_IMAGES_TO_CACHE, {
|
|
|
863
863
|
var clearImageCacheForAllMaps = function clearImageCacheForAllMaps() {
|
|
864
864
|
openLayersGetMapImageStore.clear();
|
|
865
865
|
};
|
|
866
|
+
var splitExtentAtWorldSeams = function splitExtentAtWorldSeams(extent, worldExtent) {
|
|
867
|
+
var worldWidth = worldExtent[2] - worldExtent[0];
|
|
868
|
+
if (worldWidth <= 0 || extent[2] <= extent[0]) {
|
|
869
|
+
return [{
|
|
870
|
+
requestExtent: extent,
|
|
871
|
+
displayExtent: extent
|
|
872
|
+
}];
|
|
873
|
+
}
|
|
874
|
+
var segments = [];
|
|
875
|
+
var segmentStart = extent[0];
|
|
876
|
+
var worldIndex = Math.floor((segmentStart - worldExtent[0]) / worldWidth);
|
|
877
|
+
while (segmentStart < extent[2]) {
|
|
878
|
+
var worldEnd = worldExtent[0] + (worldIndex + 1) * worldWidth;
|
|
879
|
+
while (worldEnd <= segmentStart) {
|
|
880
|
+
worldIndex += 1;
|
|
881
|
+
worldEnd = worldExtent[0] + (worldIndex + 1) * worldWidth;
|
|
882
|
+
}
|
|
883
|
+
var segmentEnd = Math.min(extent[2], worldEnd);
|
|
884
|
+
var worldOffset = worldIndex * worldWidth;
|
|
885
|
+
segments.push({
|
|
886
|
+
requestExtent: [segmentStart - worldOffset, extent[1], segmentEnd - worldOffset, extent[3]],
|
|
887
|
+
displayExtent: [segmentStart, extent[1], segmentEnd, extent[3]]
|
|
888
|
+
});
|
|
889
|
+
segmentStart = segmentEnd;
|
|
890
|
+
worldIndex += 1;
|
|
891
|
+
}
|
|
892
|
+
return segments;
|
|
893
|
+
};
|
|
894
|
+
var combineExtents = function combineExtents(extents) {
|
|
895
|
+
return [Math.min.apply(Math, _toConsumableArray(extents.map(function (extent) {
|
|
896
|
+
return extent[0];
|
|
897
|
+
}))), Math.min.apply(Math, _toConsumableArray(extents.map(function (extent) {
|
|
898
|
+
return extent[1];
|
|
899
|
+
}))), Math.max.apply(Math, _toConsumableArray(extents.map(function (extent) {
|
|
900
|
+
return extent[2];
|
|
901
|
+
}))), Math.max.apply(Math, _toConsumableArray(extents.map(function (extent) {
|
|
902
|
+
return extent[3];
|
|
903
|
+
})))];
|
|
904
|
+
};
|
|
905
|
+
var getExtentOverlapArea = function getExtentOverlapArea(extentA, extentB) {
|
|
906
|
+
var width = Math.max(0, Math.min(extentA[2], extentB[2]) - Math.max(extentA[0], extentB[0]));
|
|
907
|
+
var height = Math.max(0, Math.min(extentA[3], extentB[3]) - Math.max(extentA[1], extentB[1]));
|
|
908
|
+
return width * height;
|
|
909
|
+
};
|
|
866
910
|
var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
867
911
|
function TimeAwareImageWrapper(extent, resolution, pixelRatio) {
|
|
868
912
|
var _this;
|
|
@@ -875,6 +919,8 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
875
919
|
_this._resolvers = [];
|
|
876
920
|
_this._styleName = 'default';
|
|
877
921
|
_this._layerName = null;
|
|
922
|
+
_this._compositeImageKey = '';
|
|
923
|
+
_this._compositeImage = null;
|
|
878
924
|
_this.extent = extent;
|
|
879
925
|
_this.resolution = resolution;
|
|
880
926
|
_this.state = ImageState.IDLE;
|
|
@@ -927,44 +973,184 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
927
973
|
}, {
|
|
928
974
|
key: "getAlternativeImage",
|
|
929
975
|
value: function getAlternativeImage(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps) {
|
|
930
|
-
var
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
976
|
+
var requests = this.getWMSGetMapRequestURLs(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps);
|
|
977
|
+
var images = requests.map(function (request) {
|
|
978
|
+
var _candidates$filter$ma;
|
|
979
|
+
var candidates = openLayersGetMapImageStore.getAltGeoReferencedImages(request.src, request.extent, request.resolution);
|
|
980
|
+
return (_candidates$filter$ma = candidates.filter(function (image) {
|
|
981
|
+
return image.isLoadedWithoutErrors() && image.geoReference;
|
|
982
|
+
}).map(function (image) {
|
|
983
|
+
return {
|
|
984
|
+
image: image,
|
|
985
|
+
overlapArea: getExtentOverlapArea(image.geoReference.extent, request.extent)
|
|
986
|
+
};
|
|
987
|
+
}).filter(function (_ref) {
|
|
988
|
+
var overlapArea = _ref.overlapArea;
|
|
989
|
+
return overlapArea > 0;
|
|
990
|
+
}).sort(function (imageA, imageB) {
|
|
991
|
+
return imageB.overlapArea - imageA.overlapArea;
|
|
992
|
+
})[0]) === null || _candidates$filter$ma === void 0 ? void 0 : _candidates$filter$ma.image;
|
|
993
|
+
});
|
|
994
|
+
if (images.some(function (image) {
|
|
995
|
+
return !image;
|
|
996
|
+
})) {
|
|
997
|
+
return false;
|
|
998
|
+
}
|
|
999
|
+
var completeImages = images;
|
|
1000
|
+
if (completeImages.length > 1) {
|
|
1001
|
+
var uniqueImages = _toConsumableArray(new Set(completeImages));
|
|
1002
|
+
if (uniqueImages.length !== completeImages.length) {
|
|
1003
|
+
if (uniqueImages.length !== 1) {
|
|
1004
|
+
return false;
|
|
1005
|
+
}
|
|
1006
|
+
var _uniqueImages = _slicedToArray(uniqueImages, 1),
|
|
1007
|
+
_image = _uniqueImages[0];
|
|
1008
|
+
var imageExtent = _image.geoReference.extent;
|
|
1009
|
+
var requestedExtent = combineExtents(requests.map(function (request) {
|
|
1010
|
+
return request.extent;
|
|
1011
|
+
}));
|
|
1012
|
+
if (imageExtent[0] > requestedExtent[0] || imageExtent[1] > requestedExtent[1] || imageExtent[2] < requestedExtent[2] || imageExtent[3] < requestedExtent[3]) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
return {
|
|
1016
|
+
el: _image.getElement(),
|
|
1017
|
+
extent: imageExtent,
|
|
1018
|
+
resolution: _image.geoReference.resolution,
|
|
1019
|
+
isLoaded: _image.isLoaded(),
|
|
1020
|
+
isLoadedWithoutErrors: _image.isLoadedWithoutErrors(),
|
|
1021
|
+
hasError: _image.hasError(),
|
|
1022
|
+
isLoading: _image.isLoading()
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
var imageRequests = completeImages.map(function (image, index) {
|
|
1026
|
+
return _objectSpread2(_objectSpread2({}, requests[index]), {}, {
|
|
1027
|
+
extent: image.geoReference.extent,
|
|
1028
|
+
resolution: image.geoReference.resolution
|
|
1029
|
+
});
|
|
1030
|
+
});
|
|
1031
|
+
var image = this.createCompositeImage(completeImages, imageRequests);
|
|
1032
|
+
if (!image) {
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
936
1035
|
return {
|
|
937
|
-
el:
|
|
938
|
-
extent:
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1036
|
+
el: image,
|
|
1037
|
+
extent: combineExtents(imageRequests.map(function (request) {
|
|
1038
|
+
return request.extent;
|
|
1039
|
+
})),
|
|
1040
|
+
resolution: imageRequests[0].resolution,
|
|
1041
|
+
isLoaded: completeImages.every(function (loadedImage) {
|
|
1042
|
+
return loadedImage.isLoaded();
|
|
1043
|
+
}),
|
|
1044
|
+
isLoadedWithoutErrors: completeImages.every(function (loadedImage) {
|
|
1045
|
+
return loadedImage.isLoadedWithoutErrors();
|
|
1046
|
+
}),
|
|
1047
|
+
hasError: completeImages.some(function (loadedImage) {
|
|
1048
|
+
return loadedImage.hasError();
|
|
1049
|
+
}),
|
|
1050
|
+
isLoading: completeImages.some(function (loadedImage) {
|
|
1051
|
+
return loadedImage.isLoading();
|
|
1052
|
+
})
|
|
944
1053
|
};
|
|
945
1054
|
}
|
|
946
|
-
|
|
1055
|
+
var _completeImages = _slicedToArray(completeImages, 1),
|
|
1056
|
+
geoRef = _completeImages[0];
|
|
1057
|
+
return {
|
|
1058
|
+
el: geoRef.getElement(),
|
|
1059
|
+
extent: geoRef.geoReference.extent,
|
|
1060
|
+
resolution: geoRef.geoReference.resolution,
|
|
1061
|
+
isLoaded: geoRef.isLoaded(),
|
|
1062
|
+
isLoadedWithoutErrors: geoRef.isLoadedWithoutErrors(),
|
|
1063
|
+
hasError: geoRef.hasError(),
|
|
1064
|
+
isLoading: geoRef.isLoading()
|
|
1065
|
+
};
|
|
947
1066
|
}
|
|
948
1067
|
}, {
|
|
949
1068
|
key: "hasImage",
|
|
950
1069
|
value: function hasImage(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps) {
|
|
951
|
-
var
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1070
|
+
var requests = this.getWMSGetMapRequestURLs(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps);
|
|
1071
|
+
var images = requests.map(function (request) {
|
|
1072
|
+
return openLayersGetMapImageStore.getImage(request.src);
|
|
1073
|
+
});
|
|
1074
|
+
if (images.some(function (image) {
|
|
1075
|
+
return !image;
|
|
1076
|
+
})) {
|
|
1077
|
+
return false;
|
|
1078
|
+
}
|
|
1079
|
+
if (images.length === 1) {
|
|
1080
|
+
var _images = _slicedToArray(images, 1),
|
|
1081
|
+
imageEl = _images[0];
|
|
957
1082
|
return {
|
|
958
1083
|
el: imageEl.getElement(),
|
|
959
|
-
extent:
|
|
960
|
-
resolution:
|
|
1084
|
+
extent: requests[0].extent,
|
|
1085
|
+
resolution: requests[0].resolution,
|
|
961
1086
|
isLoaded: imageEl.isLoaded(),
|
|
962
1087
|
isLoadedWithoutErrors: imageEl.isLoadedWithoutErrors(),
|
|
963
1088
|
hasError: imageEl.hasError(),
|
|
964
1089
|
isLoading: imageEl.isLoading()
|
|
965
1090
|
};
|
|
966
1091
|
}
|
|
967
|
-
|
|
1092
|
+
var completeImages = images;
|
|
1093
|
+
if (!completeImages.every(function (image) {
|
|
1094
|
+
return image.isLoaded();
|
|
1095
|
+
})) {
|
|
1096
|
+
return false;
|
|
1097
|
+
}
|
|
1098
|
+
var image = this.createCompositeImage(completeImages, requests);
|
|
1099
|
+
if (!image) {
|
|
1100
|
+
return false;
|
|
1101
|
+
}
|
|
1102
|
+
return {
|
|
1103
|
+
el: image,
|
|
1104
|
+
extent: combineExtents(requests.map(function (request) {
|
|
1105
|
+
return request.extent;
|
|
1106
|
+
})),
|
|
1107
|
+
resolution: requests[0].resolution,
|
|
1108
|
+
isLoaded: true,
|
|
1109
|
+
isLoadedWithoutErrors: completeImages.every(function (loadedImage) {
|
|
1110
|
+
return loadedImage.isLoadedWithoutErrors();
|
|
1111
|
+
}),
|
|
1112
|
+
hasError: completeImages.some(function (loadedImage) {
|
|
1113
|
+
return loadedImage.hasError();
|
|
1114
|
+
}),
|
|
1115
|
+
isLoading: completeImages.some(function (loadedImage) {
|
|
1116
|
+
return loadedImage.isLoading();
|
|
1117
|
+
})
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
}, {
|
|
1121
|
+
key: "createCompositeImage",
|
|
1122
|
+
value: function createCompositeImage(images, requests) {
|
|
1123
|
+
var extent = combineExtents(requests.map(function (request) {
|
|
1124
|
+
return request.extent;
|
|
1125
|
+
}));
|
|
1126
|
+
var resolution = requests[0].resolution;
|
|
1127
|
+
var imageKey = JSON.stringify([images.map(function (image) {
|
|
1128
|
+
return image.getElement().src;
|
|
1129
|
+
}), requests.map(function (request) {
|
|
1130
|
+
return request.extent;
|
|
1131
|
+
}), resolution]);
|
|
1132
|
+
if (this._compositeImage && this._compositeImageKey === imageKey) {
|
|
1133
|
+
return this._compositeImage;
|
|
1134
|
+
}
|
|
1135
|
+
var canvas = document.createElement('canvas');
|
|
1136
|
+
canvas.width = Math.ceil((extent[2] - extent[0]) / resolution);
|
|
1137
|
+
canvas.height = Math.ceil((extent[3] - extent[1]) / resolution);
|
|
1138
|
+
var context = canvas.getContext('2d');
|
|
1139
|
+
if (!context) {
|
|
1140
|
+
return false;
|
|
1141
|
+
}
|
|
1142
|
+
images.forEach(function (image, index) {
|
|
1143
|
+
if (image.hasError()) {
|
|
1144
|
+
return;
|
|
1145
|
+
}
|
|
1146
|
+
var imageExtent = requests[index].extent;
|
|
1147
|
+
var overlapsNextSegment = index < images.length - 1;
|
|
1148
|
+
var destinationWidth = (imageExtent[2] - imageExtent[0]) / resolution + (overlapsNextSegment ? 1 : 0);
|
|
1149
|
+
context.drawImage(image.getElement(), (imageExtent[0] - extent[0]) / resolution, (extent[3] - imageExtent[3]) / resolution, destinationWidth, (imageExtent[3] - imageExtent[1]) / resolution);
|
|
1150
|
+
});
|
|
1151
|
+
this._compositeImageKey = imageKey;
|
|
1152
|
+
this._compositeImage = canvas;
|
|
1153
|
+
return canvas;
|
|
968
1154
|
}
|
|
969
1155
|
}, {
|
|
970
1156
|
key: "setGeoReferencedImage",
|
|
@@ -980,22 +1166,33 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
980
1166
|
key: "load",
|
|
981
1167
|
value: function load() {
|
|
982
1168
|
var _this2 = this;
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
resolution: newResolution
|
|
1169
|
+
var requests = this.getWMSGetMapRequestURLs(this._extentToLoad, this._resolutionToLoad, this._pixelRatioToLoad, this.projection, this._getMapUrl, this._paramsToLoad, this._layerName, this._styleName, this._dimPropsToLoad);
|
|
1170
|
+
var images = requests.map(function (request) {
|
|
1171
|
+
return openLayersGetMapImageStore.getImageAndSetGeoReference(request.src, {
|
|
1172
|
+
extent: request.extent,
|
|
1173
|
+
resolution: request.resolution
|
|
1174
|
+
});
|
|
990
1175
|
});
|
|
991
|
-
if (
|
|
1176
|
+
if (images.some(function (image) {
|
|
1177
|
+
return !image;
|
|
1178
|
+
})) {
|
|
992
1179
|
return;
|
|
993
1180
|
}
|
|
994
|
-
if (
|
|
1181
|
+
if (images.length === 1) {
|
|
1182
|
+
var _images2 = _slicedToArray(images, 1),
|
|
1183
|
+
imageEl = _images2[0];
|
|
1184
|
+
if (!imageEl.isLoaded()) {
|
|
1185
|
+
this.state = ImageState.LOADING;
|
|
1186
|
+
this.changed();
|
|
1187
|
+
void imageEl.loadAwait()["finally"](function () {
|
|
1188
|
+
return _this2.load();
|
|
1189
|
+
});
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
995
1192
|
this.state = ImageState.LOADED;
|
|
996
1193
|
this.setImage(imageEl.getElement());
|
|
997
|
-
this.extent =
|
|
998
|
-
this.resolution =
|
|
1194
|
+
this.extent = requests[0].extent;
|
|
1195
|
+
this.resolution = requests[0].resolution;
|
|
999
1196
|
this.changed();
|
|
1000
1197
|
if (imageEl.hasError()) {
|
|
1001
1198
|
this._rejectAll(imageEl.getSrc());
|
|
@@ -1004,10 +1201,50 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1004
1201
|
}
|
|
1005
1202
|
return;
|
|
1006
1203
|
}
|
|
1204
|
+
var loadedImages = images;
|
|
1205
|
+
if (loadedImages.every(function (image) {
|
|
1206
|
+
return image.isLoaded();
|
|
1207
|
+
})) {
|
|
1208
|
+
this.state = ImageState.LOADED;
|
|
1209
|
+
var image = this.createCompositeImage(loadedImages, requests);
|
|
1210
|
+
if (!image) {
|
|
1211
|
+
this.state = ImageState.ERROR;
|
|
1212
|
+
this.changed();
|
|
1213
|
+
this._rejectAll(loadedImages[0].getSrc());
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
this.setImage(image);
|
|
1217
|
+
this.extent = combineExtents(requests.map(function (request) {
|
|
1218
|
+
return request.extent;
|
|
1219
|
+
}));
|
|
1220
|
+
this.resolution = requests[0].resolution;
|
|
1221
|
+
this.changed();
|
|
1222
|
+
var failedImage = loadedImages.find(function (loadedImage) {
|
|
1223
|
+
return loadedImage.hasError();
|
|
1224
|
+
});
|
|
1225
|
+
if (failedImage) {
|
|
1226
|
+
this._rejectAll(failedImage.getSrc());
|
|
1227
|
+
} else {
|
|
1228
|
+
this._resolveAll(loadedImages[0]);
|
|
1229
|
+
}
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1007
1232
|
this.state = ImageState.LOADING;
|
|
1008
1233
|
this.changed();
|
|
1009
|
-
void
|
|
1010
|
-
|
|
1234
|
+
void Promise.all(loadedImages.map(/*#__PURE__*/function () {
|
|
1235
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(image) {
|
|
1236
|
+
return _regenerator().w(function (_context) {
|
|
1237
|
+
while (1) switch (_context.n) {
|
|
1238
|
+
case 0:
|
|
1239
|
+
return _context.a(2, image.loadAwait());
|
|
1240
|
+
}
|
|
1241
|
+
}, _callee);
|
|
1242
|
+
}));
|
|
1243
|
+
return function (_x) {
|
|
1244
|
+
return _ref2.apply(this, arguments);
|
|
1245
|
+
};
|
|
1246
|
+
}()))["finally"](function () {
|
|
1247
|
+
return _this2.load();
|
|
1011
1248
|
});
|
|
1012
1249
|
}
|
|
1013
1250
|
}, {
|
|
@@ -1037,10 +1274,10 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1037
1274
|
}, {
|
|
1038
1275
|
key: "loadAndResolve",
|
|
1039
1276
|
value: function () {
|
|
1040
|
-
var _loadAndResolve = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
1277
|
+
var _loadAndResolve = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(extentToLoad, resolutionToLoad, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps) {
|
|
1041
1278
|
var _this3 = this;
|
|
1042
|
-
return _regenerator().w(function (
|
|
1043
|
-
while (1) switch (
|
|
1279
|
+
return _regenerator().w(function (_context2) {
|
|
1280
|
+
while (1) switch (_context2.n) {
|
|
1044
1281
|
case 0:
|
|
1045
1282
|
this._extentToLoad = _toConsumableArray(extentToLoad || []);
|
|
1046
1283
|
this._resolutionToLoad = resolutionToLoad;
|
|
@@ -1051,7 +1288,7 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1051
1288
|
this.projection = projection;
|
|
1052
1289
|
this._styleName = styleName;
|
|
1053
1290
|
this._dimPropsToLoad = _objectSpread2({}, dimProps);
|
|
1054
|
-
return
|
|
1291
|
+
return _context2.a(2, new Promise(function (resolve, reject) {
|
|
1055
1292
|
_this3._resolvers.push({
|
|
1056
1293
|
resolve: resolve,
|
|
1057
1294
|
reject: reject
|
|
@@ -1059,13 +1296,41 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1059
1296
|
_this3.load();
|
|
1060
1297
|
}));
|
|
1061
1298
|
}
|
|
1062
|
-
},
|
|
1299
|
+
}, _callee2, this);
|
|
1063
1300
|
}));
|
|
1064
|
-
function loadAndResolve(
|
|
1301
|
+
function loadAndResolve(_x2, _x3, _x4, _x5, _x6, _x7, _x8, _x9, _x0) {
|
|
1065
1302
|
return _loadAndResolve.apply(this, arguments);
|
|
1066
1303
|
}
|
|
1067
1304
|
return loadAndResolve;
|
|
1068
1305
|
}()
|
|
1306
|
+
}, {
|
|
1307
|
+
key: "getWMSGetMapRequestURLs",
|
|
1308
|
+
value: function getWMSGetMapRequestURLs(extentToLoad, resolutionToLoad, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps) {
|
|
1309
|
+
var request = this.getWMSGetMapRequestURL(extentToLoad, resolutionToLoad, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps);
|
|
1310
|
+
var worldExtent = projection !== null && projection !== void 0 && projection.canWrapX() ? projection.getExtent() : null;
|
|
1311
|
+
if (!request.src || !worldExtent) {
|
|
1312
|
+
return [request];
|
|
1313
|
+
}
|
|
1314
|
+
var segments = splitExtentAtWorldSeams(request.extent, worldExtent);
|
|
1315
|
+
if (segments.length === 1 && segments[0].requestExtent.every(function (value, index) {
|
|
1316
|
+
return value === request.extent[index];
|
|
1317
|
+
})) {
|
|
1318
|
+
return [request];
|
|
1319
|
+
}
|
|
1320
|
+
var paramsToUse = _objectSpread2({}, params);
|
|
1321
|
+
return segments.map(function (_ref3) {
|
|
1322
|
+
var requestExtent = _ref3.requestExtent,
|
|
1323
|
+
displayExtent = _ref3.displayExtent;
|
|
1324
|
+
return {
|
|
1325
|
+
src: getImageSrc(requestExtent, request.resolution, 1, projection, getMapUrl, getRequestParams(_objectSpread2(_objectSpread2(_objectSpread2({}, paramsToUse), dimProps), {}, {
|
|
1326
|
+
LAYERS: layerName,
|
|
1327
|
+
STYLES: styleName
|
|
1328
|
+
}), 'GetMap'), 'mapserver'),
|
|
1329
|
+
extent: displayExtent,
|
|
1330
|
+
resolution: request.resolution
|
|
1331
|
+
};
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1069
1334
|
}]);
|
|
1070
1335
|
}(ImageWrapper);
|
|
1071
1336
|
|
|
@@ -1265,8 +1530,7 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1265
1530
|
cancelled: false,
|
|
1266
1531
|
task: function () {
|
|
1267
1532
|
var _task = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
1268
|
-
var
|
|
1269
|
-
var jobWrapper, dimPropsWithTime, _jobWrapper$getWMSGet, src;
|
|
1533
|
+
var jobWrapper, dimPropsWithTime, requests;
|
|
1270
1534
|
return _regenerator().w(function (_context) {
|
|
1271
1535
|
while (1) switch (_context.n) {
|
|
1272
1536
|
case 0:
|
|
@@ -1274,8 +1538,12 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1274
1538
|
dimPropsWithTime = _objectSpread2(_objectSpread2({}, _this3._dimProperties), {}, {
|
|
1275
1539
|
TIME: dimValue
|
|
1276
1540
|
});
|
|
1277
|
-
|
|
1278
|
-
(
|
|
1541
|
+
requests = jobWrapper.getWMSGetMapRequestURLs(extent, resolution, pixelRatio, projection, _this3._wmsUrl, _this3._extraWMSParams, _this3._layerName, _this3._styleName, dimPropsWithTime);
|
|
1542
|
+
requests.forEach(function (_ref2) {
|
|
1543
|
+
var _openLayersGetMapImag;
|
|
1544
|
+
var src = _ref2.src;
|
|
1545
|
+
(_openLayersGetMapImag = openLayersGetMapImageStore.getImage(src)) === null || _openLayersGetMapImag === void 0 || _openLayersGetMapImag.clearError();
|
|
1546
|
+
});
|
|
1279
1547
|
_context.n = 1;
|
|
1280
1548
|
return jobWrapper.loadAndResolve(extent, resolution, pixelRatio, projection, _this3._wmsUrl, _this3._extraWMSParams, _this3._layerName, _this3._styleName, dimPropsWithTime)["catch"](function (e) {
|
|
1281
1549
|
// Do not log errors, as they are not very useful and can better be inspected via the network console
|
|
@@ -1411,12 +1679,13 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1411
1679
|
}
|
|
1412
1680
|
var dimPropWithRequestedDate = _objectSpread2({}, this._dimProperties);
|
|
1413
1681
|
dimPropWithRequestedDate['TIME'] = isoTime;
|
|
1414
|
-
var
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1682
|
+
var requests = this._imWrapperForOlSource.getWMSGetMapRequestURLs(this._lastRequestedExtent, this._lastRequestedResolution, this._lastRequestedPixelRatio, this._lastRequestedProjection, this._wmsUrl, this._extraWMSParams, this._layerName, this._styleName, dimPropWithRequestedDate);
|
|
1683
|
+
return requests.flatMap(function (_ref3) {
|
|
1684
|
+
var src = _ref3.src,
|
|
1685
|
+
extent = _ref3.extent,
|
|
1686
|
+
resolution = _ref3.resolution;
|
|
1687
|
+
return openLayersGetMapImageStore.getAltGeoReferencedImages(src, extent, resolution);
|
|
1688
|
+
});
|
|
1420
1689
|
}
|
|
1421
1690
|
/**
|
|
1422
1691
|
* This function can be used to determine if the animation can proceed to the next step.
|
|
@@ -1780,6 +2049,36 @@ var fetchEDRParameter = /*#__PURE__*/function () {
|
|
|
1780
2049
|
return _ref6.apply(this, arguments);
|
|
1781
2050
|
};
|
|
1782
2051
|
}();
|
|
2052
|
+
var fetchEDRJson = /*#__PURE__*/function () {
|
|
2053
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(url) {
|
|
2054
|
+
var response;
|
|
2055
|
+
return _regenerator().w(function (_context7) {
|
|
2056
|
+
while (1) switch (_context7.n) {
|
|
2057
|
+
case 0:
|
|
2058
|
+
_context7.n = 1;
|
|
2059
|
+
return fetch(withJsonFormat(url));
|
|
2060
|
+
case 1:
|
|
2061
|
+
response = _context7.v;
|
|
2062
|
+
return _context7.a(2, handleResponse(response));
|
|
2063
|
+
}
|
|
2064
|
+
}, _callee7);
|
|
2065
|
+
}));
|
|
2066
|
+
return function fetchEDRJson(_x1) {
|
|
2067
|
+
return _ref7.apply(this, arguments);
|
|
2068
|
+
};
|
|
2069
|
+
}();
|
|
2070
|
+
// EDR labels can be plain strings or language maps (e.g. { en: 'Temperature' }).
|
|
2071
|
+
var normalizeEDRLabel = function normalizeEDRLabel(label, fallback) {
|
|
2072
|
+
if (typeof label === 'string' && label) {
|
|
2073
|
+
return label;
|
|
2074
|
+
}
|
|
2075
|
+
if (label && _typeof(label) === 'object' && 'en' in label) {
|
|
2076
|
+
if (typeof label.en === 'string' && label.en) {
|
|
2077
|
+
return label.en;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
return fallback;
|
|
2081
|
+
};
|
|
1783
2082
|
|
|
1784
2083
|
/* *
|
|
1785
2084
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1906,13 +2205,14 @@ var useEDRGetCollectionDetails = function useEDRGetCollectionDetails(edrBaseUrlW
|
|
|
1906
2205
|
return useQuery(webmapEDRQueryOptions.getCollectionDetailsQuery(edrBaseUrlWithCollection, enabled, instanceId));
|
|
1907
2206
|
};
|
|
1908
2207
|
var useEDRGetParameterData = function useEDRGetParameterData(edrBaseUrlWithCollection, parameterName) {
|
|
2208
|
+
var _datetime$length;
|
|
1909
2209
|
var datetime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
1910
2210
|
var instanceId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
1911
2211
|
var _useEDRGetCollectionD = useEDRGetCollectionDetails(edrBaseUrlWithCollection, instanceId),
|
|
1912
2212
|
collection = _useEDRGetCollectionD.data;
|
|
1913
2213
|
return useQuery({
|
|
1914
2214
|
staleTime: DEFAULT_STALE_TIME$1,
|
|
1915
|
-
queryKey: generateWebmapQueryKeys(['get-parameter-data', edrBaseUrlWithCollection, instanceId, parameterName, datetime]),
|
|
2215
|
+
queryKey: generateWebmapQueryKeys(['get-parameter-data', edrBaseUrlWithCollection, instanceId, parameterName, datetime !== null && datetime !== void 0 ? datetime : '']),
|
|
1916
2216
|
queryFn: function () {
|
|
1917
2217
|
var _queryFn2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
1918
2218
|
var data;
|
|
@@ -1920,7 +2220,7 @@ var useEDRGetParameterData = function useEDRGetParameterData(edrBaseUrlWithColle
|
|
|
1920
2220
|
while (1) switch (_context2.n) {
|
|
1921
2221
|
case 0:
|
|
1922
2222
|
_context2.n = 1;
|
|
1923
|
-
return fetchEDRParameter(collection, edrBaseUrlWithCollection, parameterName, datetime, instanceId);
|
|
2223
|
+
return fetchEDRParameter(collection, edrBaseUrlWithCollection, parameterName, datetime !== null && datetime !== void 0 ? datetime : '', instanceId);
|
|
1924
2224
|
case 1:
|
|
1925
2225
|
data = _context2.v;
|
|
1926
2226
|
return _context2.a(2, coverageCollectionToFeatureCollection(data, parameterName));
|
|
@@ -1932,7 +2232,7 @@ var useEDRGetParameterData = function useEDRGetParameterData(edrBaseUrlWithColle
|
|
|
1932
2232
|
}
|
|
1933
2233
|
return queryFn;
|
|
1934
2234
|
}(),
|
|
1935
|
-
enabled: collection !== undefined && parameterName.length > 0 && datetime.length > 0
|
|
2235
|
+
enabled: collection !== undefined && parameterName.length > 0 && ((_datetime$length = datetime === null || datetime === void 0 ? void 0 : datetime.length) !== null && _datetime$length !== void 0 ? _datetime$length : 0) > 0
|
|
1936
2236
|
});
|
|
1937
2237
|
};
|
|
1938
2238
|
|
|
@@ -3517,7 +3817,7 @@ var getDimensionsList = function getDimensionsList(dimensions) {
|
|
|
3517
3817
|
};
|
|
3518
3818
|
|
|
3519
3819
|
var LayerInfoDialog = function LayerInfoDialog(_ref) {
|
|
3520
|
-
var _layer$styles, _layer$styles2, _layer$path, _layer$keywords;
|
|
3820
|
+
var _layer$styles, _layer$styles2, _edrParameterMetadata, _edrParameterMetadata2, _edrParameterMetadata3, _layer$path, _layer$keywords;
|
|
3521
3821
|
var onClose = _ref.onClose,
|
|
3522
3822
|
layer = _ref.layer,
|
|
3523
3823
|
serviceName = _ref.serviceName,
|
|
@@ -3537,7 +3837,8 @@ var LayerInfoDialog = function LayerInfoDialog(_ref) {
|
|
|
3537
3837
|
} : _ref$startPosition,
|
|
3538
3838
|
selectedStyle = _ref.selectedStyle,
|
|
3539
3839
|
showLayerLegend = _ref.showLayerLegend,
|
|
3540
|
-
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility
|
|
3840
|
+
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility,
|
|
3841
|
+
edrParameterMetadata = _ref.edrParameterMetadata;
|
|
3541
3842
|
var styles = getLayerStyles(layer);
|
|
3542
3843
|
var dimensions = getDimensionsList(layer.dimensions);
|
|
3543
3844
|
var _useWebmapReactTransl = useWebmapReactTranslation(),
|
|
@@ -3570,6 +3871,17 @@ var LayerInfoDialog = function LayerInfoDialog(_ref) {
|
|
|
3570
3871
|
}), jsx(LayerInfoText, {
|
|
3571
3872
|
label: t('webmap-react-name'),
|
|
3572
3873
|
value: layer.name
|
|
3874
|
+
}), !!edrParameterMetadata && jsxs(Fragment, {
|
|
3875
|
+
children: [jsx(LayerInfoText, {
|
|
3876
|
+
label: "EDR parameter",
|
|
3877
|
+
value: edrParameterMetadata.id || layer.name
|
|
3878
|
+
}), jsx(LayerInfoText, {
|
|
3879
|
+
label: "Observed property",
|
|
3880
|
+
value: ((_edrParameterMetadata = edrParameterMetadata.observedProperty) === null || _edrParameterMetadata === void 0 ? void 0 : _edrParameterMetadata.label) || '-'
|
|
3881
|
+
}), jsx(LayerInfoText, {
|
|
3882
|
+
label: "Unit",
|
|
3883
|
+
value: ((_edrParameterMetadata2 = edrParameterMetadata.unit) === null || _edrParameterMetadata2 === void 0 || (_edrParameterMetadata2 = _edrParameterMetadata2.symbol) === null || _edrParameterMetadata2 === void 0 ? void 0 : _edrParameterMetadata2.value) || ((_edrParameterMetadata3 = edrParameterMetadata.unit) === null || _edrParameterMetadata3 === void 0 ? void 0 : _edrParameterMetadata3.label) || '-'
|
|
3884
|
+
})]
|
|
3573
3885
|
}), jsx(LayerInfoText, {
|
|
3574
3886
|
label: t('webmap-react-service'),
|
|
3575
3887
|
value: serviceName
|
|
@@ -14525,4 +14837,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
14525
14837
|
return updateObject;
|
|
14526
14838
|
};
|
|
14527
14839
|
|
|
14528
|
-
export { BaseLayerType, CLASSNAME_MAP_MEASURE_TOOLTIP, CONSTRAINED_SELECTION_TYPES, COORDINATE_DECIMALS, ClickOnMapTool, Clock, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_FILL_COLOR_TRANSPARENT, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, FEATURE_DRAW_STROKE_COLOR, FEATURE_FILL, FEATURE_FILL_SELECTED, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_STROKE_SELECTED, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MIN_HEIGHT, MIN_WIDTH, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapMeasure, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, POINTER_CLICK_TOLERANCE_PX, SELECTED_FEATURE_COLOR, SELECTED_POINT_HALO_STYLE, STAC_ASSET_STYLE_PREFIX, STAC_ITEM_PAGE_LIMIT, STAC_ITEM_SEARCH_FIELDS_CONFORMANCE, STAC_TEMPORAL_STEP_SAMPLE_LIMIT, SelectField, StoryLayoutGrid, TRANSIENT_FEATURE_PROPERTIES, TimeAwareEDRLocationLayer, TimeAwareGeoTIFFLayer, TimeAwareWMTSLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, asNewFeature, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, basicExampleSharedVertexDrawOptions, calculateBoxSelection, calculateNewSelection, catmullRomSpline, clearImageCacheForAllMaps, colorMaps, connectSharedVertices, createBoxBasedOnModifiedVertex, createIconStyle, createInterSections, createModifyFeatures, createMoveFeatures, createOval, currentlySupportedDrawModes, defaultBox, defaultCircle, defaultDelete, defaultEdrStyles, defaultFreehandLine, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultLineString, defaultLocation, defaultModes, defaultOval, defaultPoint, defaultPolygon, defaultRotatableBox, defaultSmoothLine, defaultSplit, defaultSquare, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureMultiPoint, featurePoint, featurePolygon, fetchStacCatalogCollections, fetchStacCatalogRoot, fetchStacCollection, fetchStacItem, fetchStacItems, fetchStacItemsPage, fetchStacItemsWithPagination, fillOptions, firSelectionType, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getAffectedIndices, getBoxRotateHandlePoints, getBoxSelectPreviewStyle, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerExtentForProjection, getLayerStyles, getLayerUpdateInfo, getLegendClass, getOlFeatureKey, getProj4, getRendersAsStyles, getStacAssetKeyFromStyle, getStacAssetStyles, getStacCollectionStyles, getStacFrameItemsToRender, getStacItemLookupWindowForTimes, getStacItemSearchUrl, getStacItemsUrl, getTimeDimension, getToolIcon, hasEditableVertices, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isDefaultModifiable, isDefaultMovable, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, keepIdentityOnFirstSplitFeature, labelOptions, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeTimeList, makeView, marksByDimension, measureResultStyle, measureToolStyle, modifyHandleStyle$1 as modifyHandleStyle, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, polygonCleanDangling, polygonCleanDanglingCoords, polygonFeatureCollectionCleanDangling, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, removeFeatureProperties, removeOverlappingLines, removeTransientFeatureProperties, resolvePreferredStyleName$1 as resolvePreferredStyleName, resolveStacAssetKey, rewindGeometry, roundCoordinates, roundFeatureCoordinates, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, shouldEnterEditMode, shouldExitEditModeForMultiSelect, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, splitLine, splitPolygon, splitStyle, stacCatalogCollectionToLayerProps, stacColormapToOlStyle, stacGrayscaleOlStyle, stacNormalizedGrayscaleOlStyle, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, toMovedFeatures, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRGetCollectionDetails, useEDRGetParameterData, useEDRWMLayer, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useModifyFeatures, useMoveFeatures, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useStacCatalogRoot, useStacCollection, useStacItems, useStacOverviewItems, useStacTemporalStepItems, useViewFromLayer, viewUtils, webmapEDRQueryOptions, webmapReactTranslations };
|
|
14840
|
+
export { BaseLayerType, CLASSNAME_MAP_MEASURE_TOOLTIP, CONSTRAINED_SELECTION_TYPES, COORDINATE_DECIMALS, ClickOnMapTool, Clock, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_FILL_COLOR_TRANSPARENT, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, FEATURE_DRAW_STROKE_COLOR, FEATURE_FILL, FEATURE_FILL_SELECTED, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_STROKE_SELECTED, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MIN_HEIGHT, MIN_WIDTH, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapMeasure, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, POINTER_CLICK_TOLERANCE_PX, SELECTED_FEATURE_COLOR, SELECTED_POINT_HALO_STYLE, STAC_ASSET_STYLE_PREFIX, STAC_ITEM_PAGE_LIMIT, STAC_ITEM_SEARCH_FIELDS_CONFORMANCE, STAC_TEMPORAL_STEP_SAMPLE_LIMIT, SelectField, StoryLayoutGrid, TRANSIENT_FEATURE_PROPERTIES, TimeAwareEDRLocationLayer, TimeAwareGeoTIFFLayer, TimeAwareWMTSLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, asNewFeature, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, basicExampleSharedVertexDrawOptions, calculateBoxSelection, calculateNewSelection, catmullRomSpline, clearImageCacheForAllMaps, colorMaps, connectSharedVertices, createBoxBasedOnModifiedVertex, createIconStyle, createInterSections, createModifyFeatures, createMoveFeatures, createOval, currentlySupportedDrawModes, defaultBox, defaultCircle, defaultDelete, defaultEdrStyles, defaultFreehandLine, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultLineString, defaultLocation, defaultModes, defaultOval, defaultPoint, defaultPolygon, defaultRotatableBox, defaultSmoothLine, defaultSplit, defaultSquare, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureMultiPoint, featurePoint, featurePolygon, fetchEDRArea, fetchEDRCollectionDetails, fetchEDRCube, fetchEDRJson, fetchEDRParameter, fetchStacCatalogCollections, fetchStacCatalogRoot, fetchStacCollection, fetchStacItem, fetchStacItems, fetchStacItemsPage, fetchStacItemsWithPagination, fillOptions, firSelectionType, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getAffectedIndices, getBoxRotateHandlePoints, getBoxSelectPreviewStyle, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerExtentForProjection, getLayerStyles, getLayerUpdateInfo, getLegendClass, getOlFeatureKey, getProj4, getRendersAsStyles, getStacAssetKeyFromStyle, getStacAssetStyles, getStacCollectionStyles, getStacFrameItemsToRender, getStacItemLookupWindowForTimes, getStacItemSearchUrl, getStacItemsUrl, getTimeDimension, getToolIcon, handleResponse, hasEditableVertices, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isDefaultModifiable, isDefaultMovable, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, joinUrlParams, keepIdentityOnFirstSplitFeature, labelOptions, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeTimeList, makeView, marksByDimension, measureResultStyle, measureToolStyle, modifyHandleStyle$1 as modifyHandleStyle, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, normalizeEDRLabel, opacityOptions, openLayersGetMapImageStore, polygonCleanDangling, polygonCleanDanglingCoords, polygonFeatureCollectionCleanDangling, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, removeFeatureProperties, removeOverlappingLines, removeTransientFeatureProperties, resolvePreferredStyleName$1 as resolvePreferredStyleName, resolveStacAssetKey, rewindGeometry, roundCoordinates, roundFeatureCoordinates, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, shouldEnterEditMode, shouldExitEditModeForMultiSelect, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, splitLine, splitPolygon, splitStyle, stacCatalogCollectionToLayerProps, stacColormapToOlStyle, stacGrayscaleOlStyle, stacNormalizedGrayscaleOlStyle, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, toMovedFeatures, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRGetCollectionDetails, useEDRGetParameterData, useEDRWMLayer, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useModifyFeatures, useMoveFeatures, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useStacCatalogRoot, useStacCollection, useStacItems, useStacOverviewItems, useStacTemporalStepItems, useViewFromLayer, viewUtils, webmapEDRQueryOptions, webmapReactTranslations };
|
|
@@ -14,5 +14,19 @@ export interface LayerInfoDialogProps {
|
|
|
14
14
|
selectedStyle?: string;
|
|
15
15
|
showLayerLegend: boolean;
|
|
16
16
|
onToggleLayerLegendVisibility: (showLegend: boolean) => void;
|
|
17
|
+
edrParameterMetadata?: {
|
|
18
|
+
id?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
observedProperty?: {
|
|
22
|
+
label?: string;
|
|
23
|
+
};
|
|
24
|
+
unit?: {
|
|
25
|
+
label?: string;
|
|
26
|
+
symbol?: {
|
|
27
|
+
value?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
17
31
|
}
|
|
18
32
|
export declare const LayerInfoDialog: React.FC<LayerInfoDialogProps>;
|
|
@@ -11,7 +11,7 @@ interface TimeAwareGeoreferencedImageSrc {
|
|
|
11
11
|
resolution: number;
|
|
12
12
|
}
|
|
13
13
|
interface TimeAwareGeoreferencedImage {
|
|
14
|
-
el: HTMLImageElement;
|
|
14
|
+
el: HTMLImageElement | HTMLCanvasElement;
|
|
15
15
|
extent: Extent;
|
|
16
16
|
resolution: number;
|
|
17
17
|
isLoaded: boolean;
|
|
@@ -19,6 +19,7 @@ interface TimeAwareGeoreferencedImage {
|
|
|
19
19
|
isLoadedWithoutErrors: boolean;
|
|
20
20
|
isLoading: boolean;
|
|
21
21
|
}
|
|
22
|
+
type TimeAwareGeoreferencedImageRequest = TimeAwareGeoreferencedImageSrc;
|
|
22
23
|
declare class TimeAwareImageWrapper extends ImageWrapper {
|
|
23
24
|
private _extentToLoad;
|
|
24
25
|
private _resolutionToLoad;
|
|
@@ -30,15 +31,19 @@ declare class TimeAwareImageWrapper extends ImageWrapper {
|
|
|
30
31
|
private _resolvers;
|
|
31
32
|
private _styleName;
|
|
32
33
|
private _layerName;
|
|
34
|
+
private _compositeImageKey;
|
|
35
|
+
private _compositeImage;
|
|
33
36
|
constructor(extent: Extent, resolution: number, pixelRatio: number);
|
|
34
37
|
getWMSGetMapRequestURL(extentToLoad: Extent, resolutionToLoad: number, __pixelRatio: number, projection: Projection | null, getMapUrl: string | null, params: Record<string, string>, layerName: string | null, styleName: string, dimProps: Record<string, string>): TimeAwareGeoreferencedImageSrc;
|
|
35
38
|
getAlternativeImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimsProps: Record<string, string>): TimeAwareGeoreferencedImage | false;
|
|
36
39
|
hasImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimsProps: Record<string, string>): TimeAwareGeoreferencedImage | false;
|
|
40
|
+
private createCompositeImage;
|
|
37
41
|
setGeoReferencedImage(image: TimeAwareGeoreferencedImage): void;
|
|
38
42
|
load(): void;
|
|
39
43
|
setState(state: number): void;
|
|
40
44
|
private _rejectAll;
|
|
41
45
|
private _resolveAll;
|
|
42
46
|
loadAndResolve(extentToLoad: Extent, resolutionToLoad: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimProps: Record<string, string>): Promise<WMImage>;
|
|
47
|
+
getWMSGetMapRequestURLs(extentToLoad: Extent, resolutionToLoad: number, pixelRatio: number, projection: Projection | null, getMapUrl: string | null, params: Record<string, string>, layerName: string | null, styleName: string, dimProps: Record<string, string>): TimeAwareGeoreferencedImageRequest[];
|
|
43
48
|
}
|
|
44
49
|
export default TimeAwareImageWrapper;
|
|
@@ -5,3 +5,5 @@ export declare const fetchEDRCollectionDetails: (edrBaseUrlWithCollection: strin
|
|
|
5
5
|
export declare const fetchEDRCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain>>;
|
|
6
6
|
export declare const fetchEDRArea: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, coords?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain>>;
|
|
7
7
|
export declare const fetchEDRParameter: (collection: EDRInstance | undefined, edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain> | undefined>;
|
|
8
|
+
export declare const fetchEDRJson: <T>(url: string) => Promise<T>;
|
|
9
|
+
export declare const normalizeEDRLabel: (label: unknown, fallback: string) => string;
|
|
@@ -11,4 +11,4 @@ export declare const webmapEDRQueryOptions: {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export declare const useEDRGetCollectionDetails: (edrBaseUrlWithCollection: string, instanceId?: string, enabled?: boolean) => UseQueryResult<EDRInstance>;
|
|
14
|
-
export declare const useEDRGetParameterData: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string) => UseQueryResult<GeoJSON.FeatureCollection | undefined>;
|
|
14
|
+
export declare const useEDRGetParameterData: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string | null, instanceId?: string) => UseQueryResult<GeoJSON.FeatureCollection | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "20.0
|
|
3
|
+
"version": "20.1.0",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/webmap": "20.0
|
|
24
|
-
"@opengeoweb/theme": "20.0
|
|
25
|
-
"@opengeoweb/shared": "20.0
|
|
23
|
+
"@opengeoweb/webmap": "20.1.0",
|
|
24
|
+
"@opengeoweb/theme": "20.1.0",
|
|
25
|
+
"@opengeoweb/shared": "20.1.0",
|
|
26
26
|
"lodash": "^4.18.1",
|
|
27
27
|
"ol": "^10.4.0",
|
|
28
28
|
"proj4": "^2.9.2",
|