@opengeoweb/webmap-react 9.35.0 → 9.36.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
|
@@ -1948,8 +1948,9 @@ var MapDraw = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
1948
1948
|
screenCoords: result.screenCoords
|
|
1949
1949
|
};
|
|
1950
1950
|
onHoverFeature(_this2.featureEvent);
|
|
1951
|
-
} else {
|
|
1951
|
+
} else if (_this2.featureEvent) {
|
|
1952
1952
|
_this2.featureEvent = undefined;
|
|
1953
|
+
onHoverFeature(undefined);
|
|
1953
1954
|
}
|
|
1954
1955
|
var webmapjs = webmapUtils.getWMJSMapById(mapId);
|
|
1955
1956
|
webmapjs && webmapjs.draw('MapDraw::onHoverFeature');
|
|
@@ -2809,7 +2810,8 @@ var MapDraw = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2809
2810
|
var _this$props9 = this.props,
|
|
2810
2811
|
selectedFeatureIndex = _this$props9.selectedFeatureIndex,
|
|
2811
2812
|
isInEditMode = _this$props9.isInEditMode,
|
|
2812
|
-
mapId = _this$props9.mapId
|
|
2813
|
+
mapId = _this$props9.mapId,
|
|
2814
|
+
linkedFeatures = _this$props9.linkedFeatures;
|
|
2813
2815
|
if (!((_this$geojson3 = this.geojson) !== null && _this$geojson3 !== void 0 && (_this$geojson3 = _this$geojson3.features) !== null && _this$geojson3 !== void 0 && _this$geojson3.length)) {
|
|
2814
2816
|
return;
|
|
2815
2817
|
}
|
|
@@ -2969,8 +2971,8 @@ var MapDraw = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2969
2971
|
}
|
|
2970
2972
|
/* Draw selected feature to display it on top */
|
|
2971
2973
|
drawFeatureGeometry(this.getSelectedFeature(), selectedFeatureIndex);
|
|
2972
|
-
/*
|
|
2973
|
-
if (isInEditMode === true && this.mouseOverPolygonFeatureIndex === selectedFeatureIndex && this.mouseIsOverVertexNr === VERTEX.NONE && this.snappedPolygonIndex === SNAPPEDFEATURE.NONE && this.selectedEdge === EDGE.NONE || this.mouseIsOverVertexNr === VERTEX.MIDDLE_POINT_OF_FEATURE) {
|
|
2974
|
+
/* Highlight polygon with mousehover */
|
|
2975
|
+
if (isInEditMode === true && this.mouseOverPolygonFeatureIndex === selectedFeatureIndex && this.mouseIsOverVertexNr === VERTEX.NONE && this.snappedPolygonIndex === SNAPPEDFEATURE.NONE && this.selectedEdge === EDGE.NONE || this.mouseIsOverVertexNr === VERTEX.MIDDLE_POINT_OF_FEATURE || linkedFeatures) {
|
|
2974
2976
|
var _feature3 = this.getSelectedFeature();
|
|
2975
2977
|
var featureProperties = _feature3.properties;
|
|
2976
2978
|
if (this.mouseOverPolygonCoordinates.length >= 2) {
|
|
@@ -3491,6 +3493,7 @@ MapDraw.defaultProps = {
|
|
|
3491
3493
|
|
|
3492
3494
|
var MapDrawContainer = function MapDrawContainer(_ref) {
|
|
3493
3495
|
var featureLayers = _ref.featureLayers,
|
|
3496
|
+
linkedFeatures = _ref.linkedFeatures,
|
|
3494
3497
|
mapId = _ref.mapId;
|
|
3495
3498
|
return jsx(Fragment, {
|
|
3496
3499
|
children: featureLayers.map(function (layer) {
|
|
@@ -3501,6 +3504,7 @@ var MapDrawContainer = function MapDrawContainer(_ref) {
|
|
|
3501
3504
|
},
|
|
3502
3505
|
children: jsx(MapDraw, {
|
|
3503
3506
|
geojson: layer.geojson,
|
|
3507
|
+
linkedFeatures: linkedFeatures,
|
|
3504
3508
|
isInEditMode: layer.isInEditMode,
|
|
3505
3509
|
isInDeleteMode: layer.isInDeleteMode,
|
|
3506
3510
|
drawMode: layer.drawMode,
|
|
@@ -7404,7 +7408,8 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
7404
7408
|
passiveMap = _this$props5.passiveMap,
|
|
7405
7409
|
children = _this$props5.children,
|
|
7406
7410
|
onClick = _this$props5.onClick,
|
|
7407
|
-
mapId = _this$props5.mapId
|
|
7411
|
+
mapId = _this$props5.mapId,
|
|
7412
|
+
linkedFeatures = _this$props5.linkedFeatures;
|
|
7408
7413
|
var adagucInitialised = this.state.adagucInitialised;
|
|
7409
7414
|
var featureLayers = getFeatureLayers(children);
|
|
7410
7415
|
// TODO: Improve in https://gitlab.com/opengeoweb/opengeoweb/-/issues/4579
|
|
@@ -7467,6 +7472,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
7467
7472
|
children: children
|
|
7468
7473
|
}), adagucInitialised && featureLayers && featureLayers.length ? jsx(MapDrawContainer, {
|
|
7469
7474
|
featureLayers: featureLayers,
|
|
7475
|
+
linkedFeatures: linkedFeatures,
|
|
7470
7476
|
mapId: mapId
|
|
7471
7477
|
}) : null]
|
|
7472
7478
|
}), passiveMap &&
|
package/package.json
CHANGED
|
@@ -28,6 +28,7 @@ export interface FeatureEvent {
|
|
|
28
28
|
export interface MapDrawProps {
|
|
29
29
|
mapId: string;
|
|
30
30
|
geojson: GeoJSON.FeatureCollection;
|
|
31
|
+
linkedFeatures?: GeoJSON.FeatureCollection;
|
|
31
32
|
drawMode: string;
|
|
32
33
|
deletePolygonCallback?: string;
|
|
33
34
|
exitDrawModeCallback: (reason: DrawModeExitCallback, newGeoJSON?: GeoJSON.FeatureCollection) => void;
|
|
@@ -31,6 +31,7 @@ export interface ReactMapViewProps {
|
|
|
31
31
|
holdShiftToScroll?: boolean;
|
|
32
32
|
shouldDisablePrefetching?: boolean;
|
|
33
33
|
t?: TFunction;
|
|
34
|
+
linkedFeatures?: GeoJSON.FeatureCollection;
|
|
34
35
|
onWMJSMount?: (mapId: string) => void;
|
|
35
36
|
onWMJSUnMount?: (mapId: string) => void;
|
|
36
37
|
onMapChangeDimension?: (payload: SetMapDimensionPayload) => void;
|
|
@@ -46,6 +47,9 @@ export interface MapLocation {
|
|
|
46
47
|
projectionX?: number;
|
|
47
48
|
projectionY?: number;
|
|
48
49
|
srs?: string;
|
|
50
|
+
id?: string;
|
|
51
|
+
serviceId?: string;
|
|
52
|
+
collectionId?: string;
|
|
49
53
|
}
|
|
50
54
|
export interface MapPinLocationPayload {
|
|
51
55
|
mapId: string;
|