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
package/dist/index.modern.js
CHANGED
|
@@ -441,7 +441,10 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
441
441
|
onMarkerDragEnd = props.onMarkerDragEnd,
|
|
442
442
|
map = props.map,
|
|
443
443
|
onHover = props.onHover,
|
|
444
|
-
onCreated = props.onCreated
|
|
444
|
+
onCreated = props.onCreated,
|
|
445
|
+
onMouseOut = props.onMouseOut,
|
|
446
|
+
onMouseOver = props.onMouseOver,
|
|
447
|
+
onMouseMove = props.onMouseMove;
|
|
445
448
|
var map4dContext = useContext(Map4dContext);
|
|
446
449
|
var theMap = map || map4dContext.map;
|
|
447
450
|
var directionRef = useRef();
|
|
@@ -475,6 +478,9 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
475
478
|
directionRef.current = new map4d.DirectionsRenderer(option);
|
|
476
479
|
(_directionRef$current = directionRef.current) === null || _directionRef$current === void 0 ? void 0 : _directionRef$current.setMap(theMap);
|
|
477
480
|
directionRef.current.onHover = props.onHover;
|
|
481
|
+
directionRef.current.onMouseOut = onMouseOut;
|
|
482
|
+
directionRef.current.onMouseOver = onMouseOver;
|
|
483
|
+
directionRef.current.onMouseMove = onMouseMove;
|
|
478
484
|
onCreated && onCreated(directionRef.current);
|
|
479
485
|
}
|
|
480
486
|
}, [theMap]);
|
|
@@ -483,6 +489,21 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
483
489
|
directionRef.current.onHover = onHover;
|
|
484
490
|
}
|
|
485
491
|
}, [onHover]);
|
|
492
|
+
useEffect(function () {
|
|
493
|
+
if (directionRef.current) {
|
|
494
|
+
directionRef.current.onMouseOut = onMouseOut;
|
|
495
|
+
}
|
|
496
|
+
}, [onMouseOut]);
|
|
497
|
+
useEffect(function () {
|
|
498
|
+
if (directionRef.current) {
|
|
499
|
+
directionRef.current.onMouseOver = onMouseOver;
|
|
500
|
+
}
|
|
501
|
+
}, [onMouseOver]);
|
|
502
|
+
useEffect(function () {
|
|
503
|
+
if (directionRef.current) {
|
|
504
|
+
directionRef.current.onMouseMove = onMouseMove;
|
|
505
|
+
}
|
|
506
|
+
}, [onMouseMove]);
|
|
486
507
|
useEffect(function () {
|
|
487
508
|
if (theMap) {
|
|
488
509
|
var _directionRef$current2;
|
|
@@ -815,7 +836,7 @@ var MFMap = function MFMap(props) {
|
|
|
815
836
|
}, [props.environment, props.version, props.accessKey]);
|
|
816
837
|
|
|
817
838
|
var registerEvent = function registerEvent() {
|
|
818
|
-
var _mapRef$current2, _mapRef$current3, _mapRef$current4, _mapRef$current5, _mapRef$current6, _mapRef$current7, _mapRef$current8, _mapRef$current9;
|
|
839
|
+
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;
|
|
819
840
|
|
|
820
841
|
var eventClickMarker = (_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 ? void 0 : _mapRef$current2.addListener("click", function (args) {
|
|
821
842
|
var _args$marker, _args$marker2;
|
|
@@ -873,12 +894,75 @@ var MFMap = function MFMap(props) {
|
|
|
873
894
|
}, {
|
|
874
895
|
polyline: true
|
|
875
896
|
});
|
|
876
|
-
|
|
897
|
+
var eventMouseOutDirection = (_mapRef$current10 = mapRef.current) === null || _mapRef$current10 === void 0 ? void 0 : _mapRef$current10.addListener("mouseOut", function (args) {
|
|
898
|
+
var _args$renderer3, _args$renderer4;
|
|
899
|
+
|
|
900
|
+
((_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());
|
|
901
|
+
}, {
|
|
902
|
+
directions: true
|
|
903
|
+
});
|
|
904
|
+
var eventMouseOverDirection = (_mapRef$current11 = mapRef.current) === null || _mapRef$current11 === void 0 ? void 0 : _mapRef$current11.addListener("mouseOver", function (args) {
|
|
905
|
+
var _args$renderer5, _args$renderer6;
|
|
906
|
+
|
|
907
|
+
((_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());
|
|
908
|
+
}, {
|
|
909
|
+
directions: true
|
|
910
|
+
});
|
|
911
|
+
var eventMouseMoveDirection = (_mapRef$current12 = mapRef.current) === null || _mapRef$current12 === void 0 ? void 0 : _mapRef$current12.addListener("mouseMove", function (args) {
|
|
912
|
+
var _args$renderer7, _args$renderer8;
|
|
913
|
+
|
|
914
|
+
((_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());
|
|
915
|
+
}, {
|
|
916
|
+
directions: true
|
|
917
|
+
});
|
|
918
|
+
var eventMouseOutPolyline = (_mapRef$current13 = mapRef.current) === null || _mapRef$current13 === void 0 ? void 0 : _mapRef$current13.addListener("mouseOut", function (args) {
|
|
919
|
+
var _args$polyline5, _args$polyline6;
|
|
920
|
+
|
|
921
|
+
((_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());
|
|
922
|
+
}, {
|
|
923
|
+
polyline: true
|
|
924
|
+
});
|
|
925
|
+
var eventMouseOverPolyline = (_mapRef$current14 = mapRef.current) === null || _mapRef$current14 === void 0 ? void 0 : _mapRef$current14.addListener("mouseOver", function (args) {
|
|
926
|
+
var _args$polyline7, _args$polyline8;
|
|
927
|
+
|
|
928
|
+
((_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());
|
|
929
|
+
}, {
|
|
930
|
+
polyline: true
|
|
931
|
+
});
|
|
932
|
+
var eventMouseMovePolyline = (_mapRef$current15 = mapRef.current) === null || _mapRef$current15 === void 0 ? void 0 : _mapRef$current15.addListener("mouseMove", function (args) {
|
|
933
|
+
var _args$polyline9, _args$polyline10;
|
|
934
|
+
|
|
935
|
+
((_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());
|
|
936
|
+
}, {
|
|
937
|
+
polyline: true
|
|
938
|
+
});
|
|
939
|
+
var eventMouseOutMarker = (_mapRef$current16 = mapRef.current) === null || _mapRef$current16 === void 0 ? void 0 : _mapRef$current16.addListener("mouseOut", function (args) {
|
|
940
|
+
var _args$marker9, _args$marker10;
|
|
941
|
+
|
|
942
|
+
((_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());
|
|
943
|
+
}, {
|
|
944
|
+
marker: true
|
|
945
|
+
});
|
|
946
|
+
var eventMouseOverMarker = (_mapRef$current17 = mapRef.current) === null || _mapRef$current17 === void 0 ? void 0 : _mapRef$current17.addListener("mouseOver", function (args) {
|
|
947
|
+
var _args$marker11, _args$marker12;
|
|
948
|
+
|
|
949
|
+
((_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());
|
|
950
|
+
}, {
|
|
951
|
+
marker: true
|
|
952
|
+
});
|
|
953
|
+
var eventMouseMoveMarker = (_mapRef$current18 = mapRef.current) === null || _mapRef$current18 === void 0 ? void 0 : _mapRef$current18.addListener("mouseMove", function (args) {
|
|
954
|
+
var _args$marker13, _args$marker14;
|
|
955
|
+
|
|
956
|
+
((_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());
|
|
957
|
+
}, {
|
|
958
|
+
marker: true
|
|
959
|
+
});
|
|
960
|
+
events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection, eventClickPolyline, eventMouseOutDirection, eventMouseOverDirection, eventMouseMoveDirection, eventMouseOutPolyline, eventMouseOverPolyline, eventMouseMovePolyline, eventMouseOutMarker, eventMouseOverMarker, eventMouseMoveMarker]);
|
|
877
961
|
|
|
878
962
|
if (props.onClickLocation) {
|
|
879
|
-
var _mapRef$
|
|
963
|
+
var _mapRef$current19;
|
|
880
964
|
|
|
881
|
-
var onClickLocation = (_mapRef$
|
|
965
|
+
var onClickLocation = (_mapRef$current19 = mapRef.current) === null || _mapRef$current19 === void 0 ? void 0 : _mapRef$current19.addListener("click", function (args) {
|
|
882
966
|
props.onClickLocation && props.onClickLocation(args);
|
|
883
967
|
}, {
|
|
884
968
|
location: true
|
|
@@ -887,9 +971,9 @@ var MFMap = function MFMap(props) {
|
|
|
887
971
|
}
|
|
888
972
|
|
|
889
973
|
if (props.onRightClickLocation) {
|
|
890
|
-
var _mapRef$
|
|
974
|
+
var _mapRef$current20;
|
|
891
975
|
|
|
892
|
-
var onRightClickLocation = (_mapRef$
|
|
976
|
+
var onRightClickLocation = (_mapRef$current20 = mapRef.current) === null || _mapRef$current20 === void 0 ? void 0 : _mapRef$current20.addListener("rightClick", function (args) {
|
|
893
977
|
props.onRightClickLocation && props.onRightClickLocation(args);
|
|
894
978
|
}, {
|
|
895
979
|
location: true
|
|
@@ -898,9 +982,9 @@ var MFMap = function MFMap(props) {
|
|
|
898
982
|
}
|
|
899
983
|
|
|
900
984
|
if (props.onTilesLoaded) {
|
|
901
|
-
var _mapRef$
|
|
985
|
+
var _mapRef$current21;
|
|
902
986
|
|
|
903
|
-
var onTilesLoaded = (_mapRef$
|
|
987
|
+
var onTilesLoaded = (_mapRef$current21 = mapRef.current) === null || _mapRef$current21 === void 0 ? void 0 : _mapRef$current21.addListener("tilesLoaded", function (args) {
|
|
904
988
|
props.onTilesLoaded && props.onTilesLoaded(args);
|
|
905
989
|
}, {
|
|
906
990
|
location: true
|
|
@@ -909,9 +993,9 @@ var MFMap = function MFMap(props) {
|
|
|
909
993
|
}
|
|
910
994
|
|
|
911
995
|
if (props.onCameraChanging) {
|
|
912
|
-
var _mapRef$
|
|
996
|
+
var _mapRef$current22;
|
|
913
997
|
|
|
914
|
-
var onCameraChanging = (_mapRef$
|
|
998
|
+
var onCameraChanging = (_mapRef$current22 = mapRef.current) === null || _mapRef$current22 === void 0 ? void 0 : _mapRef$current22.addListener("cameraChanging", function (args) {
|
|
915
999
|
props.onCameraChanging && props.onCameraChanging(args);
|
|
916
1000
|
}, {
|
|
917
1001
|
location: true
|
|
@@ -962,7 +1046,10 @@ var MFMarker = function MFMarker(props) {
|
|
|
962
1046
|
onClick = props.onClick,
|
|
963
1047
|
onRightClick = props.onRightClick,
|
|
964
1048
|
onDragEnd = props.onDragEnd,
|
|
965
|
-
onHover = props.onHover
|
|
1049
|
+
onHover = props.onHover,
|
|
1050
|
+
onMouseOut = props.onMouseOut,
|
|
1051
|
+
onMouseOver = props.onMouseOver,
|
|
1052
|
+
onMouseMove = props.onMouseMove;
|
|
966
1053
|
var map4dContext = useContext(Map4dContext);
|
|
967
1054
|
var markerClusterContext = useContext(MarkerClusterContext);
|
|
968
1055
|
var theMap = map || map4dContext.map;
|
|
@@ -1014,13 +1101,18 @@ var MFMarker = function MFMarker(props) {
|
|
|
1014
1101
|
}
|
|
1015
1102
|
|
|
1016
1103
|
if (props.showInfoWindow != undefined) {
|
|
1017
|
-
|
|
1104
|
+
var _markerRef$current, _markerRef$current2;
|
|
1105
|
+
|
|
1106
|
+
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();
|
|
1018
1107
|
}
|
|
1019
1108
|
|
|
1020
1109
|
markerRef.current.onClick = onClick;
|
|
1021
1110
|
markerRef.current.onRightClick = props.onRightClick;
|
|
1022
1111
|
markerRef.current.onDragEnd = props.onDragEnd;
|
|
1023
1112
|
markerRef.current.onHover = props.onHover;
|
|
1113
|
+
markerRef.current.onMouseOut = onMouseOut;
|
|
1114
|
+
markerRef.current.onMouseOver = onMouseOver;
|
|
1115
|
+
markerRef.current.onMouseMove = onMouseMove;
|
|
1024
1116
|
onCreated && onCreated(markerRef.current);
|
|
1025
1117
|
(markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker(markerRef.current));
|
|
1026
1118
|
}
|
|
@@ -1028,26 +1120,26 @@ var MFMarker = function MFMarker(props) {
|
|
|
1028
1120
|
useEffect(function () {
|
|
1029
1121
|
if (theMap) {
|
|
1030
1122
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1031
|
-
var _markerRef$
|
|
1123
|
+
var _markerRef$current3;
|
|
1032
1124
|
|
|
1033
|
-
(_markerRef$
|
|
1125
|
+
(_markerRef$current3 = markerRef.current) === null || _markerRef$current3 === void 0 ? void 0 : _markerRef$current3.setMap(theMap);
|
|
1034
1126
|
}
|
|
1035
1127
|
}
|
|
1036
1128
|
|
|
1037
1129
|
return function () {
|
|
1038
1130
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1039
|
-
var _markerRef$
|
|
1131
|
+
var _markerRef$current4;
|
|
1040
1132
|
|
|
1041
|
-
(_markerRef$
|
|
1133
|
+
(_markerRef$current4 = markerRef.current) === null || _markerRef$current4 === void 0 ? void 0 : _markerRef$current4.setMap(null);
|
|
1042
1134
|
}
|
|
1043
1135
|
};
|
|
1044
1136
|
}, [theMap]);
|
|
1045
1137
|
useEffect(function () {
|
|
1046
1138
|
return function () {
|
|
1047
1139
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1048
|
-
var _markerRef$
|
|
1140
|
+
var _markerRef$current5;
|
|
1049
1141
|
|
|
1050
|
-
(_markerRef$
|
|
1142
|
+
(_markerRef$current5 = markerRef.current) === null || _markerRef$current5 === void 0 ? void 0 : _markerRef$current5.setMap(null);
|
|
1051
1143
|
}
|
|
1052
1144
|
|
|
1053
1145
|
markerRef.current && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker(markerRef.current));
|
|
@@ -1058,6 +1150,21 @@ var MFMarker = function MFMarker(props) {
|
|
|
1058
1150
|
markerRef.current.onHover = onHover;
|
|
1059
1151
|
}
|
|
1060
1152
|
}, [onHover]);
|
|
1153
|
+
useEffect(function () {
|
|
1154
|
+
if (markerRef.current) {
|
|
1155
|
+
markerRef.current.onMouseOut = onMouseOut;
|
|
1156
|
+
}
|
|
1157
|
+
}, [onMouseOut]);
|
|
1158
|
+
useEffect(function () {
|
|
1159
|
+
if (markerRef.current) {
|
|
1160
|
+
markerRef.current.onMouseOver = onMouseOver;
|
|
1161
|
+
}
|
|
1162
|
+
}, [onMouseOver]);
|
|
1163
|
+
useEffect(function () {
|
|
1164
|
+
if (markerRef.current) {
|
|
1165
|
+
markerRef.current.onMouseMove = onMouseMove;
|
|
1166
|
+
}
|
|
1167
|
+
}, [onMouseMove]);
|
|
1061
1168
|
useEffect(function () {
|
|
1062
1169
|
if (markerRef.current) {
|
|
1063
1170
|
markerRef.current.onClick = onClick;
|
|
@@ -1074,98 +1181,100 @@ var MFMarker = function MFMarker(props) {
|
|
|
1074
1181
|
}
|
|
1075
1182
|
}, [onDragEnd]);
|
|
1076
1183
|
useEffect(function () {
|
|
1077
|
-
var _markerRef$
|
|
1184
|
+
var _markerRef$current6;
|
|
1078
1185
|
|
|
1079
|
-
(_markerRef$
|
|
1186
|
+
(_markerRef$current6 = markerRef.current) === null || _markerRef$current6 === void 0 ? void 0 : _markerRef$current6.setPosition(position);
|
|
1080
1187
|
}, [position]);
|
|
1081
1188
|
useEffect(function () {
|
|
1082
|
-
var _markerRef$
|
|
1189
|
+
var _markerRef$current7;
|
|
1083
1190
|
|
|
1084
|
-
(_markerRef$
|
|
1191
|
+
(_markerRef$current7 = markerRef.current) === null || _markerRef$current7 === void 0 ? void 0 : _markerRef$current7.setVisible(visible);
|
|
1085
1192
|
}, [visible]);
|
|
1086
1193
|
useEffect(function () {
|
|
1087
|
-
var _markerRef$
|
|
1194
|
+
var _markerRef$current8;
|
|
1088
1195
|
|
|
1089
|
-
anchor != undefined && ((_markerRef$
|
|
1196
|
+
anchor != undefined && ((_markerRef$current8 = markerRef.current) === null || _markerRef$current8 === void 0 ? void 0 : _markerRef$current8.setAnchor(anchor));
|
|
1090
1197
|
}, [anchor]);
|
|
1091
1198
|
useEffect(function () {
|
|
1092
|
-
var _markerRef$
|
|
1199
|
+
var _markerRef$current9;
|
|
1093
1200
|
|
|
1094
|
-
labelAnchor != undefined && ((_markerRef$
|
|
1201
|
+
labelAnchor != undefined && ((_markerRef$current9 = markerRef.current) === null || _markerRef$current9 === void 0 ? void 0 : _markerRef$current9.setLabelAnchor(labelAnchor));
|
|
1095
1202
|
}, [labelAnchor]);
|
|
1096
1203
|
useEffect(function () {
|
|
1097
|
-
var _markerRef$
|
|
1204
|
+
var _markerRef$current10;
|
|
1098
1205
|
|
|
1099
|
-
icon != undefined && ((_markerRef$
|
|
1206
|
+
icon != undefined && ((_markerRef$current10 = markerRef.current) === null || _markerRef$current10 === void 0 ? void 0 : _markerRef$current10.setIcon(icon));
|
|
1100
1207
|
}, [icon]);
|
|
1101
1208
|
useEffect(function () {
|
|
1102
|
-
var _markerRef$
|
|
1209
|
+
var _markerRef$current11;
|
|
1103
1210
|
|
|
1104
|
-
elevation != undefined && ((_markerRef$
|
|
1211
|
+
elevation != undefined && ((_markerRef$current11 = markerRef.current) === null || _markerRef$current11 === void 0 ? void 0 : _markerRef$current11.setElevation(elevation));
|
|
1105
1212
|
}, [elevation]);
|
|
1106
1213
|
useEffect(function () {
|
|
1107
|
-
var _markerRef$
|
|
1214
|
+
var _markerRef$current12;
|
|
1108
1215
|
|
|
1109
|
-
rotation != undefined && ((_markerRef$
|
|
1216
|
+
rotation != undefined && ((_markerRef$current12 = markerRef.current) === null || _markerRef$current12 === void 0 ? void 0 : _markerRef$current12.setRotation(rotation));
|
|
1110
1217
|
}, [rotation]);
|
|
1111
1218
|
useEffect(function () {
|
|
1112
|
-
var _markerRef$
|
|
1219
|
+
var _markerRef$current13;
|
|
1113
1220
|
|
|
1114
|
-
title != undefined && ((_markerRef$
|
|
1221
|
+
title != undefined && ((_markerRef$current13 = markerRef.current) === null || _markerRef$current13 === void 0 ? void 0 : _markerRef$current13.setTitle(title));
|
|
1115
1222
|
}, [title]);
|
|
1116
1223
|
useEffect(function () {
|
|
1117
|
-
var _markerRef$
|
|
1224
|
+
var _markerRef$current14;
|
|
1118
1225
|
|
|
1119
|
-
snippet != undefined && ((_markerRef$
|
|
1226
|
+
snippet != undefined && ((_markerRef$current14 = markerRef.current) === null || _markerRef$current14 === void 0 ? void 0 : _markerRef$current14.setSnippet(snippet));
|
|
1120
1227
|
}, [snippet]);
|
|
1121
1228
|
useEffect(function () {
|
|
1122
|
-
var _markerRef$
|
|
1229
|
+
var _markerRef$current15;
|
|
1123
1230
|
|
|
1124
|
-
windowAnchor != undefined && ((_markerRef$
|
|
1231
|
+
windowAnchor != undefined && ((_markerRef$current15 = markerRef.current) === null || _markerRef$current15 === void 0 ? void 0 : _markerRef$current15.setWindowAnchor(windowAnchor));
|
|
1125
1232
|
}, [windowAnchor]);
|
|
1126
1233
|
useEffect(function () {
|
|
1127
|
-
var _markerRef$
|
|
1234
|
+
var _markerRef$current16;
|
|
1128
1235
|
|
|
1129
|
-
zIndex != undefined && ((_markerRef$
|
|
1236
|
+
zIndex != undefined && ((_markerRef$current16 = markerRef.current) === null || _markerRef$current16 === void 0 ? void 0 : _markerRef$current16.setZIndex(zIndex));
|
|
1130
1237
|
}, [zIndex]);
|
|
1131
1238
|
useEffect(function () {
|
|
1132
|
-
var _markerRef$
|
|
1239
|
+
var _markerRef$current17;
|
|
1133
1240
|
|
|
1134
|
-
label != undefined && ((_markerRef$
|
|
1241
|
+
label != undefined && ((_markerRef$current17 = markerRef.current) === null || _markerRef$current17 === void 0 ? void 0 : _markerRef$current17.setLabel(label));
|
|
1135
1242
|
}, [label]);
|
|
1136
1243
|
useEffect(function () {
|
|
1137
|
-
var _markerRef$
|
|
1244
|
+
var _markerRef$current18;
|
|
1138
1245
|
|
|
1139
|
-
draggable != undefined && ((_markerRef$
|
|
1246
|
+
draggable != undefined && ((_markerRef$current18 = markerRef.current) === null || _markerRef$current18 === void 0 ? void 0 : _markerRef$current18.setDraggable(draggable));
|
|
1140
1247
|
}, [draggable]);
|
|
1141
1248
|
useEffect(function () {
|
|
1142
|
-
var _markerRef$
|
|
1249
|
+
var _markerRef$current19;
|
|
1143
1250
|
|
|
1144
|
-
iconView != undefined && ((_markerRef$
|
|
1251
|
+
iconView != undefined && ((_markerRef$current19 = markerRef.current) === null || _markerRef$current19 === void 0 ? void 0 : _markerRef$current19.setIconView(iconView));
|
|
1145
1252
|
}, [iconView]);
|
|
1146
1253
|
useEffect(function () {
|
|
1147
|
-
var _markerRef$
|
|
1254
|
+
var _markerRef$current20;
|
|
1148
1255
|
|
|
1149
|
-
userInteractionEnabled != undefined && ((_markerRef$
|
|
1256
|
+
userInteractionEnabled != undefined && ((_markerRef$current20 = markerRef.current) === null || _markerRef$current20 === void 0 ? void 0 : _markerRef$current20.setUserInteraction(userInteractionEnabled));
|
|
1150
1257
|
}, [userInteractionEnabled]);
|
|
1151
1258
|
useEffect(function () {
|
|
1152
|
-
var _markerRef$
|
|
1259
|
+
var _markerRef$current21;
|
|
1153
1260
|
|
|
1154
|
-
icon != undefined && ((_markerRef$
|
|
1261
|
+
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)));
|
|
1155
1262
|
}, [icon]);
|
|
1156
1263
|
useEffect(function () {
|
|
1157
|
-
var _markerRef$
|
|
1264
|
+
var _markerRef$current22;
|
|
1158
1265
|
|
|
1159
|
-
props.infoWindow != undefined && ((_markerRef$
|
|
1266
|
+
props.infoWindow != undefined && ((_markerRef$current22 = markerRef.current) === null || _markerRef$current22 === void 0 ? void 0 : _markerRef$current22.setInfoWindow(props.infoWindow));
|
|
1160
1267
|
}, [props.infoWindow]);
|
|
1161
1268
|
useEffect(function () {
|
|
1162
|
-
var _markerRef$
|
|
1269
|
+
var _markerRef$current23;
|
|
1163
1270
|
|
|
1164
|
-
props.infoContents != undefined && ((_markerRef$
|
|
1271
|
+
props.infoContents != undefined && ((_markerRef$current23 = markerRef.current) === null || _markerRef$current23 === void 0 ? void 0 : _markerRef$current23.setInfoContents(props.infoContents));
|
|
1165
1272
|
}, [props.infoContents]);
|
|
1166
1273
|
useEffect(function () {
|
|
1167
1274
|
if (props.showInfoWindow != undefined) {
|
|
1168
|
-
|
|
1275
|
+
var _markerRef$current24, _markerRef$current25;
|
|
1276
|
+
|
|
1277
|
+
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();
|
|
1169
1278
|
}
|
|
1170
1279
|
}, [props.showInfoWindow]);
|
|
1171
1280
|
return null;
|
|
@@ -1596,7 +1705,10 @@ var MFPolyline = function MFPolyline(props) {
|
|
|
1596
1705
|
map = props.map,
|
|
1597
1706
|
onClick = props.onClick,
|
|
1598
1707
|
onHover = props.onHover,
|
|
1599
|
-
onCreated = props.onCreated
|
|
1708
|
+
onCreated = props.onCreated,
|
|
1709
|
+
onMouseOut = props.onMouseOut,
|
|
1710
|
+
onMouseOver = props.onMouseOver,
|
|
1711
|
+
onMouseMove = props.onMouseMove;
|
|
1600
1712
|
var map4dContext = useContext(Map4dContext);
|
|
1601
1713
|
var theMap = map || map4dContext.map;
|
|
1602
1714
|
var polylineRef = useRef();
|
|
@@ -1629,6 +1741,9 @@ var MFPolyline = function MFPolyline(props) {
|
|
|
1629
1741
|
(_polylineRef$current = polylineRef.current) === null || _polylineRef$current === void 0 ? void 0 : _polylineRef$current.setMap(theMap);
|
|
1630
1742
|
polylineRef.current.onHover = props.onHover;
|
|
1631
1743
|
polylineRef.current.onClick = props.onClick;
|
|
1744
|
+
polylineRef.current.onMouseOut = onMouseOut;
|
|
1745
|
+
polylineRef.current.onMouseOver = onMouseOver;
|
|
1746
|
+
polylineRef.current.onMouseMove = onMouseMove;
|
|
1632
1747
|
onCreated && onCreated(polylineRef.current);
|
|
1633
1748
|
}
|
|
1634
1749
|
}, [theMap]);
|
|
@@ -1657,6 +1772,21 @@ var MFPolyline = function MFPolyline(props) {
|
|
|
1657
1772
|
polylineRef.current.onHover = onHover;
|
|
1658
1773
|
}
|
|
1659
1774
|
}, [onHover]);
|
|
1775
|
+
useEffect(function () {
|
|
1776
|
+
if (polylineRef.current) {
|
|
1777
|
+
polylineRef.current.onMouseOut = onMouseOut;
|
|
1778
|
+
}
|
|
1779
|
+
}, [onMouseOut]);
|
|
1780
|
+
useEffect(function () {
|
|
1781
|
+
if (polylineRef.current) {
|
|
1782
|
+
polylineRef.current.onMouseOver = onMouseOver;
|
|
1783
|
+
}
|
|
1784
|
+
}, [onMouseOver]);
|
|
1785
|
+
useEffect(function () {
|
|
1786
|
+
if (polylineRef.current) {
|
|
1787
|
+
polylineRef.current.onMouseMove = onMouseMove;
|
|
1788
|
+
}
|
|
1789
|
+
}, [onMouseMove]);
|
|
1660
1790
|
useEffect(function () {
|
|
1661
1791
|
if (polylineRef.current) {
|
|
1662
1792
|
polylineRef.current.onClick = onClick;
|