@opengeoweb/webmap-react 12.7.0 → 12.9.1
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
|
@@ -3142,6 +3142,8 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
3142
3142
|
setSource(source);
|
|
3143
3143
|
map.addLayer(layer);
|
|
3144
3144
|
return function () {
|
|
3145
|
+
setSource(undefined);
|
|
3146
|
+
source.clear();
|
|
3145
3147
|
map.removeLayer(layer);
|
|
3146
3148
|
};
|
|
3147
3149
|
// NOTE: style should not be part of this effect, as it changes always, causing the layer to be add/removed continuousely.
|
|
@@ -3251,6 +3253,10 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
3251
3253
|
features.current = formatter.readFeatures(featureCollection);
|
|
3252
3254
|
}
|
|
3253
3255
|
}
|
|
3256
|
+
// If no featureCollection is given, e.g. in edit mode of a polygon, the feature should not be displayed.
|
|
3257
|
+
if (!featureCollection) {
|
|
3258
|
+
return null;
|
|
3259
|
+
}
|
|
3254
3260
|
return jsx(FeatureLayer, {
|
|
3255
3261
|
features: features.current,
|
|
3256
3262
|
style: style,
|
|
@@ -9706,31 +9712,6 @@ var getProj4 = function getProj4(projection) {
|
|
|
9706
9712
|
projectorCache[projection] = new Proj4js.Proj(projection);
|
|
9707
9713
|
return projectorCache[projection];
|
|
9708
9714
|
};
|
|
9709
|
-
var generatedDrawFunctionIds = 0;
|
|
9710
|
-
var generateDrawFunctionId = function generateDrawFunctionId() {
|
|
9711
|
-
generatedDrawFunctionIds += 1;
|
|
9712
|
-
return "drawFunctionId_".concat(generatedDrawFunctionIds);
|
|
9713
|
-
};
|
|
9714
|
-
/**
|
|
9715
|
-
* DrawFunction store for re-use of drawFunctions
|
|
9716
|
-
*/
|
|
9717
|
-
var drawFunctionStore = [];
|
|
9718
|
-
var getDrawFunctionFromStore = function getDrawFunctionFromStore(id) {
|
|
9719
|
-
var drawFunction = drawFunctionStore.find(function (drawFunction) {
|
|
9720
|
-
return drawFunction.id === id;
|
|
9721
|
-
});
|
|
9722
|
-
return drawFunction === null || drawFunction === void 0 ? void 0 : drawFunction.drawMethod;
|
|
9723
|
-
};
|
|
9724
|
-
var registerDrawFunction = function registerDrawFunction() {
|
|
9725
|
-
var drawFunction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
|
|
9726
|
-
var id = generateDrawFunctionId();
|
|
9727
|
-
var newFunction = {
|
|
9728
|
-
id: id,
|
|
9729
|
-
drawMethod: drawFunction
|
|
9730
|
-
};
|
|
9731
|
-
drawFunctionStore.push(newFunction);
|
|
9732
|
-
return id;
|
|
9733
|
-
};
|
|
9734
9715
|
var NEW_LINESTRING_CREATED = 'new point in LineString created';
|
|
9735
9716
|
var NEW_FEATURE_CREATED = 'new feature created';
|
|
9736
9717
|
var NEW_POINT_CREATED = 'new point created';
|
|
@@ -14883,4 +14864,4 @@ var ClickOnMapTool = function ClickOnMapTool(_ref) {
|
|
|
14883
14864
|
});
|
|
14884
14865
|
};
|
|
14885
14866
|
|
|
14886
|
-
export { ClickOnMapTool, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_FILL, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayers, GeoJSONTextField, ICON_LOCATIONMARKER, ICON_LOCATIONMARKER_MODIFY, 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, Proj4js, radarGetCapabilities_spec as RadarGetCapabilities, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeContext, TimeawareImageSource, WEBMAP_REACT_NAMESPACE, WMSLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, clearImageCacheForAllMaps, colorMaps, createIconStyle, createInterSections, currentlySupportedDrawModes, defaultBox, defaultDelete, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultModes, defaultPoint, defaultPolygon, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, fakeEdrLayerApiHandlers, featureBox, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getCurrentDimensionValue, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon,
|
|
14867
|
+
export { ClickOnMapTool, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_FILL, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayers, GeoJSONTextField, ICON_LOCATIONMARKER, ICON_LOCATIONMARKER_MODIFY, 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, Proj4js, radarGetCapabilities_spec as RadarGetCapabilities, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeContext, TimeawareImageSource, WEBMAP_REACT_NAMESPACE, WMSLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, clearImageCacheForAllMaps, colorMaps, createIconStyle, createInterSections, currentlySupportedDrawModes, defaultBox, defaultDelete, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultModes, defaultPoint, defaultPolygon, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, fakeEdrLayerApiHandlers, featureBox, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getCurrentDimensionValue, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getFeatureCollection, getFeatureExtent, getFeatureLayers, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getLayerUpdateInfo, getLegendClass, getProj4, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isAGeoJSONLayer, isAMapLayer, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isPointFeatureCollection, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeLegendFromColorMap, makeView, marksByDimension, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, projectorCache, publicLayers, publicServices, rewindGeometry, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRCollection, useEDRCollectionCube, useEDRCollectionLocation, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useViewFromLayer, viewUtils, webmapReactTranslations, wowTemperatureLegendColors };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.9.1",
|
|
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": "12.
|
|
12
|
-
"@opengeoweb/theme": "12.
|
|
13
|
-
"@opengeoweb/shared": "12.
|
|
11
|
+
"@opengeoweb/webmap": "12.9.1",
|
|
12
|
+
"@opengeoweb/theme": "12.9.1",
|
|
13
|
+
"@opengeoweb/shared": "12.9.1",
|
|
14
14
|
"lodash": "^4.17.21",
|
|
15
15
|
"ol": "^10.4.0",
|
|
16
16
|
"proj4": "^2.9.2",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"i18next": "^25.0.1",
|
|
20
20
|
"@mui/material": "^7.0.1",
|
|
21
21
|
"react-i18next": "^15.1.1",
|
|
22
|
-
"@tanstack/react-query": "^5.69.2"
|
|
22
|
+
"@tanstack/react-query": "^5.69.2",
|
|
23
|
+
"@types/geojson": "^7946.0.14"
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
26
|
"react": "18",
|
|
@@ -29,5 +30,5 @@
|
|
|
29
30
|
"module": "./index.esm.js",
|
|
30
31
|
"type": "module",
|
|
31
32
|
"main": "./index.esm.js",
|
|
32
|
-
"types": "./index.
|
|
33
|
+
"types": "./index.d.ts"
|
|
33
34
|
}
|
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
import proj4, { InterfaceProjection } from 'proj4';
|
|
2
|
-
import { Coordinate } from './geojsonShapes';
|
|
3
2
|
export type ProjectorCache = Record<string, InterfaceProjection>;
|
|
4
3
|
export declare const Proj4js: typeof proj4;
|
|
5
4
|
export declare const projectorCache: ProjectorCache;
|
|
6
5
|
export declare const getProj4: (projection: string | proj4.InterfaceProjection) => InterfaceProjection;
|
|
7
|
-
export interface MapDrawDrawFunctionArgs {
|
|
8
|
-
context: CanvasRenderingContext2D;
|
|
9
|
-
featureIndex: number;
|
|
10
|
-
coord: Coordinate;
|
|
11
|
-
selected: boolean;
|
|
12
|
-
isInEditMode: boolean;
|
|
13
|
-
feature: GeoJSON.Feature;
|
|
14
|
-
mouseX: number;
|
|
15
|
-
mouseY: number;
|
|
16
|
-
isHovered: boolean;
|
|
17
|
-
}
|
|
18
|
-
interface DrawFunction {
|
|
19
|
-
id: string;
|
|
20
|
-
drawMethod: (args: MapDrawDrawFunctionArgs) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const getDrawFunctionFromStore: (id: string) => DrawFunction['drawMethod'] | undefined;
|
|
23
|
-
export declare const registerDrawFunction: (drawFunction?: DrawFunction['drawMethod']) => string;
|
|
24
6
|
export declare const NEW_LINESTRING_CREATED = "new point in LineString created";
|
|
25
7
|
export declare const NEW_FEATURE_CREATED = "new feature created";
|
|
26
8
|
export declare const NEW_POINT_CREATED = "new point created";
|
|
27
|
-
export {};
|
|
File without changes
|