@opengeoweb/webmap-react 9.34.0 → 9.35.1-spike-oltanstack.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { legendImageStore, WMImageEventType, webmapUtils, getLegendGraphicURLForLayer, getPixelCoordFromLatLong, WMJSMAP_LONLAT_EPSGCODE, getLatLongFromPixelCoord, LayerType, getWMJSMapById, debugLogger, DebugType, WMLayer, registerWMLayer, WMBBOX, getWMLayerById, WMJSMap, tilesettings } from '@opengeoweb/webmap';
1
+ import { legendImageStore, WMImageEventType, webmapUtils, getLegendGraphicURLForLayer, getPixelCoordFromLatLong, WMJSMAP_LONLAT_EPSGCODE, getLatLongFromPixelCoord, LayerType, getWMJSMapById, debugLogger, DebugType, WMLayer, registerWMLayer, tilesettings, WMBBOX, getWMLayerById, WMJSMap } from '@opengeoweb/webmap';
2
2
  export { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
  import * as React from 'react';
5
5
  import React__default, { useRef, useState, useEffect } from 'react';
6
- import { CustomTooltip, CanvasComponent, ToolContainerDraggable, CustomIconButton, dateUtils, PROJECTION } from '@opengeoweb/shared';
6
+ import { CustomTooltip, CanvasComponent, useWheelStopPropagation, ToolContainerDraggable, CustomIconButton, dateUtils, PROJECTION } from '@opengeoweb/shared';
7
7
  import 'i18next';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import { Paper, Box, Typography, Grid2, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$1, FormLabel, Switch, styled, Slider } from '@mui/material';
@@ -981,6 +981,7 @@ var LegendDialog = function LegendDialog(_ref) {
981
981
  source = _ref$source === void 0 ? 'app' : _ref$source;
982
982
  var _useWebmapReactTransl = useWebmapReactTranslation(),
983
983
  t = _useWebmapReactTransl.t;
984
+ var stopWheelEventPropagationRef = useWheelStopPropagation();
984
985
  return jsx(ToolContainerDraggable, {
985
986
  startPosition: {
986
987
  right: 20,
@@ -1001,6 +1002,7 @@ var LegendDialog = function LegendDialog(_ref) {
1001
1002
  padding: 0.5
1002
1003
  },
1003
1004
  children: layers && layers.length > 0 ? jsx(Box, {
1005
+ ref: stopWheelEventPropagationRef,
1004
1006
  "data-testid": "LegendList",
1005
1007
  sx: {
1006
1008
  display: 'flex',
@@ -6702,16 +6704,7 @@ var makeLayerPropListFromChildren = function makeLayerPropListFromChildren(child
6702
6704
  return myChildren;
6703
6705
  };
6704
6706
  var parseWMJSLayer = function parseWMJSLayer(wmLayer, forceReload) {
6705
- return new Promise(function (resolve, reject) {
6706
- var callback = function callback() {
6707
- if (wmLayer.hasError) {
6708
- reject(new Error(wmLayer.lastError));
6709
- } else {
6710
- resolve(wmLayer);
6711
- }
6712
- };
6713
- wmLayer.parseLayer(callback, forceReload, 'ReactMapView parseWMJSLayer');
6714
- });
6707
+ return wmLayer.parseLayer(forceReload);
6715
6708
  };
6716
6709
  var setWMLayerPropsBasedOnChildProps = function setWMLayerPropsBasedOnChildProps(child, wmLayer, mapViewProps) {
6717
6710
  var needsRedraw = false;
@@ -6769,7 +6762,7 @@ var setWMLayerPropsBasedOnChildProps = function setWMLayerPropsBasedOnChildProps
6769
6762
  };
6770
6763
  var addWMLayerPropsBasedOnChildProps = function addWMLayerPropsBasedOnChildProps(child, mapId, props, onUpdateLayerInformation) {
6771
6764
  var wmjsMap = getWMJSMapById(mapId);
6772
- if (!wmjsMap) {
6765
+ if (!wmjsMap || wmjsMap.isDestroyed) {
6773
6766
  return;
6774
6767
  }
6775
6768
  var keepOnTop = child.layerType === LayerType.overLayer || false;
@@ -6794,11 +6787,18 @@ var addWMLayerPropsBasedOnChildProps = function addWMLayerPropsBasedOnChildProps
6794
6787
  if (newWMLayer.hasError === true) {
6795
6788
  child.onLayerError && child.onLayerError(newWMLayer, new Error(newWMLayer.lastError));
6796
6789
  }
6797
- setWMLayerPropsBasedOnChildProps(child, newWMLayer, props);
6798
- var layerInfo = getLayerUpdateInfo(newWMLayer, mapId);
6799
- onUpdateLayerInformation && onUpdateLayerInformation(layerInfo);
6800
- child.onLayerReady && child.onLayerReady(newWMLayer, wmjsMap);
6801
- wmjsMap.draw();
6790
+ // This ensures that MultiMapViewConnect works properly.
6791
+ setTimeout(function () {
6792
+ var wmjsMap = getWMJSMapById(mapId);
6793
+ if (!wmjsMap || wmjsMap.isDestroyed) {
6794
+ return;
6795
+ }
6796
+ setWMLayerPropsBasedOnChildProps(child, newWMLayer, props);
6797
+ var layerInfo = getLayerUpdateInfo(newWMLayer, mapId);
6798
+ onUpdateLayerInformation && onUpdateLayerInformation(layerInfo);
6799
+ child.onLayerReady && child.onLayerReady(newWMLayer, wmjsMap);
6800
+ wmjsMap.draw();
6801
+ }, 1);
6802
6802
  })["catch"](function (e) {
6803
6803
  child.onLayerError && child.onLayerError(e);
6804
6804
  });
@@ -6895,10 +6895,6 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
6895
6895
  */
6896
6896
  _this.onStartRefetchTimer = function (force) {
6897
6897
  var shouldAutoFetch = _this.props.shouldAutoFetch;
6898
- /* TODO, Maarten Plieger, 2021-09-02
6899
- This causes many issues, we should improve the update strategy.
6900
- Certain presets have >20 layers. This causes 20 times parsing the GetCapabilities for a minor update of the store.
6901
- */
6902
6898
  _this.clearRefetchTimer();
6903
6899
  var autoFetchInterval = Number(shouldAutoFetch); // Default true -> 1 minute
6904
6900
  var refetch = function refetch() {
@@ -6908,20 +6904,40 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
6908
6904
  var mapId = _this.props.mapId;
6909
6905
  var wmjsMap = webmapUtils.getWMJSMapById(mapId);
6910
6906
  var layers = wmjsMap === null || wmjsMap === void 0 ? void 0 : wmjsMap.getLayers();
6911
- layers === null || layers === void 0 || layers.forEach(function (layer) {
6912
- if (layer.enabled !== false) {
6913
- parseWMJSLayer(layer, true).then(function (wmLayer) {
6914
- var _this2 = _this,
6915
- props = _this2.props;
6916
- var mapId = props.mapId,
6917
- onUpdateLayerInformation = props.onUpdateLayerInformation;
6918
- var layerInfo = getLayerUpdateInfo(wmLayer, mapId);
6919
- onUpdateLayerInformation && onUpdateLayerInformation(layerInfo);
6920
- })["catch"](function (e) {
6921
- console.error(e);
6922
- });
6923
- }
6924
- });
6907
+ layers === null || layers === void 0 || layers.forEach( /*#__PURE__*/function () {
6908
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(layer) {
6909
+ var _this2, _props, _mapId, onUpdateLayerInformation, layerInfo;
6910
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
6911
+ while (1) switch (_context.prev = _context.next) {
6912
+ case 0:
6913
+ if (!(layer.enabled !== false)) {
6914
+ _context.next = 13;
6915
+ break;
6916
+ }
6917
+ _context.prev = 1;
6918
+ _context.next = 4;
6919
+ return layer.parseLayer();
6920
+ case 4:
6921
+ _this2 = _this, _props = _this2.props;
6922
+ _mapId = _props.mapId, onUpdateLayerInformation = _props.onUpdateLayerInformation;
6923
+ layerInfo = getLayerUpdateInfo(layer, _mapId);
6924
+ onUpdateLayerInformation && onUpdateLayerInformation(layerInfo);
6925
+ _context.next = 13;
6926
+ break;
6927
+ case 10:
6928
+ _context.prev = 10;
6929
+ _context.t0 = _context["catch"](1);
6930
+ console.error(_context.t0);
6931
+ case 13:
6932
+ case "end":
6933
+ return _context.stop();
6934
+ }
6935
+ }, _callee, null, [[1, 10]]);
6936
+ }));
6937
+ return function (_x) {
6938
+ return _ref.apply(this, arguments);
6939
+ };
6940
+ }());
6925
6941
  }
6926
6942
  };
6927
6943
  if (autoFetchInterval > 0) {
@@ -6939,6 +6955,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
6939
6955
  _this.state = {
6940
6956
  adagucInitialised: false
6941
6957
  };
6958
+ _this.tileServerSettings = props.tileServerSettings || ReactMapView.defaultProps.tileServerSettings;
6942
6959
  _this.resize = _this.resize.bind(_this);
6943
6960
  _this.handleWindowResize = _this.handleWindowResize.bind(_this);
6944
6961
  _this.drawDebounced = debounce(_this.drawDebounced, 600);
@@ -7072,7 +7089,15 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
7072
7089
  return;
7073
7090
  }
7074
7091
  var mapId = props.mapId,
7075
- children = props.children;
7092
+ children = props.children,
7093
+ isTimeScrollingEnabled = props.isTimeScrollingEnabled;
7094
+ if (isTimeScrollingEnabled) {
7095
+ var _wmjsMap = webmapUtils.getWMJSMapById(mapId);
7096
+ _wmjsMap === null || _wmjsMap === void 0 || _wmjsMap.detachWheelEvent();
7097
+ } else {
7098
+ var _wmjsMap2 = webmapUtils.getWMJSMapById(mapId);
7099
+ _wmjsMap2 === null || _wmjsMap2 === void 0 || _wmjsMap2.attachWheelEvent();
7100
+ }
7076
7101
  if (prevProps && prevProps.mapId !== props.mapId) {
7077
7102
  console.warn('MapId has changed on an already mounted map!');
7078
7103
  var prevWMJSMap = webmapUtils.getWMJSMapById(prevProps.mapId);
@@ -7195,13 +7220,13 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
7195
7220
  // ReactWMJSLayer Layer Childs: Detect all ReactLayers connected to WMJSLayers, remove WMJSLayer if there is no ReactLayer
7196
7221
  var wmjsLayers = wmjsMap.getLayers();
7197
7222
  var onUpdateLayerInformation = props.onUpdateLayerInformation,
7198
- _mapId = props.mapId;
7223
+ _mapId2 = props.mapId;
7199
7224
  wmjsLayers.forEach(function (wmLayer) {
7200
7225
  var isWMLayerInReactMapViewChildren = myChildren.find(function (child) {
7201
7226
  return child.id === wmLayer.ReactWMJSLayerId;
7202
7227
  });
7203
7228
  if (!isWMLayerInReactMapViewChildren) {
7204
- removeWMLayerFromMap(wmLayer, _mapId, onUpdateLayerInformation);
7229
+ removeWMLayerFromMap(wmLayer, _mapId2, onUpdateLayerInformation);
7205
7230
  }
7206
7231
  });
7207
7232
  // ReactWMJSLayer BaseLayer Childs: For the baseLayers, detect all ReactLayers connected to WMJSLayers, remove WMJSLayer if there is no ReactLayer
@@ -7228,29 +7253,29 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
7228
7253
  var layerIsInThisMap = wmjsMap.hasLayer(wmLayer);
7229
7254
  if (!layerIsInThisMap) {
7230
7255
  // Add a new layer, it is not in the this map
7231
- addWMLayerPropsBasedOnChildProps(child, _mapId, props, onUpdateLayerInformation);
7256
+ addWMLayerPropsBasedOnChildProps(child, _mapId2, props, onUpdateLayerInformation);
7232
7257
  needsRedraw = true;
7233
7258
  } else {
7234
7259
  // Handle existing layer
7235
7260
  if (child.name !== undefined && wmLayer.name !== child.name) {
7236
7261
  // Handle layer name change
7237
- wmLayer.setName(child.name).then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7262
+ wmLayer.setName(child.name).then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7238
7263
  var layerInfo;
7239
- return _regeneratorRuntime().wrap(function _callee$(_context) {
7240
- while (1) switch (_context.prev = _context.next) {
7264
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7265
+ while (1) switch (_context2.prev = _context2.next) {
7241
7266
  case 0:
7242
- _context.next = 2;
7243
- return parseWMJSLayer(wmLayer, false);
7267
+ _context2.next = 2;
7268
+ return wmLayer.parseLayer();
7244
7269
  case 2:
7245
- layerInfo = getLayerUpdateInfo(wmLayer, _mapId);
7270
+ layerInfo = getLayerUpdateInfo(wmLayer, _mapId2);
7246
7271
  setWMLayerPropsBasedOnChildProps(child, wmLayer, props);
7247
7272
  onUpdateLayerInformation && onUpdateLayerInformation(layerInfo);
7248
7273
  wmjsMap.draw();
7249
7274
  case 6:
7250
7275
  case "end":
7251
- return _context.stop();
7276
+ return _context2.stop();
7252
7277
  }
7253
- }, _callee);
7278
+ }, _callee2);
7254
7279
  })))["catch"](function (e) {
7255
7280
  child.onLayerError && child.onLayerError(wmLayer, e);
7256
7281
  });
@@ -7319,7 +7344,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
7319
7344
  if (srs) {
7320
7345
  wmjsMap.setProjection(srs, new WMBBOX(bbox));
7321
7346
  }
7322
- wmjsMap.setWMTileRendererTileSettings(tilesettings);
7347
+ wmjsMap.setWMTileRendererTileSettings(this.tileServerSettings || tilesettings);
7323
7348
  if (listeners) {
7324
7349
  listeners.forEach(function (listener) {
7325
7350
  wmjsMap.addListener(listener.name, function (data) {
@@ -7396,7 +7421,6 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
7396
7421
  mapId = _this$props5.mapId;
7397
7422
  var adagucInitialised = this.state.adagucInitialised;
7398
7423
  var featureLayers = getFeatureLayers(children);
7399
- // TODO: Improve in https://gitlab.com/opengeoweb/opengeoweb/-/issues/4579
7400
7424
  featureLayers.forEach(function (featureLayer) {
7401
7425
  var wmFeatureLayer = getWMLayerById(featureLayer.id);
7402
7426
  if (!wmFeatureLayer) {
@@ -7490,6 +7514,7 @@ ReactMapView.defaultProps = {
7490
7514
  shouldAutoFetch: true,
7491
7515
  displayMapPin: false,
7492
7516
  disableMapPin: false,
7517
+ tileServerSettings: tilesettings,
7493
7518
  onWMJSMount: function onWMJSMount() {},
7494
7519
  onWMJSUnMount: function onWMJSUnMount() {},
7495
7520
  onMapChangeDimension: function onMapChangeDimension() {
@@ -7760,7 +7785,7 @@ var drawLayerName = function drawLayerName(ctx, bbox, offsetX, offsetY, width, h
7760
7785
  // Re-enable the previousely disabled eslint rule
7761
7786
  /* eslint-enable no-param-reassign */
7762
7787
 
7763
- var _excluded$1 = ["children", "controls", "displayTimeInMap", "onWMJSMount"];
7788
+ var _excluded$1 = ["children", "controls", "displayTimeInMap", "onWMJSMount", "isTimeScrollingEnabled"];
7764
7789
  var MapView = function MapView(_ref) {
7765
7790
  var children = _ref.children,
7766
7791
  _ref$controls = _ref.controls,
@@ -7770,6 +7795,7 @@ var MapView = function MapView(_ref) {
7770
7795
  _ref$displayTimeInMap = _ref.displayTimeInMap,
7771
7796
  displayTimeInMap = _ref$displayTimeInMap === void 0 ? true : _ref$displayTimeInMap,
7772
7797
  _onWMJSMount = _ref.onWMJSMount,
7798
+ isTimeScrollingEnabled = _ref.isTimeScrollingEnabled,
7773
7799
  props = _objectWithoutProperties(_ref, _excluded$1);
7774
7800
  var dimensions = props.dimensions,
7775
7801
  mapIdProp = props.mapId;
@@ -7795,7 +7821,8 @@ var MapView = function MapView(_ref) {
7795
7821
  }
7796
7822
  }, [width, height]);
7797
7823
  var reactMapViewProps = _objectSpread2(_objectSpread2({}, props), {}, {
7798
- mapId: mapId
7824
+ mapId: mapId,
7825
+ isTimeScrollingEnabled: isTimeScrollingEnabled
7799
7826
  });
7800
7827
  return jsxs(Box, {
7801
7828
  ref: ref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "9.34.0",
3
+ "version": "9.35.1-spike-oltanstack.0",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -19,7 +19,8 @@
19
19
  "react-resize-detector": "^9.1.0",
20
20
  "i18next": "^23.11.5",
21
21
  "@mui/material": "^6.1.1",
22
- "react-i18next": "^15.1.1"
22
+ "react-i18next": "^15.1.1",
23
+ "@tanstack/react-query": "^5.61.5"
23
24
  },
24
25
  "peerDependencies": {
25
26
  "react": "18",
@@ -4,5 +4,6 @@ export interface MapViewProps extends ReactMapViewProps {
4
4
  controls?: {
5
5
  zoomControls?: boolean;
6
6
  };
7
+ isTimeScrollingEnabled?: boolean;
7
8
  }
8
9
  export declare const MapView: React.FC<MapViewProps>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import * as React from 'react';
3
- import { IWMJSMap, WMLayer, WMBBOX } from '@opengeoweb/webmap';
3
+ import { IWMJSMap, WMLayer, WMBBOX, TileServerSettings } from '@opengeoweb/webmap';
4
4
  import { ReactMapViewProps } from './types';
5
5
  import type { MapViewLayerProps } from '../MapView';
6
6
  export declare const ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION = "ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION";
@@ -21,6 +21,7 @@ export declare class ReactMapView extends React.Component<ReactMapViewProps, Rea
21
21
  adaguc: AdagucObjectProp;
22
22
  adagucContainerRef: React.RefObject<HTMLDivElement>;
23
23
  adagucWebMapJSRef: React.RefObject<HTMLDivElement>;
24
+ tileServerSettings: TileServerSettings;
24
25
  refetchTimer: NodeJS.Timeout | number | null;
25
26
  lastRefetched: number | null;
26
27
  static defaultProps: {
@@ -34,6 +35,7 @@ export declare class ReactMapView extends React.Component<ReactMapViewProps, Rea
34
35
  shouldAutoFetch: boolean;
35
36
  displayMapPin: boolean;
36
37
  disableMapPin: boolean;
38
+ tileServerSettings: TileServerSettings;
37
39
  onWMJSMount: () => void;
38
40
  onWMJSUnMount: () => void;
39
41
  onMapChangeDimension: () => void;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Bbox, Dimension, IWMJSMap } from '@opengeoweb/webmap';
2
+ import { Bbox, Dimension, IWMJSMap, TileServerSettings } from '@opengeoweb/webmap';
3
3
  import { TFunction } from 'i18next';
4
4
  export interface ReactMapViewProps {
5
5
  listeners?: {
@@ -8,6 +8,7 @@ export interface ReactMapViewProps {
8
8
  keep: boolean;
9
9
  callbackfunction: (webMap: IWMJSMap, value: string) => void;
10
10
  }[];
11
+ isTimeScrollingEnabled?: boolean;
11
12
  srs?: string;
12
13
  bbox?: Bbox;
13
14
  children?: React.ReactNode;
@@ -15,6 +16,7 @@ export interface ReactMapViewProps {
15
16
  activeLayerId?: string;
16
17
  showScaleBar?: boolean;
17
18
  showLegend?: boolean;
19
+ tileServerSettings?: TileServerSettings;
18
20
  passiveMap?: boolean;
19
21
  displayTimeInMap?: boolean;
20
22
  animationDelay?: number;
@@ -44,6 +46,9 @@ export interface MapLocation {
44
46
  projectionX?: number;
45
47
  projectionY?: number;
46
48
  srs?: string;
49
+ id?: string;
50
+ serviceId?: string;
51
+ collectionId?: string;
47
52
  }
48
53
  export interface MapPinLocationPayload {
49
54
  mapId: string;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const MapViewRadar: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ };
@@ -0,0 +1,46 @@
1
+ import { GetCapabilitiesJson, WMSServiceInfo, LayerTree, LayerProps, WMLayer } from '@opengeoweb/webmap';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ /**
4
+ * Queries the WMS GetCapabilities. This is the base TanStack hook for the other hooks in this file.
5
+ *
6
+ * @param {string} serviceUrl
7
+ * @returns {UseQueryResult<GetCapabilitiesJson>}
8
+ */
9
+ export declare const useQueryGetWMSGetCapabilities: (serviceUrl: string) => UseQueryResult<GetCapabilitiesJson>;
10
+ /**
11
+ * Returns details about the WMS service
12
+ *
13
+ * @param {string} serviceUrl
14
+ * @returns {(WMSServiceInfo | null)}
15
+ */
16
+ export declare const useQueryGetWMSServiceInfo: (serviceUrl: string) => WMSServiceInfo | null;
17
+ /**
18
+ * Gets the layer tree in hierarchical order for a WMS service. Cached by TanStack. Uses the same store as in queryWMSGetCapabilities.
19
+ *
20
+ * @param {string} serviceUrl
21
+ * @returns {(LayerTree | null)}
22
+ */
23
+ export declare const useQueryGetWMSLayersTree: (serviceUrl: string) => LayerTree | null;
24
+ /**
25
+ * Gets the flat layer list (without hierarchy) for a WMS service. Cached by TanStack. Uses the same store as in queryWMSGetCapabilities.
26
+ *
27
+ * @param {string} serviceUrl
28
+ * @returns {LayerProps[]}
29
+ */
30
+ export declare const useQueryGetWMSLayers: (serviceUrl: string) => LayerProps[];
31
+ /**
32
+ * Returns specific layer from the WMS service
33
+ *
34
+ * @param {string} serviceUrl
35
+ * @param {string} name
36
+ * @returns {(LayerProps | null)}
37
+ */
38
+ export declare const useQueryGetWMSLayer: (serviceUrl: string, name: string) => LayerProps | null;
39
+ /**
40
+ * Returns WMLayer instance. The layer will contains parsed dimensions and styles and keeps a state for these properties.
41
+ *
42
+ * @param {string} serviceUrl
43
+ * @param {string} name
44
+ * @returns {(WMLayer | null)}
45
+ */
46
+ export declare const useGetWMLayerInstance: (serviceUrl: string, name: string) => WMLayer | null;