@opengeoweb/webmap-react 21.1.0-nightly-20261110 → 21.1.0-nightly-20261111
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
CHANGED
|
@@ -16,6 +16,8 @@ import { Visibility, VisibilityOff, arrowUpPath, Home, Add, Minus, List, Equaliz
|
|
|
16
16
|
import 'i18next';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
18
|
import { useQuery, queryOptions } from '@tanstack/react-query';
|
|
19
|
+
import { toLonLat, fromLonLat, get, equivalent, transformExtent, transform } from 'ol/proj';
|
|
20
|
+
import { getDistance, getLength } from 'ol/sphere.js';
|
|
19
21
|
import { Point, MultiPoint, Polygon, LineString } from 'ol/geom';
|
|
20
22
|
import { Style, Icon as Icon$1, Circle, Stroke, Fill, Text } from 'ol/style';
|
|
21
23
|
import Box$1 from '@mui/material/Box';
|
|
@@ -26,7 +28,6 @@ import 'ol/ol.css';
|
|
|
26
28
|
import { listen, unlistenByKey } from 'ol/events';
|
|
27
29
|
import { unByKey } from 'ol/Observable';
|
|
28
30
|
import EventType from 'ol/pointer/EventType';
|
|
29
|
-
import { toLonLat, get, equivalent, fromLonLat, transformExtent, transform } from 'ol/proj';
|
|
30
31
|
import { equals as equals$1, closestOnSegment } from 'ol/coordinate';
|
|
31
32
|
import { noModifierKeys, never, platformModifierKeyOnly, always } from 'ol/events/condition';
|
|
32
33
|
import Modify from 'ol/interaction/Modify';
|
|
@@ -49,7 +50,6 @@ import TileLayer$1 from 'ol/layer/WebGLTile';
|
|
|
49
50
|
import { fromCircle } from 'ol/geom/Polygon';
|
|
50
51
|
import { createBox, createRegularPolygon } from 'ol/interaction/Draw';
|
|
51
52
|
import VectorLayer from 'ol/layer/Vector';
|
|
52
|
-
import { getLength } from 'ol/sphere.js';
|
|
53
53
|
|
|
54
54
|
var en = {
|
|
55
55
|
"webmap-react-event": "event:",
|
|
@@ -3006,6 +3006,280 @@ var resolvePreferredStyleName$1 = function resolvePreferredStyleName(styleNames,
|
|
|
3006
3006
|
return styleNames[0];
|
|
3007
3007
|
};
|
|
3008
3008
|
|
|
3009
|
+
var emptySources = [];
|
|
3010
|
+
var sources = new WeakMap();
|
|
3011
|
+
var listeners = new WeakMap();
|
|
3012
|
+
var readyLayers = new WeakMap();
|
|
3013
|
+
var notifyListeners = function notifyListeners(map) {
|
|
3014
|
+
var _listeners$get;
|
|
3015
|
+
(_listeners$get = listeners.get(map)) === null || _listeners$get === void 0 || _listeners$get.forEach(function (listener) {
|
|
3016
|
+
return listener();
|
|
3017
|
+
});
|
|
3018
|
+
};
|
|
3019
|
+
/** A layer is ready once its active frames are resolved; until then, no sources does not mean no data. */
|
|
3020
|
+
var isStacFeatureInfoReady = function isStacFeatureInfoReady(map, layerId) {
|
|
3021
|
+
var _readyLayers$get;
|
|
3022
|
+
return Boolean(map && ((_readyLayers$get = readyLayers.get(map)) === null || _readyLayers$get === void 0 ? void 0 : _readyLayers$get.has(layerId)));
|
|
3023
|
+
};
|
|
3024
|
+
var setStacFeatureInfoReady = function setStacFeatureInfoReady(map, layerId, ready) {
|
|
3025
|
+
var _readyLayers$get2;
|
|
3026
|
+
var mapReadyLayers = (_readyLayers$get2 = readyLayers.get(map)) !== null && _readyLayers$get2 !== void 0 ? _readyLayers$get2 : new Set();
|
|
3027
|
+
readyLayers.set(map, mapReadyLayers);
|
|
3028
|
+
if (mapReadyLayers.has(layerId) === ready) {
|
|
3029
|
+
return;
|
|
3030
|
+
}
|
|
3031
|
+
if (ready) {
|
|
3032
|
+
mapReadyLayers.add(layerId);
|
|
3033
|
+
} else {
|
|
3034
|
+
mapReadyLayers["delete"](layerId);
|
|
3035
|
+
}
|
|
3036
|
+
notifyListeners(map);
|
|
3037
|
+
};
|
|
3038
|
+
var getStacFeatureInfoSources = function getStacFeatureInfoSources(map, layerId) {
|
|
3039
|
+
var _sources$get;
|
|
3040
|
+
return map && ((_sources$get = sources.get(map)) === null || _sources$get === void 0 ? void 0 : _sources$get.get(layerId)) || emptySources;
|
|
3041
|
+
};
|
|
3042
|
+
var subscribeStacFeatureInfoSources = function subscribeStacFeatureInfoSources(map, listener) {
|
|
3043
|
+
var _listeners$get2;
|
|
3044
|
+
if (!map) {
|
|
3045
|
+
return function () {};
|
|
3046
|
+
}
|
|
3047
|
+
var mapListeners = (_listeners$get2 = listeners.get(map)) !== null && _listeners$get2 !== void 0 ? _listeners$get2 : new Set();
|
|
3048
|
+
listeners.set(map, mapListeners);
|
|
3049
|
+
mapListeners.add(listener);
|
|
3050
|
+
return function () {
|
|
3051
|
+
mapListeners["delete"](listener);
|
|
3052
|
+
};
|
|
3053
|
+
};
|
|
3054
|
+
/** Register only active raster frames; preloaded frames must not be queried. */
|
|
3055
|
+
var registerStacFeatureInfoSource = function registerStacFeatureInfoSource(map, layerId, source) {
|
|
3056
|
+
var _sources$get2, _mapSources$get;
|
|
3057
|
+
var mapSources = (_sources$get2 = sources.get(map)) !== null && _sources$get2 !== void 0 ? _sources$get2 : new Map();
|
|
3058
|
+
sources.set(map, mapSources);
|
|
3059
|
+
mapSources.set(layerId, [].concat(_toConsumableArray((_mapSources$get = mapSources.get(layerId)) !== null && _mapSources$get !== void 0 ? _mapSources$get : []), [source]));
|
|
3060
|
+
notifyListeners(map);
|
|
3061
|
+
return function () {
|
|
3062
|
+
var _mapSources$get2;
|
|
3063
|
+
var remaining = ((_mapSources$get2 = mapSources.get(layerId)) !== null && _mapSources$get2 !== void 0 ? _mapSources$get2 : []).filter(function (entry) {
|
|
3064
|
+
return entry !== source;
|
|
3065
|
+
});
|
|
3066
|
+
if (remaining.length) {
|
|
3067
|
+
mapSources.set(layerId, remaining);
|
|
3068
|
+
} else {
|
|
3069
|
+
mapSources["delete"](layerId);
|
|
3070
|
+
}
|
|
3071
|
+
notifyListeners(map);
|
|
3072
|
+
};
|
|
3073
|
+
};
|
|
3074
|
+
var MAX_OPEN_TIFFS = 16;
|
|
3075
|
+
var openTiffs = new Map();
|
|
3076
|
+
var loadTiff = /*#__PURE__*/function () {
|
|
3077
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(url) {
|
|
3078
|
+
var _yield$import, fromUrl;
|
|
3079
|
+
return _regenerator().w(function (_context) {
|
|
3080
|
+
while (1) switch (_context.n) {
|
|
3081
|
+
case 0:
|
|
3082
|
+
_context.n = 1;
|
|
3083
|
+
return import('geotiff');
|
|
3084
|
+
case 1:
|
|
3085
|
+
_yield$import = _context.v;
|
|
3086
|
+
fromUrl = _yield$import.fromUrl;
|
|
3087
|
+
return _context.a(2, fromUrl(url));
|
|
3088
|
+
}
|
|
3089
|
+
}, _callee);
|
|
3090
|
+
}));
|
|
3091
|
+
return function loadTiff(_x) {
|
|
3092
|
+
return _ref.apply(this, arguments);
|
|
3093
|
+
};
|
|
3094
|
+
}();
|
|
3095
|
+
// Remote GeoTIFF sources hold no resources, so evicted entries need no close().
|
|
3096
|
+
var openTiff = /*#__PURE__*/function () {
|
|
3097
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(url) {
|
|
3098
|
+
var cached, tiff, _t;
|
|
3099
|
+
return _regenerator().w(function (_context2) {
|
|
3100
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
3101
|
+
case 0:
|
|
3102
|
+
cached = openTiffs.get(url);
|
|
3103
|
+
if (!cached) {
|
|
3104
|
+
_context2.n = 1;
|
|
3105
|
+
break;
|
|
3106
|
+
}
|
|
3107
|
+
openTiffs["delete"](url);
|
|
3108
|
+
openTiffs.set(url, cached);
|
|
3109
|
+
return _context2.a(2, cached);
|
|
3110
|
+
case 1:
|
|
3111
|
+
tiff = loadTiff(url);
|
|
3112
|
+
openTiffs.set(url, tiff);
|
|
3113
|
+
if (openTiffs.size > MAX_OPEN_TIFFS) {
|
|
3114
|
+
openTiffs["delete"](openTiffs.keys().next().value);
|
|
3115
|
+
}
|
|
3116
|
+
_context2.p = 2;
|
|
3117
|
+
_context2.n = 3;
|
|
3118
|
+
return tiff;
|
|
3119
|
+
case 3:
|
|
3120
|
+
return _context2.a(2, _context2.v);
|
|
3121
|
+
case 4:
|
|
3122
|
+
_context2.p = 4;
|
|
3123
|
+
_t = _context2.v;
|
|
3124
|
+
if (openTiffs.get(url) === tiff) {
|
|
3125
|
+
openTiffs["delete"](url);
|
|
3126
|
+
}
|
|
3127
|
+
throw _t;
|
|
3128
|
+
case 5:
|
|
3129
|
+
return _context2.a(2);
|
|
3130
|
+
}
|
|
3131
|
+
}, _callee2, null, [[2, 4]]);
|
|
3132
|
+
}));
|
|
3133
|
+
return function openTiff(_x2) {
|
|
3134
|
+
return _ref2.apply(this, arguments);
|
|
3135
|
+
};
|
|
3136
|
+
}();
|
|
3137
|
+
var clearStacFeatureInfoCache = function clearStacFeatureInfoCache() {
|
|
3138
|
+
openTiffs.clear();
|
|
3139
|
+
};
|
|
3140
|
+
var getPixel = function getPixel(image, x, y) {
|
|
3141
|
+
var matrix = image.getFileDirectory().getValue('ModelTransformation');
|
|
3142
|
+
if (matrix) {
|
|
3143
|
+
var determinant = matrix[0] * matrix[5] - matrix[1] * matrix[4];
|
|
3144
|
+
if (!determinant) {
|
|
3145
|
+
throw new Error('GeoTIFF has an invalid coordinate transform');
|
|
3146
|
+
}
|
|
3147
|
+
var dx = x - matrix[3];
|
|
3148
|
+
var dy = y - matrix[7];
|
|
3149
|
+
return [Math.floor((matrix[5] * dx - matrix[1] * dy) / determinant), Math.floor((matrix[0] * dy - matrix[4] * dx) / determinant)];
|
|
3150
|
+
}
|
|
3151
|
+
var _image$getOrigin = image.getOrigin(),
|
|
3152
|
+
_image$getOrigin2 = _slicedToArray(_image$getOrigin, 2),
|
|
3153
|
+
originX = _image$getOrigin2[0],
|
|
3154
|
+
originY = _image$getOrigin2[1];
|
|
3155
|
+
var _image$getResolution = image.getResolution(),
|
|
3156
|
+
_image$getResolution2 = _slicedToArray(_image$getResolution, 2),
|
|
3157
|
+
resolutionX = _image$getResolution2[0],
|
|
3158
|
+
resolutionY = _image$getResolution2[1];
|
|
3159
|
+
return [Math.floor((x - originX) / resolutionX), Math.floor((y - originY) / resolutionY)];
|
|
3160
|
+
};
|
|
3161
|
+
var getPixelCenter = function getPixelCenter(image, column, row) {
|
|
3162
|
+
var matrix = image.getFileDirectory().getValue('ModelTransformation');
|
|
3163
|
+
var pixelCenterX = column + 0.5;
|
|
3164
|
+
var pixelCenterY = row + 0.5;
|
|
3165
|
+
if (matrix) {
|
|
3166
|
+
return [matrix[0] * pixelCenterX + matrix[1] * pixelCenterY + matrix[3], matrix[4] * pixelCenterX + matrix[5] * pixelCenterY + matrix[7]];
|
|
3167
|
+
}
|
|
3168
|
+
var _image$getOrigin3 = image.getOrigin(),
|
|
3169
|
+
_image$getOrigin4 = _slicedToArray(_image$getOrigin3, 2),
|
|
3170
|
+
originX = _image$getOrigin4[0],
|
|
3171
|
+
originY = _image$getOrigin4[1];
|
|
3172
|
+
var _image$getResolution3 = image.getResolution(),
|
|
3173
|
+
_image$getResolution4 = _slicedToArray(_image$getResolution3, 2),
|
|
3174
|
+
resolutionX = _image$getResolution4[0],
|
|
3175
|
+
resolutionY = _image$getResolution4[1];
|
|
3176
|
+
return [originX + pixelCenterX * resolutionX, originY + pixelCenterY * resolutionY];
|
|
3177
|
+
};
|
|
3178
|
+
/** Read the original first-band sample, not an overview or normalized display value. */
|
|
3179
|
+
var readStacPointValue = /*#__PURE__*/function () {
|
|
3180
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(source, location, signal) {
|
|
3181
|
+
var _source$bbox, _geoKeys$ProjectedCST, _source$projection, _ref4, _source$nodata, _source$band, _source$band$scale, _source$band2, _source$band$offset, _source$band3, _source$band4;
|
|
3182
|
+
var _source$bbox2, west, south, east, north, outsideLongitude, tiff, image, geoKeys, epsg, projection, _fromLonLat, _fromLonLat2, x, y, _getPixel, _getPixel2, column, row, raster, raw, nodata, value, _toLonLat, _toLonLat2, gridLon, gridLat, gridPoint;
|
|
3183
|
+
return _regenerator().w(function (_context3) {
|
|
3184
|
+
while (1) switch (_context3.n) {
|
|
3185
|
+
case 0:
|
|
3186
|
+
if (!(((_source$bbox = source.bbox) === null || _source$bbox === void 0 ? void 0 : _source$bbox.length) === 4)) {
|
|
3187
|
+
_context3.n = 1;
|
|
3188
|
+
break;
|
|
3189
|
+
}
|
|
3190
|
+
_source$bbox2 = _slicedToArray(source.bbox, 4), west = _source$bbox2[0], south = _source$bbox2[1], east = _source$bbox2[2], north = _source$bbox2[3]; // A bbox crossing the antimeridian covers either side of +/-180 degrees.
|
|
3191
|
+
outsideLongitude = west > east ? location.lon < west && location.lon > east : location.lon < west || location.lon > east;
|
|
3192
|
+
if (!(outsideLongitude || location.lat < south || location.lat > north)) {
|
|
3193
|
+
_context3.n = 1;
|
|
3194
|
+
break;
|
|
3195
|
+
}
|
|
3196
|
+
return _context3.a(2, undefined);
|
|
3197
|
+
case 1:
|
|
3198
|
+
signal === null || signal === void 0 || signal.throwIfAborted();
|
|
3199
|
+
// The shared TIFF is not tied to this query's signal, so aborting one
|
|
3200
|
+
// click cannot poison the cached header read for later clicks.
|
|
3201
|
+
_context3.n = 2;
|
|
3202
|
+
return openTiff(source.url);
|
|
3203
|
+
case 2:
|
|
3204
|
+
tiff = _context3.v;
|
|
3205
|
+
signal === null || signal === void 0 || signal.throwIfAborted();
|
|
3206
|
+
_context3.n = 3;
|
|
3207
|
+
return tiff.getImage();
|
|
3208
|
+
case 3:
|
|
3209
|
+
image = _context3.v;
|
|
3210
|
+
signal === null || signal === void 0 || signal.throwIfAborted();
|
|
3211
|
+
geoKeys = image.getGeoKeys();
|
|
3212
|
+
epsg = (_geoKeys$ProjectedCST = geoKeys === null || geoKeys === void 0 ? void 0 : geoKeys.ProjectedCSTypeGeoKey) !== null && _geoKeys$ProjectedCST !== void 0 ? _geoKeys$ProjectedCST : geoKeys === null || geoKeys === void 0 ? void 0 : geoKeys.GeographicTypeGeoKey;
|
|
3213
|
+
projection = (_source$projection = source.projection) !== null && _source$projection !== void 0 ? _source$projection : epsg && epsg !== 32767 ? "EPSG:".concat(epsg) : undefined;
|
|
3214
|
+
if (projection) {
|
|
3215
|
+
_context3.n = 4;
|
|
3216
|
+
break;
|
|
3217
|
+
}
|
|
3218
|
+
throw new Error('GeoTIFF projection is unavailable');
|
|
3219
|
+
case 4:
|
|
3220
|
+
if (get(projection)) {
|
|
3221
|
+
_context3.n = 5;
|
|
3222
|
+
break;
|
|
3223
|
+
}
|
|
3224
|
+
throw new Error("GeoTIFF projection ".concat(projection, " is not registered"));
|
|
3225
|
+
case 5:
|
|
3226
|
+
_fromLonLat = fromLonLat([location.lon, location.lat], projection), _fromLonLat2 = _slicedToArray(_fromLonLat, 2), x = _fromLonLat2[0], y = _fromLonLat2[1];
|
|
3227
|
+
_getPixel = getPixel(image, x, y), _getPixel2 = _slicedToArray(_getPixel, 2), column = _getPixel2[0], row = _getPixel2[1];
|
|
3228
|
+
if (!(!Number.isFinite(column) || !Number.isFinite(row) || column < 0 || row < 0 || column >= image.getWidth() || row >= image.getHeight())) {
|
|
3229
|
+
_context3.n = 6;
|
|
3230
|
+
break;
|
|
3231
|
+
}
|
|
3232
|
+
return _context3.a(2, undefined);
|
|
3233
|
+
case 6:
|
|
3234
|
+
if (!(!source.band && image.getSamplesPerPixel() > 1)) {
|
|
3235
|
+
_context3.n = 7;
|
|
3236
|
+
break;
|
|
3237
|
+
}
|
|
3238
|
+
return _context3.a(2, undefined);
|
|
3239
|
+
case 7:
|
|
3240
|
+
_context3.n = 8;
|
|
3241
|
+
return image.readRasters({
|
|
3242
|
+
window: [column, row, column + 1, row + 1],
|
|
3243
|
+
samples: [0],
|
|
3244
|
+
interleave: true,
|
|
3245
|
+
signal: signal
|
|
3246
|
+
});
|
|
3247
|
+
case 8:
|
|
3248
|
+
raster = _context3.v;
|
|
3249
|
+
raw = Number(raster[0]);
|
|
3250
|
+
nodata = (_ref4 = (_source$nodata = source.nodata) !== null && _source$nodata !== void 0 ? _source$nodata : (_source$band = source.band) === null || _source$band === void 0 ? void 0 : _source$band.nodata) !== null && _ref4 !== void 0 ? _ref4 : image.getGDALNoData();
|
|
3251
|
+
if (!(!Number.isFinite(raw) || nodata !== null && nodata !== undefined && raw === Number(nodata))) {
|
|
3252
|
+
_context3.n = 9;
|
|
3253
|
+
break;
|
|
3254
|
+
}
|
|
3255
|
+
return _context3.a(2, undefined);
|
|
3256
|
+
case 9:
|
|
3257
|
+
value = raw * ((_source$band$scale = (_source$band2 = source.band) === null || _source$band2 === void 0 ? void 0 : _source$band2.scale) !== null && _source$band$scale !== void 0 ? _source$band$scale : 1) + ((_source$band$offset = (_source$band3 = source.band) === null || _source$band3 === void 0 ? void 0 : _source$band3.offset) !== null && _source$band$offset !== void 0 ? _source$band$offset : 0);
|
|
3258
|
+
if (Number.isFinite(value)) {
|
|
3259
|
+
_context3.n = 10;
|
|
3260
|
+
break;
|
|
3261
|
+
}
|
|
3262
|
+
return _context3.a(2, undefined);
|
|
3263
|
+
case 10:
|
|
3264
|
+
_toLonLat = toLonLat(getPixelCenter(image, column, row), projection), _toLonLat2 = _slicedToArray(_toLonLat, 2), gridLon = _toLonLat2[0], gridLat = _toLonLat2[1];
|
|
3265
|
+
gridPoint = {
|
|
3266
|
+
lon: gridLon,
|
|
3267
|
+
lat: gridLat
|
|
3268
|
+
};
|
|
3269
|
+
return _context3.a(2, {
|
|
3270
|
+
value: value,
|
|
3271
|
+
unit: (_source$band4 = source.band) === null || _source$band4 === void 0 ? void 0 : _source$band4.unit,
|
|
3272
|
+
gridPoint: gridPoint,
|
|
3273
|
+
distanceKm: getDistance([location.lon, location.lat], [gridLon, gridLat]) / 1000
|
|
3274
|
+
});
|
|
3275
|
+
}
|
|
3276
|
+
}, _callee3);
|
|
3277
|
+
}));
|
|
3278
|
+
return function readStacPointValue(_x3, _x4, _x5) {
|
|
3279
|
+
return _ref3.apply(this, arguments);
|
|
3280
|
+
};
|
|
3281
|
+
}();
|
|
3282
|
+
|
|
3009
3283
|
/* *
|
|
3010
3284
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3011
3285
|
* you may not use this file except in compliance with the License.
|
|
@@ -10056,7 +10330,8 @@ var GeoTIFFLayer = function GeoTIFFLayer(_ref) {
|
|
|
10056
10330
|
normalize = _ref$normalize === void 0 ? false : _ref$normalize,
|
|
10057
10331
|
nodata = _ref.nodata,
|
|
10058
10332
|
min = _ref.min,
|
|
10059
|
-
max = _ref.max
|
|
10333
|
+
max = _ref.max,
|
|
10334
|
+
featureInfo = _ref.featureInfo;
|
|
10060
10335
|
var _useContext = useContext(MapContext),
|
|
10061
10336
|
map = _useContext.map;
|
|
10062
10337
|
var layerRef = useRef(undefined);
|
|
@@ -10065,6 +10340,27 @@ var GeoTIFFLayer = function GeoTIFFLayer(_ref) {
|
|
|
10065
10340
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10066
10341
|
initialized = _useState2[0],
|
|
10067
10342
|
setInitialized = _useState2[1];
|
|
10343
|
+
var featureInfoLayerId = featureInfo === null || featureInfo === void 0 ? void 0 : featureInfo.layerId;
|
|
10344
|
+
var featureInfoItemId = featureInfo === null || featureInfo === void 0 ? void 0 : featureInfo.itemId;
|
|
10345
|
+
var featureInfoBand = featureInfo === null || featureInfo === void 0 ? void 0 : featureInfo.band;
|
|
10346
|
+
var featureInfoDatetime = featureInfo === null || featureInfo === void 0 ? void 0 : featureInfo.datetime;
|
|
10347
|
+
var featureInfoNodata = featureInfo === null || featureInfo === void 0 ? void 0 : featureInfo.nodata;
|
|
10348
|
+
var featureInfoBbox = featureInfo === null || featureInfo === void 0 ? void 0 : featureInfo.bbox;
|
|
10349
|
+
var enabled = layerProps === null || layerProps === void 0 ? void 0 : layerProps.enabled;
|
|
10350
|
+
useEffect(function () {
|
|
10351
|
+
if (!map || !shouldRender || !enabled || !featureInfoLayerId || !featureInfoItemId) {
|
|
10352
|
+
return undefined;
|
|
10353
|
+
}
|
|
10354
|
+
return registerStacFeatureInfoSource(map, featureInfoLayerId, {
|
|
10355
|
+
itemId: featureInfoItemId,
|
|
10356
|
+
url: url,
|
|
10357
|
+
projection: projection,
|
|
10358
|
+
band: featureInfoBand,
|
|
10359
|
+
datetime: featureInfoDatetime,
|
|
10360
|
+
nodata: featureInfoNodata,
|
|
10361
|
+
bbox: featureInfoBbox
|
|
10362
|
+
});
|
|
10363
|
+
}, [map, shouldRender, enabled, featureInfoLayerId, featureInfoItemId, featureInfoBand, featureInfoDatetime, featureInfoNodata, featureInfoBbox, url, projection]);
|
|
10068
10364
|
// Only create the layer once
|
|
10069
10365
|
useEffect(function () {
|
|
10070
10366
|
if (!map || !layerName || layerRef.current || !url || !shouldRender) {
|
|
@@ -11274,6 +11570,20 @@ var TimeAwareGeoTIFFLayer = function TimeAwareGeoTIFFLayer(_ref6) {
|
|
|
11274
11570
|
return rasterAssetKeys.has(itemId);
|
|
11275
11571
|
}));
|
|
11276
11572
|
}, [rasterAssetKeys, rasterFrameItems]);
|
|
11573
|
+
var isFeatureInfoReady = Boolean(collectionData) && Boolean(items !== null && items !== void 0 ? items : displayedItems) && !(isFetching && !isTiledCollection) && !isWaitingForRasterQuery && !isWaitingForManualSelectionQuery && !isWaitingForRasterSelection;
|
|
11574
|
+
React.useEffect(function () {
|
|
11575
|
+
if (!map || !layerId) {
|
|
11576
|
+
return undefined;
|
|
11577
|
+
}
|
|
11578
|
+
return function () {
|
|
11579
|
+
setStacFeatureInfoReady(map, layerId, false);
|
|
11580
|
+
};
|
|
11581
|
+
}, [map, layerId]);
|
|
11582
|
+
React.useEffect(function () {
|
|
11583
|
+
if (map && layerId) {
|
|
11584
|
+
setStacFeatureInfoReady(map, layerId, isFeatureInfoReady);
|
|
11585
|
+
}
|
|
11586
|
+
}, [map, layerId, isFeatureInfoReady]);
|
|
11277
11587
|
var getFrameBand = React.useCallback(function (item, resolvedAssetKey) {
|
|
11278
11588
|
var _ref10, _getStacRasterBands$, _getStacRasterBands, _collectionData$item_, _collectionData$summa;
|
|
11279
11589
|
return (_ref10 = (_getStacRasterBands$ = (_getStacRasterBands = getStacRasterBands(item, resolvedAssetKey)) === null || _getStacRasterBands === void 0 ? void 0 : _getStacRasterBands[0]) !== null && _getStacRasterBands$ !== void 0 ? _getStacRasterBands$ : collectionData === null || collectionData === void 0 || (_collectionData$item_ = collectionData.item_assets) === null || _collectionData$item_ === void 0 || (_collectionData$item_ = _collectionData$item_[resolvedAssetKey]) === null || _collectionData$item_ === void 0 || (_collectionData$item_ = _collectionData$item_['raster:bands']) === null || _collectionData$item_ === void 0 ? void 0 : _collectionData$item_[0]) !== null && _ref10 !== void 0 ? _ref10 : collectionData === null || collectionData === void 0 || (_collectionData$summa = collectionData.summaries) === null || _collectionData$summa === void 0 || (_collectionData$summa = _collectionData$summa['raster:bands']) === null || _collectionData$summa === void 0 ? void 0 : _collectionData$summa[0];
|
|
@@ -11432,6 +11742,14 @@ var TimeAwareGeoTIFFLayer = function TimeAwareGeoTIFFLayer(_ref6) {
|
|
|
11432
11742
|
var nodata = (_renderEntry$nodata = renderEntry === null || renderEntry === void 0 ? void 0 : renderEntry.nodata) !== null && _renderEntry$nodata !== void 0 ? _renderEntry$nodata : band === null || band === void 0 ? void 0 : band.nodata;
|
|
11433
11743
|
var projection = (_ref16 = (_item$properties$proj = item.properties['proj:wkt2']) !== null && _item$properties$proj !== void 0 ? _item$properties$proj : item.properties['proj:code']) !== null && _ref16 !== void 0 ? _ref16 : item.properties['proj:epsg'] ? "EPSG:".concat(item.properties['proj:epsg']) : undefined;
|
|
11434
11744
|
return jsx(GeoTIFFLayer, {
|
|
11745
|
+
featureInfo: isSelected && layerId ? {
|
|
11746
|
+
layerId: layerId,
|
|
11747
|
+
itemId: item.id,
|
|
11748
|
+
band: band,
|
|
11749
|
+
datetime: item.properties.datetime,
|
|
11750
|
+
nodata: renderEntry === null || renderEntry === void 0 ? void 0 : renderEntry.nodata,
|
|
11751
|
+
bbox: item.bbox
|
|
11752
|
+
} : undefined,
|
|
11435
11753
|
geotiffStyle: geotiffStyle,
|
|
11436
11754
|
layerName: "".concat(item.id, "-").concat(resolvedAssetKey),
|
|
11437
11755
|
layerOptions: {
|
|
@@ -15736,4 +16054,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
15736
16054
|
return updateObject;
|
|
15737
16055
|
};
|
|
15738
16056
|
|
|
15739
|
-
export { BaseLayerType, CLASSNAME_MAP_MEASURE_TOOLTIP, CONSTRAINED_SELECTION_TYPES, COORDINATE_DECIMALS, ClickOnMapTool, Clock, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EDR_PLAIN_NUMBERS_STYLE, 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, StacLegendCanvas, StoryLayoutGrid, TRANSIENT_FEATURE_PROPERTIES, TimeAwareEDRLocationLayer, TimeAwareGeoTIFFLayer, TimeAwareWMTSLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, applyStacNodataMask, 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, edrCollectionsToServiceLayers, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureMultiPoint, featurePoint, featurePolygon, fetchEDRArea, fetchEDRCollectionDetails, fetchEDRCube, fetchEDRJson, fetchEDRParameter, fetchEDRServiceLayers, fetchStacCatalogCollections, fetchStacCatalogRoot, fetchStacCollection, fetchStacItem, fetchStacItems, fetchStacItemsPage, fetchStacItemsWithPagination, fillOptions, firSelectionType, formatEDRValue, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getAffectedIndices, getBoxRotateHandlePoints, getBoxSelectPreviewStyle, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getEDRUnitLabel, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerExtentForProjection, getLayerStyles, getLayerUpdateInfo, getLegendClass, getOlFeatureKey, getProj4, getRendersAsStyles, getStacAssetKeyFromStyle, getStacAssetStyles, getStacCollectionStyles, getStacFrameItemsToRender, getStacGrayscaleRange, getStacGrayscaleSampleRange, getStacItemLookupWindowForTimes, getStacItemSearchUrl, getStacItemsUrl, getStacLegendMetadata, getStacLegendWidth, getStacRasterBands, getTimeDimension, getToolIcon, getWMSStyleName, 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, makeFeatureStylePlainNumber, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeStacLegendModel, 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, renderStacLegend, resolvePreferredStyleName$1 as resolvePreferredStyleName, resolveStacAssetKey, rewindGeometry, roundCoordinates, roundFeatureCoordinates, selectPreferredWMSProjection, selectPreferredWMTSTileMatrixSet, 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 };
|
|
16057
|
+
export { BaseLayerType, CLASSNAME_MAP_MEASURE_TOOLTIP, CONSTRAINED_SELECTION_TYPES, COORDINATE_DECIMALS, ClickOnMapTool, Clock, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EDR_PLAIN_NUMBERS_STYLE, 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, StacLegendCanvas, StoryLayoutGrid, TRANSIENT_FEATURE_PROPERTIES, TimeAwareEDRLocationLayer, TimeAwareGeoTIFFLayer, TimeAwareWMTSLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, applyStacNodataMask, asNewFeature, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, basicExampleSharedVertexDrawOptions, calculateBoxSelection, calculateNewSelection, catmullRomSpline, clearImageCacheForAllMaps, clearStacFeatureInfoCache, 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, edrCollectionsToServiceLayers, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureMultiPoint, featurePoint, featurePolygon, fetchEDRArea, fetchEDRCollectionDetails, fetchEDRCube, fetchEDRJson, fetchEDRParameter, fetchEDRServiceLayers, fetchStacCatalogCollections, fetchStacCatalogRoot, fetchStacCollection, fetchStacItem, fetchStacItems, fetchStacItemsPage, fetchStacItemsWithPagination, fillOptions, firSelectionType, formatEDRValue, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getAffectedIndices, getBoxRotateHandlePoints, getBoxSelectPreviewStyle, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getEDRUnitLabel, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerExtentForProjection, getLayerStyles, getLayerUpdateInfo, getLegendClass, getOlFeatureKey, getProj4, getRendersAsStyles, getStacAssetKeyFromStyle, getStacAssetStyles, getStacCollectionStyles, getStacFeatureInfoSources, getStacFrameItemsToRender, getStacGrayscaleRange, getStacGrayscaleSampleRange, getStacItemLookupWindowForTimes, getStacItemSearchUrl, getStacItemsUrl, getStacLegendMetadata, getStacLegendWidth, getStacRasterBands, getTimeDimension, getToolIcon, getWMSStyleName, handleResponse, hasEditableVertices, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isDefaultModifiable, isDefaultMovable, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, isStacFeatureInfoReady, joinUrlParams, keepIdentityOnFirstSplitFeature, labelOptions, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStylePlainNumber, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeStacLegendModel, makeTimeList, makeView, marksByDimension, measureResultStyle, measureToolStyle, modifyHandleStyle$1 as modifyHandleStyle, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, normalizeEDRLabel, opacityOptions, openLayersGetMapImageStore, polygonCleanDangling, polygonCleanDanglingCoords, polygonFeatureCollectionCleanDangling, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, readStacPointValue, registerStacFeatureInfoSource, removeFeatureProperties, removeOverlappingLines, removeTransientFeatureProperties, renderStacLegend, resolvePreferredStyleName$1 as resolvePreferredStyleName, resolveStacAssetKey, rewindGeometry, roundCoordinates, roundFeatureCoordinates, selectPreferredWMSProjection, selectPreferredWMTSTileMatrixSet, setMapCenter, setStacFeatureInfoReady, setViewFromExtent, setViewFromFeature, shouldEnterEditMode, shouldExitEditModeForMultiSelect, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, splitLine, splitPolygon, splitStyle, stacCatalogCollectionToLayerProps, stacColormapToOlStyle, stacGrayscaleOlStyle, stacNormalizedGrayscaleOlStyle, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, subscribeStacFeatureInfoSources, 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 };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type ImageLayer from 'ol/layer/Image';
|
|
2
2
|
import type { LayerFoundation } from '@opengeoweb/webmap';
|
|
3
|
+
import type { STACFeatureInfoSource } from '../../../geotiff-layer-api/utils/stacFeatureInfo';
|
|
3
4
|
export interface TiledWMSLayerProps {
|
|
4
5
|
url: string;
|
|
5
6
|
layerName: string;
|
|
@@ -12,5 +13,8 @@ export interface TiledWMSLayerProps {
|
|
|
12
13
|
nodata?: number;
|
|
13
14
|
min?: number;
|
|
14
15
|
max?: number;
|
|
16
|
+
featureInfo?: Omit<STACFeatureInfoSource, 'url' | 'projection'> & {
|
|
17
|
+
layerId: string;
|
|
18
|
+
};
|
|
15
19
|
}
|
|
16
20
|
export declare const GeoTIFFLayer: React.FC<TiledWMSLayerProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Map as OlMap } from 'ol';
|
|
2
|
+
import type { STACRasterBand } from '../api';
|
|
3
|
+
export interface STACFeatureInfoSource {
|
|
4
|
+
itemId: string;
|
|
5
|
+
url: string;
|
|
6
|
+
projection?: string;
|
|
7
|
+
band?: STACRasterBand;
|
|
8
|
+
datetime?: string | null;
|
|
9
|
+
nodata?: number | string;
|
|
10
|
+
bbox?: number[];
|
|
11
|
+
}
|
|
12
|
+
export interface STACPointValue {
|
|
13
|
+
value: number;
|
|
14
|
+
unit?: string;
|
|
15
|
+
gridPoint?: {
|
|
16
|
+
lon: number;
|
|
17
|
+
lat: number;
|
|
18
|
+
};
|
|
19
|
+
distanceKm?: number;
|
|
20
|
+
}
|
|
21
|
+
/** A layer is ready once its active frames are resolved; until then, no sources does not mean no data. */
|
|
22
|
+
export declare const isStacFeatureInfoReady: (map: OlMap | null, layerId: string) => boolean;
|
|
23
|
+
export declare const setStacFeatureInfoReady: (map: OlMap, layerId: string, ready: boolean) => void;
|
|
24
|
+
export declare const getStacFeatureInfoSources: (map: OlMap | null, layerId: string) => STACFeatureInfoSource[];
|
|
25
|
+
export declare const subscribeStacFeatureInfoSources: (map: OlMap | null, listener: () => void) => (() => void);
|
|
26
|
+
/** Register only active raster frames; preloaded frames must not be queried. */
|
|
27
|
+
export declare const registerStacFeatureInfoSource: (map: OlMap, layerId: string, source: STACFeatureInfoSource) => (() => void);
|
|
28
|
+
export declare const clearStacFeatureInfoCache: () => void;
|
|
29
|
+
/** Read the original first-band sample, not an overview or normalized display value. */
|
|
30
|
+
export declare const readStacPointValue: (source: STACFeatureInfoSource, location: {
|
|
31
|
+
lon: number;
|
|
32
|
+
lat: number;
|
|
33
|
+
}, signal?: AbortSignal) => Promise<STACPointValue | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "21.1.0-nightly-
|
|
3
|
+
"version": "21.1.0-nightly-20261111",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/webmap": "21.1.0-nightly-
|
|
24
|
-
"@opengeoweb/theme": "21.1.0-nightly-
|
|
25
|
-
"@opengeoweb/shared": "21.1.0-nightly-
|
|
23
|
+
"@opengeoweb/webmap": "21.1.0-nightly-20261111",
|
|
24
|
+
"@opengeoweb/theme": "21.1.0-nightly-20261111",
|
|
25
|
+
"@opengeoweb/shared": "21.1.0-nightly-20261111",
|
|
26
26
|
"lodash": "^4.18.1",
|
|
27
27
|
"ol": "^10.4.0",
|
|
28
|
+
"geotiff": "^3.0.5",
|
|
28
29
|
"proj4": "^2.9.2",
|
|
29
30
|
"@turf/turf": "^7.1.0",
|
|
30
31
|
"immer": "^10.0.3",
|