@opengeoweb/webmap-react 21.3.0-nightly-20261202 → 21.3.0-nightly-20261204

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
@@ -10,7 +10,7 @@ import ImageSource, { getRequestExtent } from 'ol/source/Image';
10
10
  import ImageWrapper from 'ol/Image';
11
11
  import { getImageSrc, getRequestParams, createLoader } from 'ol/source/wms';
12
12
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
13
- import { CustomTooltip, CanvasComponent, useWheelStopPropagation, calculateStartSize, ToolContainerDraggable, CustomIconButton, dateUtils, isDialogFocused, canvasToBlob, useMakeSureContainerStaysInsideWindow, Draggable, Resizable } from '@opengeoweb/shared';
13
+ import { CustomTooltip, CanvasComponent, useWheelStopPropagation, calculateStartSize, ToolContainerDraggable, CustomIconButton, dateUtils, isDialogFocused, canvasToBlob, createCanvasVideoEncoder, useMakeSureContainerStaysInsideWindow, Draggable, Resizable } from '@opengeoweb/shared';
14
14
  import { useTheme, Card, Box, Typography, Grid, styled, Slider, FormGroup, FormControlLabel, Checkbox, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$2, FormLabel, Switch, Paper, ThemeProvider } from '@mui/material';
15
15
  import { Visibility, VisibilityOff, arrowUpPath, Home, Add, Minus, List, Equalizer, DimensionsElevation, Link, LinkOff, Info, DimensionsOther, DimensionsRefTime, DimensionsTime, locationPath, rotatePath, DrawToolSplitFeature, Location, DrawToolSmoothLine, DrawToolFreehand, DrawToolOval, DrawToolCircle, DrawToolSquare, Delete, DrawToolLineString, DrawToolRectangle, DrawToolPolygon, DrawToolPoint, DrawFIRLand, ArrowUp, darkTheme, ChevronRight, Options, Clock as Clock$1 } from '@opengeoweb/theme';
16
16
  import 'i18next';
@@ -8699,7 +8699,8 @@ var viewUtils = {
8699
8699
  makeView: makeView
8700
8700
  };
8701
8701
 
8702
- var _excluded = ["timeout"];
8702
+ var _excluded = ["timeout", "signal"],
8703
+ _excluded2 = ["times", "setTime", "animationDelay", "format", "signal", "onProgress"];
8703
8704
  var LAYER_CANVAS_SELECTOR = '.ol-layer canvas, canvas.ol-layer';
8704
8705
  var getCanvasTransform = function getCanvasTransform(canvas) {
8705
8706
  var matrix = /^matrix\(([^(]*)\)$/.exec(canvas.style.transform);
@@ -8771,14 +8772,19 @@ var exportMapToCanvas = /*#__PURE__*/function () {
8771
8772
  var _ref5,
8772
8773
  _ref5$timeout,
8773
8774
  timeout,
8775
+ signal,
8774
8776
  canvasOptions,
8775
8777
  _args = arguments;
8776
8778
  return _regenerator().w(function (_context) {
8777
8779
  while (1) switch (_context.n) {
8778
8780
  case 0:
8779
- _ref5 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref5$timeout = _ref5.timeout, timeout = _ref5$timeout === void 0 ? EXPORT_MAP_TIMEOUT_MS : _ref5$timeout, canvasOptions = _objectWithoutProperties(_ref5, _excluded);
8781
+ _ref5 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref5$timeout = _ref5.timeout, timeout = _ref5$timeout === void 0 ? EXPORT_MAP_TIMEOUT_MS : _ref5$timeout, signal = _ref5.signal, canvasOptions = _objectWithoutProperties(_ref5, _excluded);
8780
8782
  return _context.a(2, new Promise(function (resolve, reject) {
8781
8783
  var _map$getSize2;
8784
+ if (signal !== null && signal !== void 0 && signal.aborted) {
8785
+ reject(signal.reason);
8786
+ return;
8787
+ }
8782
8788
  var _ref6 = (_map$getSize2 = map.getSize()) !== null && _map$getSize2 !== void 0 ? _map$getSize2 : [0, 0],
8783
8789
  _ref7 = _slicedToArray(_ref6, 2),
8784
8790
  width = _ref7[0],
@@ -8787,8 +8793,12 @@ var exportMapToCanvas = /*#__PURE__*/function () {
8787
8793
  reject(new Error('The map has no size'));
8788
8794
  return;
8789
8795
  }
8790
- var onRenderComplete = function onRenderComplete() {
8796
+ var stopWaiting = function stopWaiting() {
8791
8797
  clearTimeout(timer);
8798
+ signal === null || signal === void 0 || signal.removeEventListener('abort', onAbort);
8799
+ };
8800
+ var onRenderComplete = function onRenderComplete() {
8801
+ stopWaiting();
8792
8802
  // Compose inside the listener, WebGL layers clear their canvas afterwards
8793
8803
  try {
8794
8804
  resolve(composeMapCanvas(map, canvasOptions));
@@ -8796,10 +8806,19 @@ var exportMapToCanvas = /*#__PURE__*/function () {
8796
8806
  reject(error);
8797
8807
  }
8798
8808
  };
8809
+ var onAbort = function onAbort() {
8810
+ stopWaiting();
8811
+ map.un('rendercomplete', onRenderComplete);
8812
+ reject(signal.reason);
8813
+ };
8799
8814
  var timer = setTimeout(function () {
8815
+ stopWaiting();
8800
8816
  map.un('rendercomplete', onRenderComplete);
8801
8817
  reject(new Error('Timed out waiting for the map to render'));
8802
8818
  }, timeout);
8819
+ signal === null || signal === void 0 || signal.addEventListener('abort', onAbort, {
8820
+ once: true
8821
+ });
8803
8822
  map.once('rendercomplete', onRenderComplete);
8804
8823
  map.render();
8805
8824
  }));
@@ -8828,6 +8847,133 @@ var exportMapToBlob = /*#__PURE__*/function () {
8828
8847
  return _ref8.apply(this, arguments);
8829
8848
  };
8830
8849
  }();
8850
+ var waitForPendingRender = /*#__PURE__*/function () {
8851
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
8852
+ return _regenerator().w(function (_context3) {
8853
+ while (1) switch (_context3.n) {
8854
+ case 0:
8855
+ return _context3.a(2, new Promise(function (resolve) {
8856
+ setTimeout(resolve, 0);
8857
+ }));
8858
+ }
8859
+ }, _callee3);
8860
+ }));
8861
+ return function waitForPendingRender() {
8862
+ return _ref9.apply(this, arguments);
8863
+ };
8864
+ }();
8865
+ /**
8866
+ * Exports the map as a video by showing each time step on the map and
8867
+ * capturing it once all layers have rendered. The map shows the last time
8868
+ * step afterwards, restoring the time is up to the caller.
8869
+ */
8870
+ var exportMapAnimation = /*#__PURE__*/function () {
8871
+ var _ref1 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(map, _ref0) {
8872
+ var _mapOptions$pixelRati, _map$getSize3;
8873
+ var times, setTime, animationDelay, format, signal, onProgress, mapOptions, pixelRatio, _ref10, _ref11, mapWidth, mapHeight, width, height, encoder, addFrame, index, _t2;
8874
+ return _regenerator().w(function (_context5) {
8875
+ while (1) switch (_context5.p = _context5.n) {
8876
+ case 0:
8877
+ times = _ref0.times, setTime = _ref0.setTime, animationDelay = _ref0.animationDelay, format = _ref0.format, signal = _ref0.signal, onProgress = _ref0.onProgress, mapOptions = _objectWithoutProperties(_ref0, _excluded2);
8878
+ if (times.length) {
8879
+ _context5.n = 1;
8880
+ break;
8881
+ }
8882
+ throw new Error('There are no time steps to export');
8883
+ case 1:
8884
+ pixelRatio = (_mapOptions$pixelRati = mapOptions.pixelRatio) !== null && _mapOptions$pixelRati !== void 0 ? _mapOptions$pixelRati : map.getPixelRatio();
8885
+ _ref10 = (_map$getSize3 = map.getSize()) !== null && _map$getSize3 !== void 0 ? _map$getSize3 : [0, 0], _ref11 = _slicedToArray(_ref10, 2), mapWidth = _ref11[0], mapHeight = _ref11[1];
8886
+ width = Math.round(mapWidth * pixelRatio);
8887
+ height = Math.round(mapHeight * pixelRatio);
8888
+ if (!(!width || !height)) {
8889
+ _context5.n = 2;
8890
+ break;
8891
+ }
8892
+ throw new Error('The map has no size');
8893
+ case 2:
8894
+ signal === null || signal === void 0 || signal.throwIfAborted();
8895
+ _context5.n = 3;
8896
+ return createCanvasVideoEncoder({
8897
+ width: width,
8898
+ height: height,
8899
+ frameDuration: animationDelay / 1000,
8900
+ format: format
8901
+ });
8902
+ case 3:
8903
+ encoder = _context5.v;
8904
+ addFrame = /*#__PURE__*/function () {
8905
+ var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(time) {
8906
+ var frame;
8907
+ return _regenerator().w(function (_context4) {
8908
+ while (1) switch (_context4.n) {
8909
+ case 0:
8910
+ signal === null || signal === void 0 || signal.throwIfAborted();
8911
+ _context4.n = 1;
8912
+ return setTime(time);
8913
+ case 1:
8914
+ _context4.n = 2;
8915
+ return waitForPendingRender();
8916
+ case 2:
8917
+ _context4.n = 3;
8918
+ return exportMapToCanvas(map, _objectSpread2(_objectSpread2({}, mapOptions), {}, {
8919
+ signal: signal
8920
+ }));
8921
+ case 3:
8922
+ frame = _context4.v;
8923
+ if (!(frame.width !== width || frame.height !== height)) {
8924
+ _context4.n = 4;
8925
+ break;
8926
+ }
8927
+ throw new Error('The map size changed during the export');
8928
+ case 4:
8929
+ _context4.n = 5;
8930
+ return encoder.addFrame(frame);
8931
+ case 5:
8932
+ return _context4.a(2);
8933
+ }
8934
+ }, _callee4);
8935
+ }));
8936
+ return function addFrame(_x6) {
8937
+ return _ref12.apply(this, arguments);
8938
+ };
8939
+ }();
8940
+ _context5.p = 4;
8941
+ index = 0;
8942
+ case 5:
8943
+ if (!(index < times.length)) {
8944
+ _context5.n = 8;
8945
+ break;
8946
+ }
8947
+ _context5.n = 6;
8948
+ return addFrame(times[index]);
8949
+ case 6:
8950
+ onProgress === null || onProgress === void 0 || onProgress(index + 1, times.length);
8951
+ case 7:
8952
+ index += 1;
8953
+ _context5.n = 5;
8954
+ break;
8955
+ case 8:
8956
+ signal === null || signal === void 0 || signal.throwIfAborted();
8957
+ _context5.n = 9;
8958
+ return encoder.finish();
8959
+ case 9:
8960
+ return _context5.a(2, _context5.v);
8961
+ case 10:
8962
+ _context5.p = 10;
8963
+ _t2 = _context5.v;
8964
+ _context5.n = 11;
8965
+ return encoder.cancel()["catch"](function () {});
8966
+ case 11:
8967
+ throw _t2;
8968
+ case 12:
8969
+ return _context5.a(2);
8970
+ }
8971
+ }, _callee5, null, [[4, 10]]);
8972
+ }));
8973
+ return function exportMapAnimation(_x4, _x5) {
8974
+ return _ref1.apply(this, arguments);
8975
+ };
8976
+ }();
8831
8977
 
8832
8978
  var privateWmsGetCapabilities = privateWebMapUtils.privateWmsGetCapabilities,
8833
8979
  privateGetWMSServiceInfo = privateWebMapUtils.privateGetWMSServiceInfo,
@@ -16435,4 +16581,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
16435
16581
  return updateObject;
16436
16582
  };
16437
16583
 
16438
- 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, EXPORT_MAP_TIMEOUT_MS, 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, composeMapCanvas, 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, exportMapToBlob, exportMapToCanvas, 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, getVertexLetter, getWMSStyleName, handleResponse, hasEditableVertices, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isDefaultModifiable, isDefaultMovable, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, isStacFeatureInfoReady, joinUrlParams, keepIdentityOnFirstSplitFeature, labelOptions, letteredLineResultStyle, letteredLineStyle, 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 };
16584
+ 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, EXPORT_MAP_TIMEOUT_MS, 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, composeMapCanvas, 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, exportMapAnimation, exportMapToBlob, exportMapToCanvas, 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, getVertexLetter, getWMSStyleName, handleResponse, hasEditableVertices, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isDefaultModifiable, isDefaultMovable, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, isStacFeatureInfoReady, joinUrlParams, keepIdentityOnFirstSplitFeature, labelOptions, letteredLineResultStyle, letteredLineStyle, 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,4 +1,5 @@
1
1
  import type { Map } from 'ol';
2
+ import type { VideoFormat } from '@opengeoweb/shared';
2
3
  export interface MapCanvasOptions {
3
4
  pixelRatio?: number;
4
5
  backgroundColor?: string;
@@ -12,10 +13,24 @@ export declare const composeMapCanvas: (map: Map, { pixelRatio, backgroundColor
12
13
  export declare const EXPORT_MAP_TIMEOUT_MS = 30000;
13
14
  export interface ExportMapOptions extends MapCanvasOptions {
14
15
  timeout?: number;
16
+ signal?: AbortSignal;
15
17
  }
16
18
  /**
17
19
  * Waits until all visible layers of the map have loaded and rendered, and
18
20
  * returns the map as a single canvas.
19
21
  */
20
- export declare const exportMapToCanvas: (map: Map, { timeout, ...canvasOptions }?: ExportMapOptions) => Promise<HTMLCanvasElement>;
22
+ export declare const exportMapToCanvas: (map: Map, { timeout, signal, ...canvasOptions }?: ExportMapOptions) => Promise<HTMLCanvasElement>;
21
23
  export declare const exportMapToBlob: (map: Map, options?: ExportMapOptions) => Promise<Blob>;
24
+ export interface ExportMapAnimationOptions extends ExportMapOptions {
25
+ times: string[];
26
+ setTime: (time: string) => void | Promise<void>;
27
+ animationDelay: number;
28
+ format?: VideoFormat;
29
+ onProgress?: (exportedFrames: number, totalFrames: number) => void;
30
+ }
31
+ /**
32
+ * Exports the map as a video by showing each time step on the map and
33
+ * capturing it once all layers have rendered. The map shows the last time
34
+ * step afterwards, restoring the time is up to the caller.
35
+ */
36
+ export declare const exportMapAnimation: (map: Map, { times, setTime, animationDelay, format, signal, onProgress, ...mapOptions }: ExportMapAnimationOptions) => Promise<Blob>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "21.3.0-nightly-20261202",
3
+ "version": "21.3.0-nightly-20261204",
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": "21.3.0-nightly-20261202",
24
- "@opengeoweb/theme": "21.3.0-nightly-20261202",
25
- "@opengeoweb/shared": "21.3.0-nightly-20261202",
23
+ "@opengeoweb/webmap": "21.3.0-nightly-20261204",
24
+ "@opengeoweb/theme": "21.3.0-nightly-20261204",
25
+ "@opengeoweb/shared": "21.3.0-nightly-20261204",
26
26
  "lodash": "^4.18.1",
27
27
  "ol": "^10.4.0",
28
28
  "geotiff": "^3.0.5",