react-map4d-map 1.2.2 → 1.2.4
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/dist/components/MFDirectionsRenderer.d.ts +3 -0
- package/dist/components/MFMarker.d.ts +3 -0
- package/dist/components/MFPolyline.d.ts +3 -0
- package/dist/enum/mapEventEnum.d.ts +4 -1
- package/dist/index.js +187 -57
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +187 -57
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,6 +23,9 @@ interface DirectionsRendererProps {
|
|
|
23
23
|
map?: map4d.Map;
|
|
24
24
|
onCreated?: (directionsRenderer?: map4d.DirectionsRenderer) => void;
|
|
25
25
|
onHover?: (directions: any) => void;
|
|
26
|
+
onMouseOut?: (marker: any) => void;
|
|
27
|
+
onMouseOver?: (marker: any) => void;
|
|
28
|
+
onMouseMove?: (marker: any) => void;
|
|
26
29
|
}
|
|
27
30
|
declare const MFDirectionsRenderer: (props: DirectionsRendererProps) => null;
|
|
28
31
|
export default MFDirectionsRenderer;
|
|
@@ -28,6 +28,9 @@ interface MarkerProps {
|
|
|
28
28
|
onRightClick?: (marker: any) => void;
|
|
29
29
|
onDragEnd?: (marker: any) => void;
|
|
30
30
|
onHover?: (marker: any) => void;
|
|
31
|
+
onMouseOut?: (marker: any) => void;
|
|
32
|
+
onMouseOver?: (marker: any) => void;
|
|
33
|
+
onMouseMove?: (marker: any) => void;
|
|
31
34
|
}
|
|
32
35
|
declare const MFMarker: (props: MarkerProps) => null;
|
|
33
36
|
export default MFMarker;
|
|
@@ -14,6 +14,9 @@ interface PolylineProps {
|
|
|
14
14
|
onCreated?: (polyline: map4d.Polyline) => void;
|
|
15
15
|
onHover?: (polyline: any) => void;
|
|
16
16
|
onClick?: (polyline: any) => void;
|
|
17
|
+
onMouseOut?: (marker: any) => void;
|
|
18
|
+
onMouseOver?: (marker: any) => void;
|
|
19
|
+
onMouseMove?: (marker: any) => void;
|
|
17
20
|
}
|
|
18
21
|
declare const MFPolyline: (props: PolylineProps) => null;
|
|
19
22
|
export default MFPolyline;
|
package/dist/index.js
CHANGED
|
@@ -444,7 +444,10 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
444
444
|
onMarkerDragEnd = props.onMarkerDragEnd,
|
|
445
445
|
map = props.map,
|
|
446
446
|
onHover = props.onHover,
|
|
447
|
-
onCreated = props.onCreated
|
|
447
|
+
onCreated = props.onCreated,
|
|
448
|
+
onMouseOut = props.onMouseOut,
|
|
449
|
+
onMouseOver = props.onMouseOver,
|
|
450
|
+
onMouseMove = props.onMouseMove;
|
|
448
451
|
var map4dContext = React.useContext(Map4dContext);
|
|
449
452
|
var theMap = map || map4dContext.map;
|
|
450
453
|
var directionRef = React.useRef();
|
|
@@ -478,6 +481,9 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
478
481
|
directionRef.current = new map4d.DirectionsRenderer(option);
|
|
479
482
|
(_directionRef$current = directionRef.current) === null || _directionRef$current === void 0 ? void 0 : _directionRef$current.setMap(theMap);
|
|
480
483
|
directionRef.current.onHover = props.onHover;
|
|
484
|
+
directionRef.current.onMouseOut = onMouseOut;
|
|
485
|
+
directionRef.current.onMouseOver = onMouseOver;
|
|
486
|
+
directionRef.current.onMouseMove = onMouseMove;
|
|
481
487
|
onCreated && onCreated(directionRef.current);
|
|
482
488
|
}
|
|
483
489
|
}, [theMap]);
|
|
@@ -486,6 +492,21 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
486
492
|
directionRef.current.onHover = onHover;
|
|
487
493
|
}
|
|
488
494
|
}, [onHover]);
|
|
495
|
+
React.useEffect(function () {
|
|
496
|
+
if (directionRef.current) {
|
|
497
|
+
directionRef.current.onMouseOut = onMouseOut;
|
|
498
|
+
}
|
|
499
|
+
}, [onMouseOut]);
|
|
500
|
+
React.useEffect(function () {
|
|
501
|
+
if (directionRef.current) {
|
|
502
|
+
directionRef.current.onMouseOver = onMouseOver;
|
|
503
|
+
}
|
|
504
|
+
}, [onMouseOver]);
|
|
505
|
+
React.useEffect(function () {
|
|
506
|
+
if (directionRef.current) {
|
|
507
|
+
directionRef.current.onMouseMove = onMouseMove;
|
|
508
|
+
}
|
|
509
|
+
}, [onMouseMove]);
|
|
489
510
|
React.useEffect(function () {
|
|
490
511
|
if (theMap) {
|
|
491
512
|
var _directionRef$current2;
|
|
@@ -818,7 +839,7 @@ var MFMap = function MFMap(props) {
|
|
|
818
839
|
}, [props.environment, props.version, props.accessKey]);
|
|
819
840
|
|
|
820
841
|
var registerEvent = function registerEvent() {
|
|
821
|
-
var _mapRef$current2, _mapRef$current3, _mapRef$current4, _mapRef$current5, _mapRef$current6, _mapRef$current7, _mapRef$current8, _mapRef$current9;
|
|
842
|
+
var _mapRef$current2, _mapRef$current3, _mapRef$current4, _mapRef$current5, _mapRef$current6, _mapRef$current7, _mapRef$current8, _mapRef$current9, _mapRef$current10, _mapRef$current11, _mapRef$current12, _mapRef$current13, _mapRef$current14, _mapRef$current15, _mapRef$current16, _mapRef$current17, _mapRef$current18;
|
|
822
843
|
|
|
823
844
|
var eventClickMarker = (_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 ? void 0 : _mapRef$current2.addListener("click", function (args) {
|
|
824
845
|
var _args$marker, _args$marker2;
|
|
@@ -876,12 +897,75 @@ var MFMap = function MFMap(props) {
|
|
|
876
897
|
}, {
|
|
877
898
|
polyline: true
|
|
878
899
|
});
|
|
879
|
-
|
|
900
|
+
var eventMouseOutDirection = (_mapRef$current10 = mapRef.current) === null || _mapRef$current10 === void 0 ? void 0 : _mapRef$current10.addListener("mouseOut", function (args) {
|
|
901
|
+
var _args$renderer3, _args$renderer4;
|
|
902
|
+
|
|
903
|
+
((_args$renderer3 = args.renderer) === null || _args$renderer3 === void 0 ? void 0 : _args$renderer3.onMouseOut) && ((_args$renderer4 = args.renderer) === null || _args$renderer4 === void 0 ? void 0 : _args$renderer4.onMouseOut());
|
|
904
|
+
}, {
|
|
905
|
+
directions: true
|
|
906
|
+
});
|
|
907
|
+
var eventMouseOverDirection = (_mapRef$current11 = mapRef.current) === null || _mapRef$current11 === void 0 ? void 0 : _mapRef$current11.addListener("mouseOver", function (args) {
|
|
908
|
+
var _args$renderer5, _args$renderer6;
|
|
909
|
+
|
|
910
|
+
((_args$renderer5 = args.renderer) === null || _args$renderer5 === void 0 ? void 0 : _args$renderer5.onMouseOver) && ((_args$renderer6 = args.renderer) === null || _args$renderer6 === void 0 ? void 0 : _args$renderer6.onMouseOver());
|
|
911
|
+
}, {
|
|
912
|
+
directions: true
|
|
913
|
+
});
|
|
914
|
+
var eventMouseMoveDirection = (_mapRef$current12 = mapRef.current) === null || _mapRef$current12 === void 0 ? void 0 : _mapRef$current12.addListener("mouseMove", function (args) {
|
|
915
|
+
var _args$renderer7, _args$renderer8;
|
|
916
|
+
|
|
917
|
+
((_args$renderer7 = args.renderer) === null || _args$renderer7 === void 0 ? void 0 : _args$renderer7.onMouseMove) && ((_args$renderer8 = args.renderer) === null || _args$renderer8 === void 0 ? void 0 : _args$renderer8.onMouseMove());
|
|
918
|
+
}, {
|
|
919
|
+
directions: true
|
|
920
|
+
});
|
|
921
|
+
var eventMouseOutPolyline = (_mapRef$current13 = mapRef.current) === null || _mapRef$current13 === void 0 ? void 0 : _mapRef$current13.addListener("mouseOut", function (args) {
|
|
922
|
+
var _args$polyline5, _args$polyline6;
|
|
923
|
+
|
|
924
|
+
((_args$polyline5 = args.polyline) === null || _args$polyline5 === void 0 ? void 0 : _args$polyline5.onMouseOut) && ((_args$polyline6 = args.polyline) === null || _args$polyline6 === void 0 ? void 0 : _args$polyline6.onMouseOut());
|
|
925
|
+
}, {
|
|
926
|
+
polyline: true
|
|
927
|
+
});
|
|
928
|
+
var eventMouseOverPolyline = (_mapRef$current14 = mapRef.current) === null || _mapRef$current14 === void 0 ? void 0 : _mapRef$current14.addListener("mouseOver", function (args) {
|
|
929
|
+
var _args$polyline7, _args$polyline8;
|
|
930
|
+
|
|
931
|
+
((_args$polyline7 = args.polyline) === null || _args$polyline7 === void 0 ? void 0 : _args$polyline7.onMouseOver) && ((_args$polyline8 = args.polyline) === null || _args$polyline8 === void 0 ? void 0 : _args$polyline8.onMouseOver());
|
|
932
|
+
}, {
|
|
933
|
+
polyline: true
|
|
934
|
+
});
|
|
935
|
+
var eventMouseMovePolyline = (_mapRef$current15 = mapRef.current) === null || _mapRef$current15 === void 0 ? void 0 : _mapRef$current15.addListener("mouseMove", function (args) {
|
|
936
|
+
var _args$polyline9, _args$polyline10;
|
|
937
|
+
|
|
938
|
+
((_args$polyline9 = args.polyline) === null || _args$polyline9 === void 0 ? void 0 : _args$polyline9.onMouseMove) && ((_args$polyline10 = args.polyline) === null || _args$polyline10 === void 0 ? void 0 : _args$polyline10.onMouseMove());
|
|
939
|
+
}, {
|
|
940
|
+
polyline: true
|
|
941
|
+
});
|
|
942
|
+
var eventMouseOutMarker = (_mapRef$current16 = mapRef.current) === null || _mapRef$current16 === void 0 ? void 0 : _mapRef$current16.addListener("mouseOut", function (args) {
|
|
943
|
+
var _args$marker9, _args$marker10;
|
|
944
|
+
|
|
945
|
+
((_args$marker9 = args.marker) === null || _args$marker9 === void 0 ? void 0 : _args$marker9.onMouseOut) && ((_args$marker10 = args.marker) === null || _args$marker10 === void 0 ? void 0 : _args$marker10.onMouseOut());
|
|
946
|
+
}, {
|
|
947
|
+
marker: true
|
|
948
|
+
});
|
|
949
|
+
var eventMouseOverMarker = (_mapRef$current17 = mapRef.current) === null || _mapRef$current17 === void 0 ? void 0 : _mapRef$current17.addListener("mouseOver", function (args) {
|
|
950
|
+
var _args$marker11, _args$marker12;
|
|
951
|
+
|
|
952
|
+
((_args$marker11 = args.marker) === null || _args$marker11 === void 0 ? void 0 : _args$marker11.onMouseOver) && ((_args$marker12 = args.marker) === null || _args$marker12 === void 0 ? void 0 : _args$marker12.onMouseOver());
|
|
953
|
+
}, {
|
|
954
|
+
marker: true
|
|
955
|
+
});
|
|
956
|
+
var eventMouseMoveMarker = (_mapRef$current18 = mapRef.current) === null || _mapRef$current18 === void 0 ? void 0 : _mapRef$current18.addListener("mouseMove", function (args) {
|
|
957
|
+
var _args$marker13, _args$marker14;
|
|
958
|
+
|
|
959
|
+
((_args$marker13 = args.marker) === null || _args$marker13 === void 0 ? void 0 : _args$marker13.onMouseMove) && ((_args$marker14 = args.marker) === null || _args$marker14 === void 0 ? void 0 : _args$marker14.onMouseMove());
|
|
960
|
+
}, {
|
|
961
|
+
marker: true
|
|
962
|
+
});
|
|
963
|
+
events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection, eventClickPolyline, eventMouseOutDirection, eventMouseOverDirection, eventMouseMoveDirection, eventMouseOutPolyline, eventMouseOverPolyline, eventMouseMovePolyline, eventMouseOutMarker, eventMouseOverMarker, eventMouseMoveMarker]);
|
|
880
964
|
|
|
881
965
|
if (props.onClickLocation) {
|
|
882
|
-
var _mapRef$
|
|
966
|
+
var _mapRef$current19;
|
|
883
967
|
|
|
884
|
-
var onClickLocation = (_mapRef$
|
|
968
|
+
var onClickLocation = (_mapRef$current19 = mapRef.current) === null || _mapRef$current19 === void 0 ? void 0 : _mapRef$current19.addListener("click", function (args) {
|
|
885
969
|
props.onClickLocation && props.onClickLocation(args);
|
|
886
970
|
}, {
|
|
887
971
|
location: true
|
|
@@ -890,9 +974,9 @@ var MFMap = function MFMap(props) {
|
|
|
890
974
|
}
|
|
891
975
|
|
|
892
976
|
if (props.onRightClickLocation) {
|
|
893
|
-
var _mapRef$
|
|
977
|
+
var _mapRef$current20;
|
|
894
978
|
|
|
895
|
-
var onRightClickLocation = (_mapRef$
|
|
979
|
+
var onRightClickLocation = (_mapRef$current20 = mapRef.current) === null || _mapRef$current20 === void 0 ? void 0 : _mapRef$current20.addListener("rightClick", function (args) {
|
|
896
980
|
props.onRightClickLocation && props.onRightClickLocation(args);
|
|
897
981
|
}, {
|
|
898
982
|
location: true
|
|
@@ -901,9 +985,9 @@ var MFMap = function MFMap(props) {
|
|
|
901
985
|
}
|
|
902
986
|
|
|
903
987
|
if (props.onTilesLoaded) {
|
|
904
|
-
var _mapRef$
|
|
988
|
+
var _mapRef$current21;
|
|
905
989
|
|
|
906
|
-
var onTilesLoaded = (_mapRef$
|
|
990
|
+
var onTilesLoaded = (_mapRef$current21 = mapRef.current) === null || _mapRef$current21 === void 0 ? void 0 : _mapRef$current21.addListener("tilesLoaded", function (args) {
|
|
907
991
|
props.onTilesLoaded && props.onTilesLoaded(args);
|
|
908
992
|
}, {
|
|
909
993
|
location: true
|
|
@@ -912,9 +996,9 @@ var MFMap = function MFMap(props) {
|
|
|
912
996
|
}
|
|
913
997
|
|
|
914
998
|
if (props.onCameraChanging) {
|
|
915
|
-
var _mapRef$
|
|
999
|
+
var _mapRef$current22;
|
|
916
1000
|
|
|
917
|
-
var onCameraChanging = (_mapRef$
|
|
1001
|
+
var onCameraChanging = (_mapRef$current22 = mapRef.current) === null || _mapRef$current22 === void 0 ? void 0 : _mapRef$current22.addListener("cameraChanging", function (args) {
|
|
918
1002
|
props.onCameraChanging && props.onCameraChanging(args);
|
|
919
1003
|
}, {
|
|
920
1004
|
location: true
|
|
@@ -965,7 +1049,10 @@ var MFMarker = function MFMarker(props) {
|
|
|
965
1049
|
onClick = props.onClick,
|
|
966
1050
|
onRightClick = props.onRightClick,
|
|
967
1051
|
onDragEnd = props.onDragEnd,
|
|
968
|
-
onHover = props.onHover
|
|
1052
|
+
onHover = props.onHover,
|
|
1053
|
+
onMouseOut = props.onMouseOut,
|
|
1054
|
+
onMouseOver = props.onMouseOver,
|
|
1055
|
+
onMouseMove = props.onMouseMove;
|
|
969
1056
|
var map4dContext = React.useContext(Map4dContext);
|
|
970
1057
|
var markerClusterContext = React.useContext(MarkerClusterContext);
|
|
971
1058
|
var theMap = map || map4dContext.map;
|
|
@@ -1017,13 +1104,18 @@ var MFMarker = function MFMarker(props) {
|
|
|
1017
1104
|
}
|
|
1018
1105
|
|
|
1019
1106
|
if (props.showInfoWindow != undefined) {
|
|
1020
|
-
|
|
1107
|
+
var _markerRef$current, _markerRef$current2;
|
|
1108
|
+
|
|
1109
|
+
props.showInfoWindow ? (_markerRef$current = markerRef.current) === null || _markerRef$current === void 0 ? void 0 : _markerRef$current.showInfoWindow() : (_markerRef$current2 = markerRef.current) === null || _markerRef$current2 === void 0 ? void 0 : _markerRef$current2.hideInfoWindow();
|
|
1021
1110
|
}
|
|
1022
1111
|
|
|
1023
1112
|
markerRef.current.onClick = onClick;
|
|
1024
1113
|
markerRef.current.onRightClick = props.onRightClick;
|
|
1025
1114
|
markerRef.current.onDragEnd = props.onDragEnd;
|
|
1026
1115
|
markerRef.current.onHover = props.onHover;
|
|
1116
|
+
markerRef.current.onMouseOut = onMouseOut;
|
|
1117
|
+
markerRef.current.onMouseOver = onMouseOver;
|
|
1118
|
+
markerRef.current.onMouseMove = onMouseMove;
|
|
1027
1119
|
onCreated && onCreated(markerRef.current);
|
|
1028
1120
|
(markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker(markerRef.current));
|
|
1029
1121
|
}
|
|
@@ -1031,26 +1123,26 @@ var MFMarker = function MFMarker(props) {
|
|
|
1031
1123
|
React.useEffect(function () {
|
|
1032
1124
|
if (theMap) {
|
|
1033
1125
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1034
|
-
var _markerRef$
|
|
1126
|
+
var _markerRef$current3;
|
|
1035
1127
|
|
|
1036
|
-
(_markerRef$
|
|
1128
|
+
(_markerRef$current3 = markerRef.current) === null || _markerRef$current3 === void 0 ? void 0 : _markerRef$current3.setMap(theMap);
|
|
1037
1129
|
}
|
|
1038
1130
|
}
|
|
1039
1131
|
|
|
1040
1132
|
return function () {
|
|
1041
1133
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1042
|
-
var _markerRef$
|
|
1134
|
+
var _markerRef$current4;
|
|
1043
1135
|
|
|
1044
|
-
(_markerRef$
|
|
1136
|
+
(_markerRef$current4 = markerRef.current) === null || _markerRef$current4 === void 0 ? void 0 : _markerRef$current4.setMap(null);
|
|
1045
1137
|
}
|
|
1046
1138
|
};
|
|
1047
1139
|
}, [theMap]);
|
|
1048
1140
|
React.useEffect(function () {
|
|
1049
1141
|
return function () {
|
|
1050
1142
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1051
|
-
var _markerRef$
|
|
1143
|
+
var _markerRef$current5;
|
|
1052
1144
|
|
|
1053
|
-
(_markerRef$
|
|
1145
|
+
(_markerRef$current5 = markerRef.current) === null || _markerRef$current5 === void 0 ? void 0 : _markerRef$current5.setMap(null);
|
|
1054
1146
|
}
|
|
1055
1147
|
|
|
1056
1148
|
markerRef.current && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker(markerRef.current));
|
|
@@ -1061,6 +1153,21 @@ var MFMarker = function MFMarker(props) {
|
|
|
1061
1153
|
markerRef.current.onHover = onHover;
|
|
1062
1154
|
}
|
|
1063
1155
|
}, [onHover]);
|
|
1156
|
+
React.useEffect(function () {
|
|
1157
|
+
if (markerRef.current) {
|
|
1158
|
+
markerRef.current.onMouseOut = onMouseOut;
|
|
1159
|
+
}
|
|
1160
|
+
}, [onMouseOut]);
|
|
1161
|
+
React.useEffect(function () {
|
|
1162
|
+
if (markerRef.current) {
|
|
1163
|
+
markerRef.current.onMouseOver = onMouseOver;
|
|
1164
|
+
}
|
|
1165
|
+
}, [onMouseOver]);
|
|
1166
|
+
React.useEffect(function () {
|
|
1167
|
+
if (markerRef.current) {
|
|
1168
|
+
markerRef.current.onMouseMove = onMouseMove;
|
|
1169
|
+
}
|
|
1170
|
+
}, [onMouseMove]);
|
|
1064
1171
|
React.useEffect(function () {
|
|
1065
1172
|
if (markerRef.current) {
|
|
1066
1173
|
markerRef.current.onClick = onClick;
|
|
@@ -1077,98 +1184,100 @@ var MFMarker = function MFMarker(props) {
|
|
|
1077
1184
|
}
|
|
1078
1185
|
}, [onDragEnd]);
|
|
1079
1186
|
React.useEffect(function () {
|
|
1080
|
-
var _markerRef$
|
|
1187
|
+
var _markerRef$current6;
|
|
1081
1188
|
|
|
1082
|
-
(_markerRef$
|
|
1189
|
+
(_markerRef$current6 = markerRef.current) === null || _markerRef$current6 === void 0 ? void 0 : _markerRef$current6.setPosition(position);
|
|
1083
1190
|
}, [position]);
|
|
1084
1191
|
React.useEffect(function () {
|
|
1085
|
-
var _markerRef$
|
|
1192
|
+
var _markerRef$current7;
|
|
1086
1193
|
|
|
1087
|
-
(_markerRef$
|
|
1194
|
+
(_markerRef$current7 = markerRef.current) === null || _markerRef$current7 === void 0 ? void 0 : _markerRef$current7.setVisible(visible);
|
|
1088
1195
|
}, [visible]);
|
|
1089
1196
|
React.useEffect(function () {
|
|
1090
|
-
var _markerRef$
|
|
1197
|
+
var _markerRef$current8;
|
|
1091
1198
|
|
|
1092
|
-
anchor != undefined && ((_markerRef$
|
|
1199
|
+
anchor != undefined && ((_markerRef$current8 = markerRef.current) === null || _markerRef$current8 === void 0 ? void 0 : _markerRef$current8.setAnchor(anchor));
|
|
1093
1200
|
}, [anchor]);
|
|
1094
1201
|
React.useEffect(function () {
|
|
1095
|
-
var _markerRef$
|
|
1202
|
+
var _markerRef$current9;
|
|
1096
1203
|
|
|
1097
|
-
labelAnchor != undefined && ((_markerRef$
|
|
1204
|
+
labelAnchor != undefined && ((_markerRef$current9 = markerRef.current) === null || _markerRef$current9 === void 0 ? void 0 : _markerRef$current9.setLabelAnchor(labelAnchor));
|
|
1098
1205
|
}, [labelAnchor]);
|
|
1099
1206
|
React.useEffect(function () {
|
|
1100
|
-
var _markerRef$
|
|
1207
|
+
var _markerRef$current10;
|
|
1101
1208
|
|
|
1102
|
-
icon != undefined && ((_markerRef$
|
|
1209
|
+
icon != undefined && ((_markerRef$current10 = markerRef.current) === null || _markerRef$current10 === void 0 ? void 0 : _markerRef$current10.setIcon(icon));
|
|
1103
1210
|
}, [icon]);
|
|
1104
1211
|
React.useEffect(function () {
|
|
1105
|
-
var _markerRef$
|
|
1212
|
+
var _markerRef$current11;
|
|
1106
1213
|
|
|
1107
|
-
elevation != undefined && ((_markerRef$
|
|
1214
|
+
elevation != undefined && ((_markerRef$current11 = markerRef.current) === null || _markerRef$current11 === void 0 ? void 0 : _markerRef$current11.setElevation(elevation));
|
|
1108
1215
|
}, [elevation]);
|
|
1109
1216
|
React.useEffect(function () {
|
|
1110
|
-
var _markerRef$
|
|
1217
|
+
var _markerRef$current12;
|
|
1111
1218
|
|
|
1112
|
-
rotation != undefined && ((_markerRef$
|
|
1219
|
+
rotation != undefined && ((_markerRef$current12 = markerRef.current) === null || _markerRef$current12 === void 0 ? void 0 : _markerRef$current12.setRotation(rotation));
|
|
1113
1220
|
}, [rotation]);
|
|
1114
1221
|
React.useEffect(function () {
|
|
1115
|
-
var _markerRef$
|
|
1222
|
+
var _markerRef$current13;
|
|
1116
1223
|
|
|
1117
|
-
title != undefined && ((_markerRef$
|
|
1224
|
+
title != undefined && ((_markerRef$current13 = markerRef.current) === null || _markerRef$current13 === void 0 ? void 0 : _markerRef$current13.setTitle(title));
|
|
1118
1225
|
}, [title]);
|
|
1119
1226
|
React.useEffect(function () {
|
|
1120
|
-
var _markerRef$
|
|
1227
|
+
var _markerRef$current14;
|
|
1121
1228
|
|
|
1122
|
-
snippet != undefined && ((_markerRef$
|
|
1229
|
+
snippet != undefined && ((_markerRef$current14 = markerRef.current) === null || _markerRef$current14 === void 0 ? void 0 : _markerRef$current14.setSnippet(snippet));
|
|
1123
1230
|
}, [snippet]);
|
|
1124
1231
|
React.useEffect(function () {
|
|
1125
|
-
var _markerRef$
|
|
1232
|
+
var _markerRef$current15;
|
|
1126
1233
|
|
|
1127
|
-
windowAnchor != undefined && ((_markerRef$
|
|
1234
|
+
windowAnchor != undefined && ((_markerRef$current15 = markerRef.current) === null || _markerRef$current15 === void 0 ? void 0 : _markerRef$current15.setWindowAnchor(windowAnchor));
|
|
1128
1235
|
}, [windowAnchor]);
|
|
1129
1236
|
React.useEffect(function () {
|
|
1130
|
-
var _markerRef$
|
|
1237
|
+
var _markerRef$current16;
|
|
1131
1238
|
|
|
1132
|
-
zIndex != undefined && ((_markerRef$
|
|
1239
|
+
zIndex != undefined && ((_markerRef$current16 = markerRef.current) === null || _markerRef$current16 === void 0 ? void 0 : _markerRef$current16.setZIndex(zIndex));
|
|
1133
1240
|
}, [zIndex]);
|
|
1134
1241
|
React.useEffect(function () {
|
|
1135
|
-
var _markerRef$
|
|
1242
|
+
var _markerRef$current17;
|
|
1136
1243
|
|
|
1137
|
-
label != undefined && ((_markerRef$
|
|
1244
|
+
label != undefined && ((_markerRef$current17 = markerRef.current) === null || _markerRef$current17 === void 0 ? void 0 : _markerRef$current17.setLabel(label));
|
|
1138
1245
|
}, [label]);
|
|
1139
1246
|
React.useEffect(function () {
|
|
1140
|
-
var _markerRef$
|
|
1247
|
+
var _markerRef$current18;
|
|
1141
1248
|
|
|
1142
|
-
draggable != undefined && ((_markerRef$
|
|
1249
|
+
draggable != undefined && ((_markerRef$current18 = markerRef.current) === null || _markerRef$current18 === void 0 ? void 0 : _markerRef$current18.setDraggable(draggable));
|
|
1143
1250
|
}, [draggable]);
|
|
1144
1251
|
React.useEffect(function () {
|
|
1145
|
-
var _markerRef$
|
|
1252
|
+
var _markerRef$current19;
|
|
1146
1253
|
|
|
1147
|
-
iconView != undefined && ((_markerRef$
|
|
1254
|
+
iconView != undefined && ((_markerRef$current19 = markerRef.current) === null || _markerRef$current19 === void 0 ? void 0 : _markerRef$current19.setIconView(iconView));
|
|
1148
1255
|
}, [iconView]);
|
|
1149
1256
|
React.useEffect(function () {
|
|
1150
|
-
var _markerRef$
|
|
1257
|
+
var _markerRef$current20;
|
|
1151
1258
|
|
|
1152
|
-
userInteractionEnabled != undefined && ((_markerRef$
|
|
1259
|
+
userInteractionEnabled != undefined && ((_markerRef$current20 = markerRef.current) === null || _markerRef$current20 === void 0 ? void 0 : _markerRef$current20.setUserInteraction(userInteractionEnabled));
|
|
1153
1260
|
}, [userInteractionEnabled]);
|
|
1154
1261
|
React.useEffect(function () {
|
|
1155
|
-
var _markerRef$
|
|
1262
|
+
var _markerRef$current21;
|
|
1156
1263
|
|
|
1157
|
-
icon != undefined && ((_markerRef$
|
|
1264
|
+
icon != undefined && ((_markerRef$current21 = markerRef.current) === null || _markerRef$current21 === void 0 ? void 0 : _markerRef$current21.setIcon(new map4d.Icon(icon.width, icon.height, icon.url)));
|
|
1158
1265
|
}, [icon]);
|
|
1159
1266
|
React.useEffect(function () {
|
|
1160
|
-
var _markerRef$
|
|
1267
|
+
var _markerRef$current22;
|
|
1161
1268
|
|
|
1162
|
-
props.infoWindow != undefined && ((_markerRef$
|
|
1269
|
+
props.infoWindow != undefined && ((_markerRef$current22 = markerRef.current) === null || _markerRef$current22 === void 0 ? void 0 : _markerRef$current22.setInfoWindow(props.infoWindow));
|
|
1163
1270
|
}, [props.infoWindow]);
|
|
1164
1271
|
React.useEffect(function () {
|
|
1165
|
-
var _markerRef$
|
|
1272
|
+
var _markerRef$current23;
|
|
1166
1273
|
|
|
1167
|
-
props.infoContents != undefined && ((_markerRef$
|
|
1274
|
+
props.infoContents != undefined && ((_markerRef$current23 = markerRef.current) === null || _markerRef$current23 === void 0 ? void 0 : _markerRef$current23.setInfoContents(props.infoContents));
|
|
1168
1275
|
}, [props.infoContents]);
|
|
1169
1276
|
React.useEffect(function () {
|
|
1170
1277
|
if (props.showInfoWindow != undefined) {
|
|
1171
|
-
|
|
1278
|
+
var _markerRef$current24, _markerRef$current25;
|
|
1279
|
+
|
|
1280
|
+
props.showInfoWindow ? (_markerRef$current24 = markerRef.current) === null || _markerRef$current24 === void 0 ? void 0 : _markerRef$current24.showInfoWindow() : (_markerRef$current25 = markerRef.current) === null || _markerRef$current25 === void 0 ? void 0 : _markerRef$current25.hideInfoWindow();
|
|
1172
1281
|
}
|
|
1173
1282
|
}, [props.showInfoWindow]);
|
|
1174
1283
|
return null;
|
|
@@ -1599,7 +1708,10 @@ var MFPolyline = function MFPolyline(props) {
|
|
|
1599
1708
|
map = props.map,
|
|
1600
1709
|
onClick = props.onClick,
|
|
1601
1710
|
onHover = props.onHover,
|
|
1602
|
-
onCreated = props.onCreated
|
|
1711
|
+
onCreated = props.onCreated,
|
|
1712
|
+
onMouseOut = props.onMouseOut,
|
|
1713
|
+
onMouseOver = props.onMouseOver,
|
|
1714
|
+
onMouseMove = props.onMouseMove;
|
|
1603
1715
|
var map4dContext = React.useContext(Map4dContext);
|
|
1604
1716
|
var theMap = map || map4dContext.map;
|
|
1605
1717
|
var polylineRef = React.useRef();
|
|
@@ -1632,6 +1744,9 @@ var MFPolyline = function MFPolyline(props) {
|
|
|
1632
1744
|
(_polylineRef$current = polylineRef.current) === null || _polylineRef$current === void 0 ? void 0 : _polylineRef$current.setMap(theMap);
|
|
1633
1745
|
polylineRef.current.onHover = props.onHover;
|
|
1634
1746
|
polylineRef.current.onClick = props.onClick;
|
|
1747
|
+
polylineRef.current.onMouseOut = onMouseOut;
|
|
1748
|
+
polylineRef.current.onMouseOver = onMouseOver;
|
|
1749
|
+
polylineRef.current.onMouseMove = onMouseMove;
|
|
1635
1750
|
onCreated && onCreated(polylineRef.current);
|
|
1636
1751
|
}
|
|
1637
1752
|
}, [theMap]);
|
|
@@ -1660,6 +1775,21 @@ var MFPolyline = function MFPolyline(props) {
|
|
|
1660
1775
|
polylineRef.current.onHover = onHover;
|
|
1661
1776
|
}
|
|
1662
1777
|
}, [onHover]);
|
|
1778
|
+
React.useEffect(function () {
|
|
1779
|
+
if (polylineRef.current) {
|
|
1780
|
+
polylineRef.current.onMouseOut = onMouseOut;
|
|
1781
|
+
}
|
|
1782
|
+
}, [onMouseOut]);
|
|
1783
|
+
React.useEffect(function () {
|
|
1784
|
+
if (polylineRef.current) {
|
|
1785
|
+
polylineRef.current.onMouseOver = onMouseOver;
|
|
1786
|
+
}
|
|
1787
|
+
}, [onMouseOver]);
|
|
1788
|
+
React.useEffect(function () {
|
|
1789
|
+
if (polylineRef.current) {
|
|
1790
|
+
polylineRef.current.onMouseMove = onMouseMove;
|
|
1791
|
+
}
|
|
1792
|
+
}, [onMouseMove]);
|
|
1663
1793
|
React.useEffect(function () {
|
|
1664
1794
|
if (polylineRef.current) {
|
|
1665
1795
|
polylineRef.current.onClick = onClick;
|