@opengeoweb/webmap-react 9.26.0 → 9.27.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 +14 -6
- package/package.json +4 -2
- package/src/index.d.ts +2 -0
- package/src/lib/components/ReactMapView/types.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { WEBMAP_NAMESPACE, webmapTranslations, legendImageStore, WMImageEventType, webmapUtils, getLegendGraphicURLForLayer, getPixelCoordFromLatLong, WMJSMAP_LONLAT_EPSGCODE, getLatLongFromPixelCoord, LayerType, getWMJSMapById, debugLogger, DebugType, WMLayer, registerWMLayer, WMBBOX, getWMLayerById, WMJSMap, tilesettings } from '@opengeoweb/webmap';
|
|
2
|
+
export { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
|
|
1
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
4
|
-
import { legendImageStore, WMImageEventType, webmapUtils, getLegendGraphicURLForLayer, getPixelCoordFromLatLong, WMJSMAP_LONLAT_EPSGCODE, getLatLongFromPixelCoord, LayerType, getWMJSMapById, debugLogger, DebugType, WMLayer, registerWMLayer, WMBBOX, getWMLayerById, WMJSMap, tilesettings } from '@opengeoweb/webmap';
|
|
5
6
|
import { CustomTooltip, CanvasComponent, ToolContainerDraggable, CustomIconButton, dateUtils, PROJECTION } from '@opengeoweb/shared';
|
|
6
7
|
import i18n from 'i18next';
|
|
7
8
|
import { initReactI18next, useTranslation } from 'react-i18next';
|
|
@@ -1832,16 +1833,20 @@ i18n.use(initReactI18next).init({
|
|
|
1832
1833
|
},
|
|
1833
1834
|
resources: {
|
|
1834
1835
|
en: {
|
|
1835
|
-
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.en
|
|
1836
|
+
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.en,
|
|
1837
|
+
[WEBMAP_NAMESPACE]: webmapTranslations.en
|
|
1836
1838
|
},
|
|
1837
1839
|
fi: {
|
|
1838
|
-
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.fi
|
|
1840
|
+
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.fi,
|
|
1841
|
+
[WEBMAP_NAMESPACE]: webmapTranslations.fi
|
|
1839
1842
|
},
|
|
1840
1843
|
no: {
|
|
1841
|
-
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.no
|
|
1844
|
+
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.no,
|
|
1845
|
+
[WEBMAP_NAMESPACE]: webmapTranslations.no
|
|
1842
1846
|
},
|
|
1843
1847
|
nl: {
|
|
1844
|
-
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.nl
|
|
1848
|
+
[WEBMAP_REACT_NAMESPACE]: webmapReactTranslations.nl,
|
|
1849
|
+
[WEBMAP_NAMESPACE]: webmapTranslations.nl
|
|
1845
1850
|
}
|
|
1846
1851
|
}
|
|
1847
1852
|
});
|
|
@@ -10274,7 +10279,8 @@ class ReactMapView extends React.Component {
|
|
|
10274
10279
|
listeners,
|
|
10275
10280
|
srs,
|
|
10276
10281
|
bbox,
|
|
10277
|
-
onMapPinChangeLocation
|
|
10282
|
+
onMapPinChangeLocation,
|
|
10283
|
+
shouldDisablePrefetching
|
|
10278
10284
|
} = this.props;
|
|
10279
10285
|
/* Check if we have something to mount IWMJSMap on */
|
|
10280
10286
|
if (this.adagucWebMapJSRef.current === null) {
|
|
@@ -10288,6 +10294,7 @@ class ReactMapView extends React.Component {
|
|
|
10288
10294
|
webmapUtils.unRegisterWMJSMap(mapId);
|
|
10289
10295
|
}
|
|
10290
10296
|
const wmjsMap = new WMJSMap(this.adagucWebMapJSRef.current);
|
|
10297
|
+
wmjsMap.shouldPrefetch = !shouldDisablePrefetching;
|
|
10291
10298
|
this.adaguc.currentChildren = [];
|
|
10292
10299
|
this.adaguc.baseLayers = [];
|
|
10293
10300
|
webmapUtils.registerWMJSMap(wmjsMap, mapId);
|
|
@@ -10829,6 +10836,7 @@ const MapView = _a => {
|
|
|
10829
10836
|
children: jsx(ReactMapView, Object.assign({}, reactMapViewProps, {
|
|
10830
10837
|
showLegend: false,
|
|
10831
10838
|
displayTimeInMap: false,
|
|
10839
|
+
shouldDisablePrefetching: props.shouldDisablePrefetching,
|
|
10832
10840
|
onWMJSMount: id => {
|
|
10833
10841
|
const webMapJS = webmapUtils.getWMJSMapById(id);
|
|
10834
10842
|
if (!webMapJS) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.27.0",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"react-i18next": "^14.1.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"react": "18"
|
|
26
|
+
"react": "18",
|
|
27
|
+
"@emotion/react": "*",
|
|
28
|
+
"@emotion/styled": "*"
|
|
27
29
|
},
|
|
28
30
|
"module": "./index.esm.js",
|
|
29
31
|
"type": "module",
|
package/src/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface ReactMapViewProps {
|
|
|
26
26
|
showLayerInfo?: boolean;
|
|
27
27
|
disableMapPin?: boolean;
|
|
28
28
|
holdShiftToScroll?: boolean;
|
|
29
|
+
shouldDisablePrefetching?: boolean;
|
|
29
30
|
onWMJSMount?: (mapId: string) => void;
|
|
30
31
|
onWMJSUnMount?: (mapId: string) => void;
|
|
31
32
|
onMapChangeDimension?: (payload: SetMapDimensionPayload) => void;
|