@opengeoweb/webmap-react 20.0.1-nightly-20261015 → 20.1.0-nightly-20261017
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 +391 -64
- package/dist/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +8 -1
- package/dist/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +3 -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,9 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
875
919
|
_this._resolvers = [];
|
|
876
920
|
_this._styleName = 'default';
|
|
877
921
|
_this._layerName = null;
|
|
922
|
+
_this._extentRatio = WMS_EXTENT_RATIO_TO_VIEWPORT;
|
|
923
|
+
_this._compositeImageKey = '';
|
|
924
|
+
_this._compositeImage = null;
|
|
878
925
|
_this.extent = extent;
|
|
879
926
|
_this.resolution = resolution;
|
|
880
927
|
_this.state = ImageState.IDLE;
|
|
@@ -892,6 +939,11 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
892
939
|
}
|
|
893
940
|
_inherits(TimeAwareImageWrapper, _ImageWrapper);
|
|
894
941
|
return _createClass(TimeAwareImageWrapper, [{
|
|
942
|
+
key: "setExtentRatio",
|
|
943
|
+
value: function setExtentRatio(extentRatio) {
|
|
944
|
+
this._extentRatio = extentRatio;
|
|
945
|
+
}
|
|
946
|
+
}, {
|
|
895
947
|
key: "getWMSGetMapRequestURL",
|
|
896
948
|
value: function getWMSGetMapRequestURL(extentToLoad, resolutionToLoad, __pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps) {
|
|
897
949
|
var pixelRatio = 1; // TODO?
|
|
@@ -908,8 +960,8 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
908
960
|
var resolution = resolutionToLoad;
|
|
909
961
|
var requestResolution = Array.isArray(resolution) ? resolution[0] : resolution || 1;
|
|
910
962
|
var newPixelRatio = pixelRatio;
|
|
911
|
-
// Load
|
|
912
|
-
var ratio =
|
|
963
|
+
// Load extentRatio^2 % larger WMS extents than the current view (default 1.2, see WMS_EXTENT_RATIO_TO_VIEWPORT)
|
|
964
|
+
var ratio = this._extentRatio;
|
|
913
965
|
var extent = extentToLoad;
|
|
914
966
|
var newExtent = getRequestExtent(extent, requestResolution, newPixelRatio, ratio);
|
|
915
967
|
// Feature in adaguc-server to display actually used dimensions in the map.
|
|
@@ -927,44 +979,184 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
927
979
|
}, {
|
|
928
980
|
key: "getAlternativeImage",
|
|
929
981
|
value: function getAlternativeImage(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps) {
|
|
930
|
-
var
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
982
|
+
var requests = this.getWMSGetMapRequestURLs(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps);
|
|
983
|
+
var images = requests.map(function (request) {
|
|
984
|
+
var _candidates$filter$ma;
|
|
985
|
+
var candidates = openLayersGetMapImageStore.getAltGeoReferencedImages(request.src, request.extent, request.resolution);
|
|
986
|
+
return (_candidates$filter$ma = candidates.filter(function (image) {
|
|
987
|
+
return image.isLoadedWithoutErrors() && image.geoReference;
|
|
988
|
+
}).map(function (image) {
|
|
989
|
+
return {
|
|
990
|
+
image: image,
|
|
991
|
+
overlapArea: getExtentOverlapArea(image.geoReference.extent, request.extent)
|
|
992
|
+
};
|
|
993
|
+
}).filter(function (_ref) {
|
|
994
|
+
var overlapArea = _ref.overlapArea;
|
|
995
|
+
return overlapArea > 0;
|
|
996
|
+
}).sort(function (imageA, imageB) {
|
|
997
|
+
return imageB.overlapArea - imageA.overlapArea;
|
|
998
|
+
})[0]) === null || _candidates$filter$ma === void 0 ? void 0 : _candidates$filter$ma.image;
|
|
999
|
+
});
|
|
1000
|
+
if (images.some(function (image) {
|
|
1001
|
+
return !image;
|
|
1002
|
+
})) {
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
var completeImages = images;
|
|
1006
|
+
if (completeImages.length > 1) {
|
|
1007
|
+
var uniqueImages = _toConsumableArray(new Set(completeImages));
|
|
1008
|
+
if (uniqueImages.length !== completeImages.length) {
|
|
1009
|
+
if (uniqueImages.length !== 1) {
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
var _uniqueImages = _slicedToArray(uniqueImages, 1),
|
|
1013
|
+
_image = _uniqueImages[0];
|
|
1014
|
+
var imageExtent = _image.geoReference.extent;
|
|
1015
|
+
var requestedExtent = combineExtents(requests.map(function (request) {
|
|
1016
|
+
return request.extent;
|
|
1017
|
+
}));
|
|
1018
|
+
if (imageExtent[0] > requestedExtent[0] || imageExtent[1] > requestedExtent[1] || imageExtent[2] < requestedExtent[2] || imageExtent[3] < requestedExtent[3]) {
|
|
1019
|
+
return false;
|
|
1020
|
+
}
|
|
1021
|
+
return {
|
|
1022
|
+
el: _image.getElement(),
|
|
1023
|
+
extent: imageExtent,
|
|
1024
|
+
resolution: _image.geoReference.resolution,
|
|
1025
|
+
isLoaded: _image.isLoaded(),
|
|
1026
|
+
isLoadedWithoutErrors: _image.isLoadedWithoutErrors(),
|
|
1027
|
+
hasError: _image.hasError(),
|
|
1028
|
+
isLoading: _image.isLoading()
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
var imageRequests = completeImages.map(function (image, index) {
|
|
1032
|
+
return _objectSpread2(_objectSpread2({}, requests[index]), {}, {
|
|
1033
|
+
extent: image.geoReference.extent,
|
|
1034
|
+
resolution: image.geoReference.resolution
|
|
1035
|
+
});
|
|
1036
|
+
});
|
|
1037
|
+
var image = this.createCompositeImage(completeImages, imageRequests);
|
|
1038
|
+
if (!image) {
|
|
1039
|
+
return false;
|
|
1040
|
+
}
|
|
936
1041
|
return {
|
|
937
|
-
el:
|
|
938
|
-
extent:
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1042
|
+
el: image,
|
|
1043
|
+
extent: combineExtents(imageRequests.map(function (request) {
|
|
1044
|
+
return request.extent;
|
|
1045
|
+
})),
|
|
1046
|
+
resolution: imageRequests[0].resolution,
|
|
1047
|
+
isLoaded: completeImages.every(function (loadedImage) {
|
|
1048
|
+
return loadedImage.isLoaded();
|
|
1049
|
+
}),
|
|
1050
|
+
isLoadedWithoutErrors: completeImages.every(function (loadedImage) {
|
|
1051
|
+
return loadedImage.isLoadedWithoutErrors();
|
|
1052
|
+
}),
|
|
1053
|
+
hasError: completeImages.some(function (loadedImage) {
|
|
1054
|
+
return loadedImage.hasError();
|
|
1055
|
+
}),
|
|
1056
|
+
isLoading: completeImages.some(function (loadedImage) {
|
|
1057
|
+
return loadedImage.isLoading();
|
|
1058
|
+
})
|
|
944
1059
|
};
|
|
945
1060
|
}
|
|
946
|
-
|
|
1061
|
+
var _completeImages = _slicedToArray(completeImages, 1),
|
|
1062
|
+
geoRef = _completeImages[0];
|
|
1063
|
+
return {
|
|
1064
|
+
el: geoRef.getElement(),
|
|
1065
|
+
extent: geoRef.geoReference.extent,
|
|
1066
|
+
resolution: geoRef.geoReference.resolution,
|
|
1067
|
+
isLoaded: geoRef.isLoaded(),
|
|
1068
|
+
isLoadedWithoutErrors: geoRef.isLoadedWithoutErrors(),
|
|
1069
|
+
hasError: geoRef.hasError(),
|
|
1070
|
+
isLoading: geoRef.isLoading()
|
|
1071
|
+
};
|
|
947
1072
|
}
|
|
948
1073
|
}, {
|
|
949
1074
|
key: "hasImage",
|
|
950
1075
|
value: function hasImage(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps) {
|
|
951
|
-
var
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1076
|
+
var requests = this.getWMSGetMapRequestURLs(extent, resolution, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimsProps);
|
|
1077
|
+
var images = requests.map(function (request) {
|
|
1078
|
+
return openLayersGetMapImageStore.getImage(request.src);
|
|
1079
|
+
});
|
|
1080
|
+
if (images.some(function (image) {
|
|
1081
|
+
return !image;
|
|
1082
|
+
})) {
|
|
1083
|
+
return false;
|
|
1084
|
+
}
|
|
1085
|
+
if (images.length === 1) {
|
|
1086
|
+
var _images = _slicedToArray(images, 1),
|
|
1087
|
+
imageEl = _images[0];
|
|
957
1088
|
return {
|
|
958
1089
|
el: imageEl.getElement(),
|
|
959
|
-
extent:
|
|
960
|
-
resolution:
|
|
1090
|
+
extent: requests[0].extent,
|
|
1091
|
+
resolution: requests[0].resolution,
|
|
961
1092
|
isLoaded: imageEl.isLoaded(),
|
|
962
1093
|
isLoadedWithoutErrors: imageEl.isLoadedWithoutErrors(),
|
|
963
1094
|
hasError: imageEl.hasError(),
|
|
964
1095
|
isLoading: imageEl.isLoading()
|
|
965
1096
|
};
|
|
966
1097
|
}
|
|
967
|
-
|
|
1098
|
+
var completeImages = images;
|
|
1099
|
+
if (!completeImages.every(function (image) {
|
|
1100
|
+
return image.isLoaded();
|
|
1101
|
+
})) {
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
var image = this.createCompositeImage(completeImages, requests);
|
|
1105
|
+
if (!image) {
|
|
1106
|
+
return false;
|
|
1107
|
+
}
|
|
1108
|
+
return {
|
|
1109
|
+
el: image,
|
|
1110
|
+
extent: combineExtents(requests.map(function (request) {
|
|
1111
|
+
return request.extent;
|
|
1112
|
+
})),
|
|
1113
|
+
resolution: requests[0].resolution,
|
|
1114
|
+
isLoaded: true,
|
|
1115
|
+
isLoadedWithoutErrors: completeImages.every(function (loadedImage) {
|
|
1116
|
+
return loadedImage.isLoadedWithoutErrors();
|
|
1117
|
+
}),
|
|
1118
|
+
hasError: completeImages.some(function (loadedImage) {
|
|
1119
|
+
return loadedImage.hasError();
|
|
1120
|
+
}),
|
|
1121
|
+
isLoading: completeImages.some(function (loadedImage) {
|
|
1122
|
+
return loadedImage.isLoading();
|
|
1123
|
+
})
|
|
1124
|
+
};
|
|
1125
|
+
}
|
|
1126
|
+
}, {
|
|
1127
|
+
key: "createCompositeImage",
|
|
1128
|
+
value: function createCompositeImage(images, requests) {
|
|
1129
|
+
var extent = combineExtents(requests.map(function (request) {
|
|
1130
|
+
return request.extent;
|
|
1131
|
+
}));
|
|
1132
|
+
var resolution = requests[0].resolution;
|
|
1133
|
+
var imageKey = JSON.stringify([images.map(function (image) {
|
|
1134
|
+
return image.getElement().src;
|
|
1135
|
+
}), requests.map(function (request) {
|
|
1136
|
+
return request.extent;
|
|
1137
|
+
}), resolution]);
|
|
1138
|
+
if (this._compositeImage && this._compositeImageKey === imageKey) {
|
|
1139
|
+
return this._compositeImage;
|
|
1140
|
+
}
|
|
1141
|
+
var canvas = document.createElement('canvas');
|
|
1142
|
+
canvas.width = Math.ceil((extent[2] - extent[0]) / resolution);
|
|
1143
|
+
canvas.height = Math.ceil((extent[3] - extent[1]) / resolution);
|
|
1144
|
+
var context = canvas.getContext('2d');
|
|
1145
|
+
if (!context) {
|
|
1146
|
+
return false;
|
|
1147
|
+
}
|
|
1148
|
+
images.forEach(function (image, index) {
|
|
1149
|
+
if (image.hasError()) {
|
|
1150
|
+
return;
|
|
1151
|
+
}
|
|
1152
|
+
var imageExtent = requests[index].extent;
|
|
1153
|
+
var overlapsNextSegment = index < images.length - 1;
|
|
1154
|
+
var destinationWidth = (imageExtent[2] - imageExtent[0]) / resolution + (overlapsNextSegment ? 1 : 0);
|
|
1155
|
+
context.drawImage(image.getElement(), (imageExtent[0] - extent[0]) / resolution, (extent[3] - imageExtent[3]) / resolution, destinationWidth, (imageExtent[3] - imageExtent[1]) / resolution);
|
|
1156
|
+
});
|
|
1157
|
+
this._compositeImageKey = imageKey;
|
|
1158
|
+
this._compositeImage = canvas;
|
|
1159
|
+
return canvas;
|
|
968
1160
|
}
|
|
969
1161
|
}, {
|
|
970
1162
|
key: "setGeoReferencedImage",
|
|
@@ -980,22 +1172,33 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
980
1172
|
key: "load",
|
|
981
1173
|
value: function load() {
|
|
982
1174
|
var _this2 = this;
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
resolution: newResolution
|
|
1175
|
+
var requests = this.getWMSGetMapRequestURLs(this._extentToLoad, this._resolutionToLoad, this._pixelRatioToLoad, this.projection, this._getMapUrl, this._paramsToLoad, this._layerName, this._styleName, this._dimPropsToLoad);
|
|
1176
|
+
var images = requests.map(function (request) {
|
|
1177
|
+
return openLayersGetMapImageStore.getImageAndSetGeoReference(request.src, {
|
|
1178
|
+
extent: request.extent,
|
|
1179
|
+
resolution: request.resolution
|
|
1180
|
+
});
|
|
990
1181
|
});
|
|
991
|
-
if (
|
|
1182
|
+
if (images.some(function (image) {
|
|
1183
|
+
return !image;
|
|
1184
|
+
})) {
|
|
992
1185
|
return;
|
|
993
1186
|
}
|
|
994
|
-
if (
|
|
1187
|
+
if (images.length === 1) {
|
|
1188
|
+
var _images2 = _slicedToArray(images, 1),
|
|
1189
|
+
imageEl = _images2[0];
|
|
1190
|
+
if (!imageEl.isLoaded()) {
|
|
1191
|
+
this.state = ImageState.LOADING;
|
|
1192
|
+
this.changed();
|
|
1193
|
+
void imageEl.loadAwait()["finally"](function () {
|
|
1194
|
+
return _this2.load();
|
|
1195
|
+
});
|
|
1196
|
+
return;
|
|
1197
|
+
}
|
|
995
1198
|
this.state = ImageState.LOADED;
|
|
996
1199
|
this.setImage(imageEl.getElement());
|
|
997
|
-
this.extent =
|
|
998
|
-
this.resolution =
|
|
1200
|
+
this.extent = requests[0].extent;
|
|
1201
|
+
this.resolution = requests[0].resolution;
|
|
999
1202
|
this.changed();
|
|
1000
1203
|
if (imageEl.hasError()) {
|
|
1001
1204
|
this._rejectAll(imageEl.getSrc());
|
|
@@ -1004,10 +1207,50 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1004
1207
|
}
|
|
1005
1208
|
return;
|
|
1006
1209
|
}
|
|
1210
|
+
var loadedImages = images;
|
|
1211
|
+
if (loadedImages.every(function (image) {
|
|
1212
|
+
return image.isLoaded();
|
|
1213
|
+
})) {
|
|
1214
|
+
this.state = ImageState.LOADED;
|
|
1215
|
+
var image = this.createCompositeImage(loadedImages, requests);
|
|
1216
|
+
if (!image) {
|
|
1217
|
+
this.state = ImageState.ERROR;
|
|
1218
|
+
this.changed();
|
|
1219
|
+
this._rejectAll(loadedImages[0].getSrc());
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
this.setImage(image);
|
|
1223
|
+
this.extent = combineExtents(requests.map(function (request) {
|
|
1224
|
+
return request.extent;
|
|
1225
|
+
}));
|
|
1226
|
+
this.resolution = requests[0].resolution;
|
|
1227
|
+
this.changed();
|
|
1228
|
+
var failedImage = loadedImages.find(function (loadedImage) {
|
|
1229
|
+
return loadedImage.hasError();
|
|
1230
|
+
});
|
|
1231
|
+
if (failedImage) {
|
|
1232
|
+
this._rejectAll(failedImage.getSrc());
|
|
1233
|
+
} else {
|
|
1234
|
+
this._resolveAll(loadedImages[0]);
|
|
1235
|
+
}
|
|
1236
|
+
return;
|
|
1237
|
+
}
|
|
1007
1238
|
this.state = ImageState.LOADING;
|
|
1008
1239
|
this.changed();
|
|
1009
|
-
void
|
|
1010
|
-
|
|
1240
|
+
void Promise.all(loadedImages.map(/*#__PURE__*/function () {
|
|
1241
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(image) {
|
|
1242
|
+
return _regenerator().w(function (_context) {
|
|
1243
|
+
while (1) switch (_context.n) {
|
|
1244
|
+
case 0:
|
|
1245
|
+
return _context.a(2, image.loadAwait());
|
|
1246
|
+
}
|
|
1247
|
+
}, _callee);
|
|
1248
|
+
}));
|
|
1249
|
+
return function (_x) {
|
|
1250
|
+
return _ref2.apply(this, arguments);
|
|
1251
|
+
};
|
|
1252
|
+
}()))["finally"](function () {
|
|
1253
|
+
return _this2.load();
|
|
1011
1254
|
});
|
|
1012
1255
|
}
|
|
1013
1256
|
}, {
|
|
@@ -1037,10 +1280,10 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1037
1280
|
}, {
|
|
1038
1281
|
key: "loadAndResolve",
|
|
1039
1282
|
value: function () {
|
|
1040
|
-
var _loadAndResolve = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
1283
|
+
var _loadAndResolve = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(extentToLoad, resolutionToLoad, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps) {
|
|
1041
1284
|
var _this3 = this;
|
|
1042
|
-
return _regenerator().w(function (
|
|
1043
|
-
while (1) switch (
|
|
1285
|
+
return _regenerator().w(function (_context2) {
|
|
1286
|
+
while (1) switch (_context2.n) {
|
|
1044
1287
|
case 0:
|
|
1045
1288
|
this._extentToLoad = _toConsumableArray(extentToLoad || []);
|
|
1046
1289
|
this._resolutionToLoad = resolutionToLoad;
|
|
@@ -1051,7 +1294,7 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1051
1294
|
this.projection = projection;
|
|
1052
1295
|
this._styleName = styleName;
|
|
1053
1296
|
this._dimPropsToLoad = _objectSpread2({}, dimProps);
|
|
1054
|
-
return
|
|
1297
|
+
return _context2.a(2, new Promise(function (resolve, reject) {
|
|
1055
1298
|
_this3._resolvers.push({
|
|
1056
1299
|
resolve: resolve,
|
|
1057
1300
|
reject: reject
|
|
@@ -1059,13 +1302,41 @@ var TimeAwareImageWrapper = /*#__PURE__*/function (_ImageWrapper) {
|
|
|
1059
1302
|
_this3.load();
|
|
1060
1303
|
}));
|
|
1061
1304
|
}
|
|
1062
|
-
},
|
|
1305
|
+
}, _callee2, this);
|
|
1063
1306
|
}));
|
|
1064
|
-
function loadAndResolve(
|
|
1307
|
+
function loadAndResolve(_x2, _x3, _x4, _x5, _x6, _x7, _x8, _x9, _x0) {
|
|
1065
1308
|
return _loadAndResolve.apply(this, arguments);
|
|
1066
1309
|
}
|
|
1067
1310
|
return loadAndResolve;
|
|
1068
1311
|
}()
|
|
1312
|
+
}, {
|
|
1313
|
+
key: "getWMSGetMapRequestURLs",
|
|
1314
|
+
value: function getWMSGetMapRequestURLs(extentToLoad, resolutionToLoad, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps) {
|
|
1315
|
+
var request = this.getWMSGetMapRequestURL(extentToLoad, resolutionToLoad, pixelRatio, projection, getMapUrl, params, layerName, styleName, dimProps);
|
|
1316
|
+
var worldExtent = projection !== null && projection !== void 0 && projection.canWrapX() ? projection.getExtent() : null;
|
|
1317
|
+
if (!request.src || !worldExtent) {
|
|
1318
|
+
return [request];
|
|
1319
|
+
}
|
|
1320
|
+
var segments = splitExtentAtWorldSeams(request.extent, worldExtent);
|
|
1321
|
+
if (segments.length === 1 && segments[0].requestExtent.every(function (value, index) {
|
|
1322
|
+
return value === request.extent[index];
|
|
1323
|
+
})) {
|
|
1324
|
+
return [request];
|
|
1325
|
+
}
|
|
1326
|
+
var paramsToUse = _objectSpread2({}, params);
|
|
1327
|
+
return segments.map(function (_ref3) {
|
|
1328
|
+
var requestExtent = _ref3.requestExtent,
|
|
1329
|
+
displayExtent = _ref3.displayExtent;
|
|
1330
|
+
return {
|
|
1331
|
+
src: getImageSrc(requestExtent, request.resolution, 1, projection, getMapUrl, getRequestParams(_objectSpread2(_objectSpread2(_objectSpread2({}, paramsToUse), dimProps), {}, {
|
|
1332
|
+
LAYERS: layerName,
|
|
1333
|
+
STYLES: styleName
|
|
1334
|
+
}), 'GetMap'), 'mapserver'),
|
|
1335
|
+
extent: displayExtent,
|
|
1336
|
+
resolution: request.resolution
|
|
1337
|
+
};
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1069
1340
|
}]);
|
|
1070
1341
|
}(ImageWrapper);
|
|
1071
1342
|
|
|
@@ -1157,7 +1428,8 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1157
1428
|
styleName = _ref.styleName,
|
|
1158
1429
|
dimProps = _ref.dimProps,
|
|
1159
1430
|
params = _ref.params,
|
|
1160
|
-
visible = _ref.visible
|
|
1431
|
+
visible = _ref.visible,
|
|
1432
|
+
extentRatio = _ref.extentRatio;
|
|
1161
1433
|
_classCallCheck(this, TimeawareImageSource);
|
|
1162
1434
|
_this = _callSuper(this, TimeawareImageSource, [{}]);
|
|
1163
1435
|
_this._failedImageRetryTimer = null;
|
|
@@ -1169,6 +1441,7 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1169
1441
|
_this._timeStampsToPrefetch = _toConsumableArray(timeStampsToPrefetch || []);
|
|
1170
1442
|
_this._previousPrefetchExtent = null;
|
|
1171
1443
|
_this._prefetchWorkers = new WorkerQueue(NUMBER_PREFETCH_WORKERS);
|
|
1444
|
+
_this._extentRatio = extentRatio !== null && extentRatio !== void 0 ? extentRatio : WMS_EXTENT_RATIO_TO_VIEWPORT;
|
|
1172
1445
|
_this.prefetch = _this.prefetch.bind(_this);
|
|
1173
1446
|
_this.isImageLoadingForTimestep = _this.isImageLoadingForTimestep.bind(_this);
|
|
1174
1447
|
_this.hasImageLoadedForTimeValue = _this.hasImageLoadedForTimeValue.bind(_this);
|
|
@@ -1194,6 +1467,8 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1194
1467
|
_this._imWrapperEmptyButLoading = initImageWrapper();
|
|
1195
1468
|
_this._imWrapperForOlSource = initImageWrapper();
|
|
1196
1469
|
_this._imWrapperForAltImage = initImageWrapper();
|
|
1470
|
+
_this._imWrapperForOlSource.setExtentRatio(_this._extentRatio);
|
|
1471
|
+
_this._imWrapperForAltImage.setExtentRatio(_this._extentRatio);
|
|
1197
1472
|
_this.set(LayerProperty.VISIBLE, !!visible);
|
|
1198
1473
|
return _this;
|
|
1199
1474
|
}
|
|
@@ -1265,17 +1540,21 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1265
1540
|
cancelled: false,
|
|
1266
1541
|
task: function () {
|
|
1267
1542
|
var _task = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
1268
|
-
var
|
|
1269
|
-
var jobWrapper, dimPropsWithTime, _jobWrapper$getWMSGet, src;
|
|
1543
|
+
var jobWrapper, dimPropsWithTime, requests;
|
|
1270
1544
|
return _regenerator().w(function (_context) {
|
|
1271
1545
|
while (1) switch (_context.n) {
|
|
1272
1546
|
case 0:
|
|
1273
1547
|
jobWrapper = new TimeAwareImageWrapper([0, 0, 0, 0], 1, 1);
|
|
1548
|
+
jobWrapper.setExtentRatio(_this3._extentRatio);
|
|
1274
1549
|
dimPropsWithTime = _objectSpread2(_objectSpread2({}, _this3._dimProperties), {}, {
|
|
1275
1550
|
TIME: dimValue
|
|
1276
1551
|
});
|
|
1277
|
-
|
|
1278
|
-
(
|
|
1552
|
+
requests = jobWrapper.getWMSGetMapRequestURLs(extent, resolution, pixelRatio, projection, _this3._wmsUrl, _this3._extraWMSParams, _this3._layerName, _this3._styleName, dimPropsWithTime);
|
|
1553
|
+
requests.forEach(function (_ref2) {
|
|
1554
|
+
var _openLayersGetMapImag;
|
|
1555
|
+
var src = _ref2.src;
|
|
1556
|
+
(_openLayersGetMapImag = openLayersGetMapImageStore.getImage(src)) === null || _openLayersGetMapImag === void 0 || _openLayersGetMapImag.clearError();
|
|
1557
|
+
});
|
|
1279
1558
|
_context.n = 1;
|
|
1280
1559
|
return jobWrapper.loadAndResolve(extent, resolution, pixelRatio, projection, _this3._wmsUrl, _this3._extraWMSParams, _this3._layerName, _this3._styleName, dimPropsWithTime)["catch"](function (e) {
|
|
1281
1560
|
// Do not log errors, as they are not very useful and can better be inspected via the network console
|
|
@@ -1411,12 +1690,13 @@ var TimeawareImageSource = /*#__PURE__*/function (_ImageSource) {
|
|
|
1411
1690
|
}
|
|
1412
1691
|
var dimPropWithRequestedDate = _objectSpread2({}, this._dimProperties);
|
|
1413
1692
|
dimPropWithRequestedDate['TIME'] = isoTime;
|
|
1414
|
-
var
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1693
|
+
var requests = this._imWrapperForOlSource.getWMSGetMapRequestURLs(this._lastRequestedExtent, this._lastRequestedResolution, this._lastRequestedPixelRatio, this._lastRequestedProjection, this._wmsUrl, this._extraWMSParams, this._layerName, this._styleName, dimPropWithRequestedDate);
|
|
1694
|
+
return requests.flatMap(function (_ref3) {
|
|
1695
|
+
var src = _ref3.src,
|
|
1696
|
+
extent = _ref3.extent,
|
|
1697
|
+
resolution = _ref3.resolution;
|
|
1698
|
+
return openLayersGetMapImageStore.getAltGeoReferencedImages(src, extent, resolution);
|
|
1699
|
+
});
|
|
1420
1700
|
}
|
|
1421
1701
|
/**
|
|
1422
1702
|
* This function can be used to determine if the animation can proceed to the next step.
|
|
@@ -1780,6 +2060,36 @@ var fetchEDRParameter = /*#__PURE__*/function () {
|
|
|
1780
2060
|
return _ref6.apply(this, arguments);
|
|
1781
2061
|
};
|
|
1782
2062
|
}();
|
|
2063
|
+
var fetchEDRJson = /*#__PURE__*/function () {
|
|
2064
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(url) {
|
|
2065
|
+
var response;
|
|
2066
|
+
return _regenerator().w(function (_context7) {
|
|
2067
|
+
while (1) switch (_context7.n) {
|
|
2068
|
+
case 0:
|
|
2069
|
+
_context7.n = 1;
|
|
2070
|
+
return fetch(withJsonFormat(url));
|
|
2071
|
+
case 1:
|
|
2072
|
+
response = _context7.v;
|
|
2073
|
+
return _context7.a(2, handleResponse(response));
|
|
2074
|
+
}
|
|
2075
|
+
}, _callee7);
|
|
2076
|
+
}));
|
|
2077
|
+
return function fetchEDRJson(_x1) {
|
|
2078
|
+
return _ref7.apply(this, arguments);
|
|
2079
|
+
};
|
|
2080
|
+
}();
|
|
2081
|
+
// EDR labels can be plain strings or language maps (e.g. { en: 'Temperature' }).
|
|
2082
|
+
var normalizeEDRLabel = function normalizeEDRLabel(label, fallback) {
|
|
2083
|
+
if (typeof label === 'string' && label) {
|
|
2084
|
+
return label;
|
|
2085
|
+
}
|
|
2086
|
+
if (label && _typeof(label) === 'object' && 'en' in label) {
|
|
2087
|
+
if (typeof label.en === 'string' && label.en) {
|
|
2088
|
+
return label.en;
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
return fallback;
|
|
2092
|
+
};
|
|
1783
2093
|
|
|
1784
2094
|
/* *
|
|
1785
2095
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1906,13 +2216,14 @@ var useEDRGetCollectionDetails = function useEDRGetCollectionDetails(edrBaseUrlW
|
|
|
1906
2216
|
return useQuery(webmapEDRQueryOptions.getCollectionDetailsQuery(edrBaseUrlWithCollection, enabled, instanceId));
|
|
1907
2217
|
};
|
|
1908
2218
|
var useEDRGetParameterData = function useEDRGetParameterData(edrBaseUrlWithCollection, parameterName) {
|
|
2219
|
+
var _datetime$length;
|
|
1909
2220
|
var datetime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
1910
2221
|
var instanceId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
1911
2222
|
var _useEDRGetCollectionD = useEDRGetCollectionDetails(edrBaseUrlWithCollection, instanceId),
|
|
1912
2223
|
collection = _useEDRGetCollectionD.data;
|
|
1913
2224
|
return useQuery({
|
|
1914
2225
|
staleTime: DEFAULT_STALE_TIME$1,
|
|
1915
|
-
queryKey: generateWebmapQueryKeys(['get-parameter-data', edrBaseUrlWithCollection, instanceId, parameterName, datetime]),
|
|
2226
|
+
queryKey: generateWebmapQueryKeys(['get-parameter-data', edrBaseUrlWithCollection, instanceId, parameterName, datetime !== null && datetime !== void 0 ? datetime : '']),
|
|
1916
2227
|
queryFn: function () {
|
|
1917
2228
|
var _queryFn2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
1918
2229
|
var data;
|
|
@@ -1920,7 +2231,7 @@ var useEDRGetParameterData = function useEDRGetParameterData(edrBaseUrlWithColle
|
|
|
1920
2231
|
while (1) switch (_context2.n) {
|
|
1921
2232
|
case 0:
|
|
1922
2233
|
_context2.n = 1;
|
|
1923
|
-
return fetchEDRParameter(collection, edrBaseUrlWithCollection, parameterName, datetime, instanceId);
|
|
2234
|
+
return fetchEDRParameter(collection, edrBaseUrlWithCollection, parameterName, datetime !== null && datetime !== void 0 ? datetime : '', instanceId);
|
|
1924
2235
|
case 1:
|
|
1925
2236
|
data = _context2.v;
|
|
1926
2237
|
return _context2.a(2, coverageCollectionToFeatureCollection(data, parameterName));
|
|
@@ -1932,7 +2243,7 @@ var useEDRGetParameterData = function useEDRGetParameterData(edrBaseUrlWithColle
|
|
|
1932
2243
|
}
|
|
1933
2244
|
return queryFn;
|
|
1934
2245
|
}(),
|
|
1935
|
-
enabled: collection !== undefined && parameterName.length > 0 && datetime.length > 0
|
|
2246
|
+
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
2247
|
});
|
|
1937
2248
|
};
|
|
1938
2249
|
|
|
@@ -3517,7 +3828,7 @@ var getDimensionsList = function getDimensionsList(dimensions) {
|
|
|
3517
3828
|
};
|
|
3518
3829
|
|
|
3519
3830
|
var LayerInfoDialog = function LayerInfoDialog(_ref) {
|
|
3520
|
-
var _layer$styles, _layer$styles2, _layer$path, _layer$keywords;
|
|
3831
|
+
var _layer$styles, _layer$styles2, _edrParameterMetadata, _edrParameterMetadata2, _edrParameterMetadata3, _layer$path, _layer$keywords;
|
|
3521
3832
|
var onClose = _ref.onClose,
|
|
3522
3833
|
layer = _ref.layer,
|
|
3523
3834
|
serviceName = _ref.serviceName,
|
|
@@ -3537,7 +3848,8 @@ var LayerInfoDialog = function LayerInfoDialog(_ref) {
|
|
|
3537
3848
|
} : _ref$startPosition,
|
|
3538
3849
|
selectedStyle = _ref.selectedStyle,
|
|
3539
3850
|
showLayerLegend = _ref.showLayerLegend,
|
|
3540
|
-
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility
|
|
3851
|
+
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility,
|
|
3852
|
+
edrParameterMetadata = _ref.edrParameterMetadata;
|
|
3541
3853
|
var styles = getLayerStyles(layer);
|
|
3542
3854
|
var dimensions = getDimensionsList(layer.dimensions);
|
|
3543
3855
|
var _useWebmapReactTransl = useWebmapReactTranslation(),
|
|
@@ -3570,6 +3882,17 @@ var LayerInfoDialog = function LayerInfoDialog(_ref) {
|
|
|
3570
3882
|
}), jsx(LayerInfoText, {
|
|
3571
3883
|
label: t('webmap-react-name'),
|
|
3572
3884
|
value: layer.name
|
|
3885
|
+
}), !!edrParameterMetadata && jsxs(Fragment, {
|
|
3886
|
+
children: [jsx(LayerInfoText, {
|
|
3887
|
+
label: "EDR parameter",
|
|
3888
|
+
value: edrParameterMetadata.id || layer.name
|
|
3889
|
+
}), jsx(LayerInfoText, {
|
|
3890
|
+
label: "Observed property",
|
|
3891
|
+
value: ((_edrParameterMetadata = edrParameterMetadata.observedProperty) === null || _edrParameterMetadata === void 0 ? void 0 : _edrParameterMetadata.label) || '-'
|
|
3892
|
+
}), jsx(LayerInfoText, {
|
|
3893
|
+
label: "Unit",
|
|
3894
|
+
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) || '-'
|
|
3895
|
+
})]
|
|
3573
3896
|
}), jsx(LayerInfoText, {
|
|
3574
3897
|
label: t('webmap-react-service'),
|
|
3575
3898
|
value: serviceName
|
|
@@ -6984,7 +7307,8 @@ var TimeawareImageSourceWMSLayer = function TimeawareImageSourceWMSLayer(_ref) {
|
|
|
6984
7307
|
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
6985
7308
|
onInitializeLayer = _ref.onInitializeLayer,
|
|
6986
7309
|
onLayerReady = _ref.onLayerReady,
|
|
6987
|
-
onLayerError = _ref.onLayerError
|
|
7310
|
+
onLayerError = _ref.onLayerError,
|
|
7311
|
+
extentRatio = _ref.extentRatio;
|
|
6988
7312
|
var _useContext = useContext(MapContext),
|
|
6989
7313
|
map = _useContext.map;
|
|
6990
7314
|
var _useContext2 = useContext(TimeContext),
|
|
@@ -7027,7 +7351,8 @@ var TimeawareImageSourceWMSLayer = function TimeawareImageSourceWMSLayer(_ref) {
|
|
|
7027
7351
|
styleName: styleName && styleName !== 'default' ? styleName : '',
|
|
7028
7352
|
dimProps: dimensionsValues,
|
|
7029
7353
|
timeStampsToPrefetch: [],
|
|
7030
|
-
visible: visible
|
|
7354
|
+
visible: visible,
|
|
7355
|
+
extentRatio: extentRatio
|
|
7031
7356
|
})
|
|
7032
7357
|
});
|
|
7033
7358
|
map.addLayer(olLayer);
|
|
@@ -11047,7 +11372,8 @@ var OpenLayersLayer = function OpenLayersLayer(layerProps) {
|
|
|
11047
11372
|
layerType = _layerProps$layerType === void 0 ? LayerType.mapLayer : _layerProps$layerType,
|
|
11048
11373
|
_layerProps$tileServe = layerProps.tileServerSettings,
|
|
11049
11374
|
tileServerSettings = _layerProps$tileServe === void 0 ? tilesettings : _layerProps$tileServe,
|
|
11050
|
-
options = layerProps.options
|
|
11375
|
+
options = layerProps.options,
|
|
11376
|
+
extentRatio = layerProps.extentRatio;
|
|
11051
11377
|
var isBaseLayer = layerType === LayerType.baseLayer;
|
|
11052
11378
|
var isOverlay = layerType === LayerType.overLayer;
|
|
11053
11379
|
var layerOptions = useMemo(function () {
|
|
@@ -11065,6 +11391,7 @@ var OpenLayersLayer = function OpenLayersLayer(layerProps) {
|
|
|
11065
11391
|
return jsx(TimeawareImageSourceWMSLayer, {
|
|
11066
11392
|
debugMode: debugMode,
|
|
11067
11393
|
dimensions: dimensions,
|
|
11394
|
+
extentRatio: extentRatio,
|
|
11068
11395
|
getCapsURL: service,
|
|
11069
11396
|
layerId: id,
|
|
11070
11397
|
layerName: name,
|
|
@@ -14525,4 +14852,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
14525
14852
|
return updateObject;
|
|
14526
14853
|
};
|
|
14527
14854
|
|
|
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 };
|
|
14855
|
+
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>;
|
|
@@ -16,5 +16,6 @@ export interface OpenLayersLayerProps extends LayerFoundation {
|
|
|
16
16
|
onClickFeature?: (event?: FeatureEvent) => void;
|
|
17
17
|
onHoverFeature?: (event: FeatureEvent) => void;
|
|
18
18
|
tileServerSettings?: TileServerSettings;
|
|
19
|
+
extentRatio?: number;
|
|
19
20
|
}
|
|
20
21
|
export declare const OpenLayersLayer: (layerProps: OpenLayersLayerProps) => React.ReactElement | null;
|
|
@@ -13,6 +13,7 @@ interface TimeawareImageSourceWMSLayerProps {
|
|
|
13
13
|
onLayerReady?: (layerId: string) => void;
|
|
14
14
|
onLayerError?: (layerId: string, message: string) => void;
|
|
15
15
|
debugMode?: boolean;
|
|
16
|
+
extentRatio?: number;
|
|
16
17
|
}
|
|
17
18
|
export declare const TimeawareImageSourceWMSLayer: React.FC<TimeawareImageSourceWMSLayerProps>;
|
|
18
19
|
export {};
|
|
@@ -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,21 @@ declare class TimeAwareImageWrapper extends ImageWrapper {
|
|
|
30
31
|
private _resolvers;
|
|
31
32
|
private _styleName;
|
|
32
33
|
private _layerName;
|
|
34
|
+
private _extentRatio;
|
|
35
|
+
private _compositeImageKey;
|
|
36
|
+
private _compositeImage;
|
|
33
37
|
constructor(extent: Extent, resolution: number, pixelRatio: number);
|
|
38
|
+
setExtentRatio(extentRatio: number): void;
|
|
34
39
|
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
40
|
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
41
|
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;
|
|
42
|
+
private createCompositeImage;
|
|
37
43
|
setGeoReferencedImage(image: TimeAwareGeoreferencedImage): void;
|
|
38
44
|
load(): void;
|
|
39
45
|
setState(state: number): void;
|
|
40
46
|
private _rejectAll;
|
|
41
47
|
private _resolveAll;
|
|
42
48
|
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>;
|
|
49
|
+
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
50
|
}
|
|
44
51
|
export default TimeAwareImageWrapper;
|
|
@@ -14,6 +14,7 @@ interface TimeawareImageSourceOptions {
|
|
|
14
14
|
styleName?: string | undefined;
|
|
15
15
|
timeStampsToPrefetch?: string[];
|
|
16
16
|
visible?: boolean;
|
|
17
|
+
extentRatio?: number;
|
|
17
18
|
}
|
|
18
19
|
export declare class TimeawareImageSource extends ImageSource {
|
|
19
20
|
private _wmsUrl;
|
|
@@ -39,7 +40,8 @@ export declare class TimeawareImageSource extends ImageSource {
|
|
|
39
40
|
private throttledImageLoad;
|
|
40
41
|
private _layerId;
|
|
41
42
|
private _failedImageRetryTimer;
|
|
42
|
-
|
|
43
|
+
private _extentRatio;
|
|
44
|
+
constructor({ wmsUrl, timeStampsToPrefetch, layerName, layerId, styleName, dimProps, params, visible, extentRatio, }: TimeawareImageSourceOptions);
|
|
43
45
|
private _conditionalPrefetch;
|
|
44
46
|
private _loadImagery;
|
|
45
47
|
private prefetch;
|
|
@@ -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-nightly-20261017",
|
|
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-nightly-20261017",
|
|
24
|
+
"@opengeoweb/theme": "20.1.0-nightly-20261017",
|
|
25
|
+
"@opengeoweb/shared": "20.1.0-nightly-20261017",
|
|
26
26
|
"lodash": "^4.18.1",
|
|
27
27
|
"ol": "^10.4.0",
|
|
28
28
|
"proj4": "^2.9.2",
|