@opengeoweb/webmap-react 14.3.0 → 14.4.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 +182 -17
- package/package.json +4 -4
- package/src/lib/components/MapMeasure/MapMeasure.d.ts +4 -0
- package/src/lib/components/MapMeasure/MapMeasure.spec.d.ts +1 -0
- package/src/lib/components/MapMeasure/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.Measure.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +1 -1
- package/src/lib/components/index.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -18,11 +18,11 @@ import { Paper, Box, Typography, useTheme, Grid, styled, Slider, TextField, Form
|
|
|
18
18
|
import { queryOptions, useQuery } from '@tanstack/react-query';
|
|
19
19
|
import { Style, Icon as Icon$1, Circle, Stroke, Fill, Text } from 'ol/style';
|
|
20
20
|
import { Point, MultiPoint, Polygon, LineString } from 'ol/geom';
|
|
21
|
-
import { arrowUpPath, Home, Add, Minus, List, Equalizer, DimensionsElevation, Link, LinkOff, Info, DimensionsOther, DimensionsRefTime, DimensionsTime, locationPath, Location, DrawToolFreehand, DrawToolOval, DrawToolCircle, DrawToolSquare, Delete, DrawToolLineString, DrawToolRectangle, DrawToolPolygon, DrawToolPoint, DrawFIRLand, ArrowUp } from '@opengeoweb/theme';
|
|
21
|
+
import { arrowUpPath, Home, Add, Minus, List, Equalizer, DimensionsElevation, Link, LinkOff, Info, DimensionsOther, DimensionsRefTime, DimensionsTime, locationPath, Location, DrawToolSmoothLine, DrawToolFreehand, DrawToolOval, DrawToolCircle, DrawToolSquare, Delete, DrawToolLineString, DrawToolRectangle, DrawToolPolygon, DrawToolPoint, DrawFIRLand, ArrowUp } from '@opengeoweb/theme';
|
|
22
22
|
import { http, HttpResponse } from 'msw';
|
|
23
23
|
import Box$1 from '@mui/material/Box';
|
|
24
24
|
import Typography$1 from '@mui/material/Typography';
|
|
25
|
-
import { View, Map, Feature, Collection } from 'ol';
|
|
25
|
+
import { View, Map, Feature, Collection, Overlay } from 'ol';
|
|
26
26
|
import { defaults, MouseWheelZoom, Draw, Modify, Translate, Snap } from 'ol/interaction';
|
|
27
27
|
import 'ol/ol.css';
|
|
28
28
|
import { toLonLat, fromLonLat } from 'ol/proj';
|
|
@@ -46,6 +46,8 @@ import { createBox, createRegularPolygon } from 'ol/interaction/Draw';
|
|
|
46
46
|
import Style$1, { createDefaultStyle } from 'ol/style/Style';
|
|
47
47
|
import { always, never } from 'ol/events/condition';
|
|
48
48
|
import { fromCircle } from 'ol/geom/Polygon';
|
|
49
|
+
import CircleStyle from 'ol/style/Circle';
|
|
50
|
+
import { getLength } from 'ol/sphere.js';
|
|
49
51
|
|
|
50
52
|
var en = {
|
|
51
53
|
"webmap-react-event": "event:",
|
|
@@ -1689,29 +1691,35 @@ var fetchEDRArea = /*#__PURE__*/function () {
|
|
|
1689
1691
|
}();
|
|
1690
1692
|
var fetchEDRParameter = /*#__PURE__*/function () {
|
|
1691
1693
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(collection, edrBaseUrlWithCollection, parameterName) {
|
|
1692
|
-
var _collection$data_quer, _collection$data_quer2;
|
|
1694
|
+
var _collection$extent, _collection$extent2, _collection$data_quer, _collection$data_quer2;
|
|
1693
1695
|
var datetime,
|
|
1694
1696
|
instanceId,
|
|
1697
|
+
bbox,
|
|
1698
|
+
bboxString,
|
|
1699
|
+
_bboxString,
|
|
1695
1700
|
_args4 = arguments;
|
|
1696
1701
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1697
1702
|
while (1) switch (_context4.prev = _context4.next) {
|
|
1698
1703
|
case 0:
|
|
1699
1704
|
datetime = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : '';
|
|
1700
1705
|
instanceId = _args4.length > 4 && _args4[4] !== undefined ? _args4[4] : '';
|
|
1706
|
+
bbox = collection !== null && collection !== void 0 && (_collection$extent = collection.extent) !== null && _collection$extent !== void 0 && _collection$extent.spatial.bbox ? collection === null || collection === void 0 || (_collection$extent2 = collection.extent) === null || _collection$extent2 === void 0 ? void 0 : _collection$extent2.spatial.bbox[0] : undefined;
|
|
1701
1707
|
if (!(collection !== null && collection !== void 0 && (_collection$data_quer = collection.data_queries) !== null && _collection$data_quer !== void 0 && _collection$data_quer.cube)) {
|
|
1702
|
-
_context4.next =
|
|
1708
|
+
_context4.next = 6;
|
|
1703
1709
|
break;
|
|
1704
1710
|
}
|
|
1705
|
-
|
|
1706
|
-
|
|
1711
|
+
bboxString = bbox ? bbox.join(',') : undefined;
|
|
1712
|
+
return _context4.abrupt("return", fetchEDRCube(edrBaseUrlWithCollection, parameterName, datetime, instanceId, bboxString));
|
|
1713
|
+
case 6:
|
|
1707
1714
|
if (!(collection !== null && collection !== void 0 && (_collection$data_quer2 = collection.data_queries) !== null && _collection$data_quer2 !== void 0 && _collection$data_quer2.area)) {
|
|
1708
|
-
_context4.next =
|
|
1715
|
+
_context4.next = 9;
|
|
1709
1716
|
break;
|
|
1710
1717
|
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1718
|
+
_bboxString = bbox ? "POLYGON((".concat(bbox[0], " ").concat(bbox[1], ", ").concat(bbox[2], " ").concat(bbox[1], ", ").concat(bbox[2], " ").concat(bbox[3], ", ").concat(bbox[0], " ").concat(bbox[3], " , ").concat(bbox[0], " ").concat(bbox[1], "))") : undefined;
|
|
1719
|
+
return _context4.abrupt("return", fetchEDRArea(edrBaseUrlWithCollection, parameterName, datetime, instanceId, _bboxString));
|
|
1720
|
+
case 9:
|
|
1713
1721
|
return _context4.abrupt("return", undefined);
|
|
1714
|
-
case
|
|
1722
|
+
case 10:
|
|
1715
1723
|
case "end":
|
|
1716
1724
|
return _context4.stop();
|
|
1717
1725
|
}
|
|
@@ -2367,7 +2375,10 @@ var useEDRWMLayer = function useEDRWMLayer(edrBaseUrl, parameter, layerId, onIni
|
|
|
2367
2375
|
if (wmLayer && collectionInfo.data && collectionInfo.isFetched) {
|
|
2368
2376
|
var _collectionInfo$data, _collectionInfo$data2, _collectionInfo$data3, _collectionInfo$data4;
|
|
2369
2377
|
// TODO: Extract timerange from the EDR service: https://gitlab.com/opengeoweb/geoweb-assets/-/issues/4139
|
|
2370
|
-
|
|
2378
|
+
// Round start and end to not include seconds
|
|
2379
|
+
var intervalStart = (_collectionInfo$data = collectionInfo.data) !== null && _collectionInfo$data !== void 0 && (_collectionInfo$data = _collectionInfo$data.extent) !== null && _collectionInfo$data !== void 0 && (_collectionInfo$data = _collectionInfo$data.temporal) !== null && _collectionInfo$data !== void 0 && _collectionInfo$data.interval[0][0] ? "".concat((_collectionInfo$data2 = collectionInfo.data) === null || _collectionInfo$data2 === void 0 || (_collectionInfo$data2 = _collectionInfo$data2.extent) === null || _collectionInfo$data2 === void 0 || (_collectionInfo$data2 = _collectionInfo$data2.temporal) === null || _collectionInfo$data2 === void 0 ? void 0 : _collectionInfo$data2.interval[0][0].slice(0, 17), "00Z") : undefined;
|
|
2380
|
+
var intervalEnd = (_collectionInfo$data3 = collectionInfo.data) !== null && _collectionInfo$data3 !== void 0 && (_collectionInfo$data3 = _collectionInfo$data3.extent) !== null && _collectionInfo$data3 !== void 0 && (_collectionInfo$data3 = _collectionInfo$data3.temporal) !== null && _collectionInfo$data3 !== void 0 && _collectionInfo$data3.interval[0][1] ? "".concat((_collectionInfo$data4 = collectionInfo.data) === null || _collectionInfo$data4 === void 0 || (_collectionInfo$data4 = _collectionInfo$data4.extent) === null || _collectionInfo$data4 === void 0 || (_collectionInfo$data4 = _collectionInfo$data4.temporal) === null || _collectionInfo$data4 === void 0 ? void 0 : _collectionInfo$data4.interval[0][1].slice(0, 17), "00Z") : undefined;
|
|
2381
|
+
var timeRangeDurationFromEdrCollection = edrBaseUrl.includes('10-minute') ? "".concat(intervalStart, "/").concat(intervalEnd, "/PT10M") : "".concat(intervalStart, "/").concat(intervalEnd, "/PT1M");
|
|
2371
2382
|
if (!wmLayer.getDimension('time')) {
|
|
2372
2383
|
var _collectionInfo$data5;
|
|
2373
2384
|
var dim = new WMJSDimension({
|
|
@@ -11781,9 +11792,12 @@ var useProjection = function useProjection() {
|
|
|
11781
11792
|
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
11782
11793
|
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
11783
11794
|
* */
|
|
11784
|
-
var setMapCenter = function setMapCenter(map, lon, lat) {
|
|
11795
|
+
var setMapCenter = function setMapCenter(map, lon, lat, zoomLevel) {
|
|
11785
11796
|
var center = fromLonLat([lon, lat], map.getView().getProjection());
|
|
11786
11797
|
map.getView().setCenter(center);
|
|
11798
|
+
if (zoomLevel) {
|
|
11799
|
+
map.getView().setZoom(zoomLevel);
|
|
11800
|
+
}
|
|
11787
11801
|
};
|
|
11788
11802
|
|
|
11789
11803
|
/* *
|
|
@@ -14157,11 +14171,13 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
14157
14171
|
visible = _ref$visible === void 0 ? true : _ref$visible;
|
|
14158
14172
|
var projection = useProjection();
|
|
14159
14173
|
var featureCollectionRef = useRef();
|
|
14174
|
+
var projectionRef = useRef(projection);
|
|
14160
14175
|
var features = useRef([]);
|
|
14161
|
-
var featureCollectionHasChanges = featureCollectionRef.current !== featureCollection;
|
|
14176
|
+
var featureCollectionHasChanges = featureCollectionRef.current !== featureCollection || projectionRef.current !== projection;
|
|
14162
14177
|
if (featureCollectionHasChanges) {
|
|
14163
14178
|
if (projection && featureCollection) {
|
|
14164
14179
|
featureCollectionRef.current = featureCollection;
|
|
14180
|
+
projectionRef.current = projection;
|
|
14165
14181
|
var formatter = new GeoJSON({
|
|
14166
14182
|
featureProjection: projection
|
|
14167
14183
|
});
|
|
@@ -15280,6 +15296,7 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
15280
15296
|
updateGeojson = _ref.updateGeojson;
|
|
15281
15297
|
var _React$useContext = React.useContext(MapContext),
|
|
15282
15298
|
map = _React$useContext.map;
|
|
15299
|
+
var projection = useProjection();
|
|
15283
15300
|
React.useEffect(function () {
|
|
15284
15301
|
var _geojson$features$sel;
|
|
15285
15302
|
if (!map || !isInEditMode) {
|
|
@@ -15291,7 +15308,7 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
15291
15308
|
var drawStyle = drawStyles[actualDrawMode];
|
|
15292
15309
|
var modifyStyle = modifyStyles[actualDrawMode];
|
|
15293
15310
|
var geojsonFormatter = new GeoJSON({
|
|
15294
|
-
featureProjection:
|
|
15311
|
+
featureProjection: projection
|
|
15295
15312
|
});
|
|
15296
15313
|
var allFeatures = geojson ? geojsonFormatter.readFeatures(geojson) : [];
|
|
15297
15314
|
var viewOnlyFeatures = allFeatures.filter(function (_f, i) {
|
|
@@ -15479,7 +15496,7 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
15479
15496
|
map.getViewport().removeEventListener('pointermove', trackPointerMove);
|
|
15480
15497
|
window.removeEventListener('keydown', deleteVertexOnDeleteKey);
|
|
15481
15498
|
};
|
|
15482
|
-
}, [map, isInEditMode, geojson, viewOnlyStyle, selectedFeatureIndex, exitDrawModeCallback, updateGeojson, drawMode]);
|
|
15499
|
+
}, [map, isInEditMode, geojson, projection, viewOnlyStyle, selectedFeatureIndex, exitDrawModeCallback, updateGeojson, drawMode]);
|
|
15483
15500
|
return null;
|
|
15484
15501
|
};
|
|
15485
15502
|
|
|
@@ -15518,8 +15535,9 @@ var getIcon = function getIcon(selectionType) {
|
|
|
15518
15535
|
case 'oval':
|
|
15519
15536
|
return jsx(DrawToolOval, {});
|
|
15520
15537
|
case 'freehand-line':
|
|
15521
|
-
case 'smooth-line':
|
|
15522
15538
|
return jsx(DrawToolFreehand, {});
|
|
15539
|
+
case 'smooth-line':
|
|
15540
|
+
return jsx(DrawToolSmoothLine, {});
|
|
15523
15541
|
case 'location':
|
|
15524
15542
|
return jsx(Location, {});
|
|
15525
15543
|
default:
|
|
@@ -17112,6 +17130,153 @@ var ClickOnMapTool = function ClickOnMapTool(_ref) {
|
|
|
17112
17130
|
});
|
|
17113
17131
|
};
|
|
17114
17132
|
|
|
17133
|
+
/**
|
|
17134
|
+
* Format length output.
|
|
17135
|
+
* @param {LineString} line The line.
|
|
17136
|
+
* @return {string} The formatted length.
|
|
17137
|
+
*/
|
|
17138
|
+
var formatLength = function formatLength(line) {
|
|
17139
|
+
var length = getLength(line);
|
|
17140
|
+
var output;
|
|
17141
|
+
if (length > 100) {
|
|
17142
|
+
output = "".concat(Math.round(length / 1000 * 100) / 100, " km");
|
|
17143
|
+
} else {
|
|
17144
|
+
output = "".concat(Math.round(length * 100) / 100, " m");
|
|
17145
|
+
}
|
|
17146
|
+
return output;
|
|
17147
|
+
};
|
|
17148
|
+
/**
|
|
17149
|
+
* Creates a new measure tooltip
|
|
17150
|
+
* @param map
|
|
17151
|
+
* @param msrRefState
|
|
17152
|
+
*/
|
|
17153
|
+
var makeToolTipOverlay = function makeToolTipOverlay() {
|
|
17154
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#ffcc33';
|
|
17155
|
+
var measureTooltipElement = document.createElement('div');
|
|
17156
|
+
measureTooltipElement.className = 'ol-tooltip ol-tooltip-measure';
|
|
17157
|
+
measureTooltipElement.style.color = color;
|
|
17158
|
+
measureTooltipElement.setAttribute('data-testid', 'map-measure-tooltip-overlay');
|
|
17159
|
+
return new Overlay({
|
|
17160
|
+
element: measureTooltipElement,
|
|
17161
|
+
offset: [0, -15],
|
|
17162
|
+
positioning: 'bottom-center',
|
|
17163
|
+
stopEvent: false,
|
|
17164
|
+
insertFirst: false
|
|
17165
|
+
});
|
|
17166
|
+
};
|
|
17167
|
+
/**
|
|
17168
|
+
* Adds the measure line interaction to the map.
|
|
17169
|
+
* @param map
|
|
17170
|
+
* @param vectorLayer
|
|
17171
|
+
* @param lineColor
|
|
17172
|
+
* @returns
|
|
17173
|
+
*/
|
|
17174
|
+
var addMeasureTool = function addMeasureTool(map, vectorLayer) {
|
|
17175
|
+
var lineColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '#ffcc33';
|
|
17176
|
+
var overlays = [makeToolTipOverlay(lineColor)];
|
|
17177
|
+
var draw = new Draw({
|
|
17178
|
+
source: vectorLayer.getSource(),
|
|
17179
|
+
type: 'LineString',
|
|
17180
|
+
style: function style(feature) {
|
|
17181
|
+
var _feature$getGeometry;
|
|
17182
|
+
var geometryType = feature === null || feature === void 0 || (_feature$getGeometry = feature.getGeometry()) === null || _feature$getGeometry === void 0 ? void 0 : _feature$getGeometry.getType();
|
|
17183
|
+
if (geometryType === 'LineString' || geometryType === 'Point') {
|
|
17184
|
+
// Point is needed to display the start location.
|
|
17185
|
+
return new Style({
|
|
17186
|
+
fill: new Fill({
|
|
17187
|
+
color: 'rgba(255, 255, 255, 0.2)'
|
|
17188
|
+
}),
|
|
17189
|
+
stroke: new Stroke({
|
|
17190
|
+
color: lineColor,
|
|
17191
|
+
lineDash: [10, 10],
|
|
17192
|
+
width: 2
|
|
17193
|
+
}),
|
|
17194
|
+
image: new CircleStyle({
|
|
17195
|
+
radius: 9,
|
|
17196
|
+
stroke: new Stroke({
|
|
17197
|
+
color: FEATURE_DRAW_STROKE_COLOR,
|
|
17198
|
+
width: 1.5
|
|
17199
|
+
}),
|
|
17200
|
+
fill: new Fill({
|
|
17201
|
+
color: 'rgba(255, 255, 255, 0.1)'
|
|
17202
|
+
})
|
|
17203
|
+
})
|
|
17204
|
+
});
|
|
17205
|
+
}
|
|
17206
|
+
return undefined;
|
|
17207
|
+
}
|
|
17208
|
+
});
|
|
17209
|
+
map.addInteraction(draw);
|
|
17210
|
+
map.addOverlay(overlays[overlays.length - 1]);
|
|
17211
|
+
var listener;
|
|
17212
|
+
draw.on('drawstart', function (drawstartEvent) {
|
|
17213
|
+
var _drawstartEvent$featu;
|
|
17214
|
+
var tooltipCoord;
|
|
17215
|
+
listener = (_drawstartEvent$featu = drawstartEvent.feature.getGeometry()) === null || _drawstartEvent$featu === void 0 ? void 0 : _drawstartEvent$featu.on('change', function (evt) {
|
|
17216
|
+
var geom = evt.target;
|
|
17217
|
+
tooltipCoord = geom.getLastCoordinate();
|
|
17218
|
+
overlays[overlays.length - 1].getElement().innerHTML = formatLength(geom);
|
|
17219
|
+
overlays[overlays.length - 1].setPosition(tooltipCoord);
|
|
17220
|
+
});
|
|
17221
|
+
});
|
|
17222
|
+
draw.on('drawend', function () {
|
|
17223
|
+
overlays[overlays.length - 1].setOffset([0, -7]);
|
|
17224
|
+
overlays.push(makeToolTipOverlay(lineColor));
|
|
17225
|
+
map.addOverlay(overlays[overlays.length - 1]);
|
|
17226
|
+
if (listener) {
|
|
17227
|
+
unByKey(listener);
|
|
17228
|
+
}
|
|
17229
|
+
});
|
|
17230
|
+
return [draw, overlays];
|
|
17231
|
+
};
|
|
17232
|
+
var MapMeasure = function MapMeasure(_ref) {
|
|
17233
|
+
var _ref$lineColor = _ref.lineColor,
|
|
17234
|
+
lineColor = _ref$lineColor === void 0 ? FEATURE_DRAW_STROKE_COLOR : _ref$lineColor;
|
|
17235
|
+
var _useContext = useContext(MapContext),
|
|
17236
|
+
map = _useContext.map;
|
|
17237
|
+
var projection = map === null || map === void 0 ? void 0 : map.getView().getProjection().getCode();
|
|
17238
|
+
useEffect(function () {
|
|
17239
|
+
if (!map) {
|
|
17240
|
+
return function () {};
|
|
17241
|
+
}
|
|
17242
|
+
var vectorLayer = new VectorLayer({
|
|
17243
|
+
source: new VectorSource(),
|
|
17244
|
+
style: {
|
|
17245
|
+
'stroke-color': lineColor,
|
|
17246
|
+
'stroke-width': 2
|
|
17247
|
+
}
|
|
17248
|
+
});
|
|
17249
|
+
map.addLayer(vectorLayer);
|
|
17250
|
+
// Should be on top.
|
|
17251
|
+
vectorLayer.setZIndex(1000);
|
|
17252
|
+
var _addMeasureTool = addMeasureTool(map, vectorLayer, lineColor),
|
|
17253
|
+
_addMeasureTool2 = _slicedToArray(_addMeasureTool, 2),
|
|
17254
|
+
draw = _addMeasureTool2[0],
|
|
17255
|
+
overlays = _addMeasureTool2[1];
|
|
17256
|
+
var abortOnEsc = function abortOnEsc(evt) {
|
|
17257
|
+
if (evt.key === 'Escape') {
|
|
17258
|
+
var _overlays;
|
|
17259
|
+
var coordinates = (_overlays = overlays[overlays.length - 1]) === null || _overlays === void 0 ? void 0 : _overlays.getPosition();
|
|
17260
|
+
coordinates && draw.appendCoordinates([coordinates]);
|
|
17261
|
+
draw.finishDrawing();
|
|
17262
|
+
}
|
|
17263
|
+
};
|
|
17264
|
+
window.addEventListener('keydown', abortOnEsc);
|
|
17265
|
+
return function () {
|
|
17266
|
+
window.removeEventListener('keydown', abortOnEsc);
|
|
17267
|
+
map.removeInteraction(draw);
|
|
17268
|
+
overlays.forEach(function (overlay) {
|
|
17269
|
+
var _overlay$getElement;
|
|
17270
|
+
map.removeOverlay(overlay);
|
|
17271
|
+
(_overlay$getElement = overlay.getElement()) === null || _overlay$getElement === void 0 || _overlay$getElement.remove();
|
|
17272
|
+
});
|
|
17273
|
+
overlays.length = 0;
|
|
17274
|
+
map.removeLayer(vectorLayer);
|
|
17275
|
+
};
|
|
17276
|
+
}, [lineColor, map, projection]);
|
|
17277
|
+
return null;
|
|
17278
|
+
};
|
|
17279
|
+
|
|
17115
17280
|
/* *
|
|
17116
17281
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
17117
17282
|
* you may not use this file except in compliance with the License.
|
|
@@ -17188,4 +17353,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
17188
17353
|
return updateObject;
|
|
17189
17354
|
};
|
|
17190
17355
|
|
|
17191
|
-
export { BaseLayerType, ClickOnMapTool, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_FILL_COLOR_TRANSPARENT, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, FEATURE_DRAW_STROKE_COLOR, FEATURE_FILL, FEATURE_FILL_SELECTED, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_STROKE_SELECTED, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, catmullRomSpline, clearImageCacheForAllMaps, colorMaps, createBoxBasedOnModifiedVertex, createIconStyle, createInterSections, createOval, currentlySupportedDrawModes, defaultBox, defaultCircle, defaultDelete, defaultEdrStyles, defaultFreehandLine, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultLineString, defaultLocation, defaultModes, defaultOval, defaultPoint, defaultPolygon, defaultSmoothLine, defaultSquare, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, fakeEdrLayerApiHandlers, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getLayerUpdateInfo, getLegendClass, getProj4, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isPointFeatureCollection, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeTimeList, makeView, marksByDimension, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, rewindGeometry, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRGetCollectionDetails, useEDRGetParameterData, useEDRWMLayer, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useViewFromLayer, viewUtils, webmapEDRQueryOptions, webmapReactTranslations };
|
|
17356
|
+
export { BaseLayerType, ClickOnMapTool, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_FILL_COLOR_TRANSPARENT, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, FEATURE_DRAW_STROKE_COLOR, FEATURE_FILL, FEATURE_FILL_SELECTED, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_STROKE_SELECTED, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapMeasure, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, catmullRomSpline, clearImageCacheForAllMaps, colorMaps, createBoxBasedOnModifiedVertex, createIconStyle, createInterSections, createOval, currentlySupportedDrawModes, defaultBox, defaultCircle, defaultDelete, defaultEdrStyles, defaultFreehandLine, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultLineString, defaultLocation, defaultModes, defaultOval, defaultPoint, defaultPolygon, defaultSmoothLine, defaultSquare, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, fakeEdrLayerApiHandlers, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getLayerUpdateInfo, getLegendClass, getProj4, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isPointFeatureCollection, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeTimeList, makeView, marksByDimension, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, rewindGeometry, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRGetCollectionDetails, useEDRGetParameterData, useEDRWMLayer, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useViewFromLayer, viewUtils, webmapEDRQueryOptions, webmapReactTranslations };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/webmap": "14.
|
|
12
|
-
"@opengeoweb/theme": "14.
|
|
13
|
-
"@opengeoweb/shared": "14.
|
|
11
|
+
"@opengeoweb/webmap": "14.4.0",
|
|
12
|
+
"@opengeoweb/theme": "14.4.0",
|
|
13
|
+
"@opengeoweb/shared": "14.4.0",
|
|
14
14
|
"lodash": "^4.17.21",
|
|
15
15
|
"ol": "^10.4.0",
|
|
16
16
|
"proj4": "^2.9.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MapMeasure';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const MapViewMeasure: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Map } from 'ol';
|
|
2
|
-
export declare const setMapCenter: (map: Map, lon: number, lat: number) => void;
|
|
2
|
+
export declare const setMapCenter: (map: Map, lon: number, lat: number, zoomLevel?: number) => void;
|