react-map4d-map 1.2.2 → 1.2.3
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/index.js +48 -44
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +48 -44
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1017,7 +1017,9 @@ var MFMarker = function MFMarker(props) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
if (props.showInfoWindow != undefined) {
|
|
1020
|
-
|
|
1020
|
+
var _markerRef$current, _markerRef$current2;
|
|
1021
|
+
|
|
1022
|
+
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
1023
|
}
|
|
1022
1024
|
|
|
1023
1025
|
markerRef.current.onClick = onClick;
|
|
@@ -1031,26 +1033,26 @@ var MFMarker = function MFMarker(props) {
|
|
|
1031
1033
|
React.useEffect(function () {
|
|
1032
1034
|
if (theMap) {
|
|
1033
1035
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1034
|
-
var _markerRef$
|
|
1036
|
+
var _markerRef$current3;
|
|
1035
1037
|
|
|
1036
|
-
(_markerRef$
|
|
1038
|
+
(_markerRef$current3 = markerRef.current) === null || _markerRef$current3 === void 0 ? void 0 : _markerRef$current3.setMap(theMap);
|
|
1037
1039
|
}
|
|
1038
1040
|
}
|
|
1039
1041
|
|
|
1040
1042
|
return function () {
|
|
1041
1043
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1042
|
-
var _markerRef$
|
|
1044
|
+
var _markerRef$current4;
|
|
1043
1045
|
|
|
1044
|
-
(_markerRef$
|
|
1046
|
+
(_markerRef$current4 = markerRef.current) === null || _markerRef$current4 === void 0 ? void 0 : _markerRef$current4.setMap(null);
|
|
1045
1047
|
}
|
|
1046
1048
|
};
|
|
1047
1049
|
}, [theMap]);
|
|
1048
1050
|
React.useEffect(function () {
|
|
1049
1051
|
return function () {
|
|
1050
1052
|
if (!(markerClusterContext !== null && markerClusterContext !== void 0 && markerClusterContext.addMarker)) {
|
|
1051
|
-
var _markerRef$
|
|
1053
|
+
var _markerRef$current5;
|
|
1052
1054
|
|
|
1053
|
-
(_markerRef$
|
|
1055
|
+
(_markerRef$current5 = markerRef.current) === null || _markerRef$current5 === void 0 ? void 0 : _markerRef$current5.setMap(null);
|
|
1054
1056
|
}
|
|
1055
1057
|
|
|
1056
1058
|
markerRef.current && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.removeMarker(markerRef.current));
|
|
@@ -1077,98 +1079,100 @@ var MFMarker = function MFMarker(props) {
|
|
|
1077
1079
|
}
|
|
1078
1080
|
}, [onDragEnd]);
|
|
1079
1081
|
React.useEffect(function () {
|
|
1080
|
-
var _markerRef$
|
|
1082
|
+
var _markerRef$current6;
|
|
1081
1083
|
|
|
1082
|
-
(_markerRef$
|
|
1084
|
+
(_markerRef$current6 = markerRef.current) === null || _markerRef$current6 === void 0 ? void 0 : _markerRef$current6.setPosition(position);
|
|
1083
1085
|
}, [position]);
|
|
1084
1086
|
React.useEffect(function () {
|
|
1085
|
-
var _markerRef$
|
|
1087
|
+
var _markerRef$current7;
|
|
1086
1088
|
|
|
1087
|
-
(_markerRef$
|
|
1089
|
+
(_markerRef$current7 = markerRef.current) === null || _markerRef$current7 === void 0 ? void 0 : _markerRef$current7.setVisible(visible);
|
|
1088
1090
|
}, [visible]);
|
|
1089
1091
|
React.useEffect(function () {
|
|
1090
|
-
var _markerRef$
|
|
1092
|
+
var _markerRef$current8;
|
|
1091
1093
|
|
|
1092
|
-
anchor != undefined && ((_markerRef$
|
|
1094
|
+
anchor != undefined && ((_markerRef$current8 = markerRef.current) === null || _markerRef$current8 === void 0 ? void 0 : _markerRef$current8.setAnchor(anchor));
|
|
1093
1095
|
}, [anchor]);
|
|
1094
1096
|
React.useEffect(function () {
|
|
1095
|
-
var _markerRef$
|
|
1097
|
+
var _markerRef$current9;
|
|
1096
1098
|
|
|
1097
|
-
labelAnchor != undefined && ((_markerRef$
|
|
1099
|
+
labelAnchor != undefined && ((_markerRef$current9 = markerRef.current) === null || _markerRef$current9 === void 0 ? void 0 : _markerRef$current9.setLabelAnchor(labelAnchor));
|
|
1098
1100
|
}, [labelAnchor]);
|
|
1099
1101
|
React.useEffect(function () {
|
|
1100
|
-
var _markerRef$
|
|
1102
|
+
var _markerRef$current10;
|
|
1101
1103
|
|
|
1102
|
-
icon != undefined && ((_markerRef$
|
|
1104
|
+
icon != undefined && ((_markerRef$current10 = markerRef.current) === null || _markerRef$current10 === void 0 ? void 0 : _markerRef$current10.setIcon(icon));
|
|
1103
1105
|
}, [icon]);
|
|
1104
1106
|
React.useEffect(function () {
|
|
1105
|
-
var _markerRef$
|
|
1107
|
+
var _markerRef$current11;
|
|
1106
1108
|
|
|
1107
|
-
elevation != undefined && ((_markerRef$
|
|
1109
|
+
elevation != undefined && ((_markerRef$current11 = markerRef.current) === null || _markerRef$current11 === void 0 ? void 0 : _markerRef$current11.setElevation(elevation));
|
|
1108
1110
|
}, [elevation]);
|
|
1109
1111
|
React.useEffect(function () {
|
|
1110
|
-
var _markerRef$
|
|
1112
|
+
var _markerRef$current12;
|
|
1111
1113
|
|
|
1112
|
-
rotation != undefined && ((_markerRef$
|
|
1114
|
+
rotation != undefined && ((_markerRef$current12 = markerRef.current) === null || _markerRef$current12 === void 0 ? void 0 : _markerRef$current12.setRotation(rotation));
|
|
1113
1115
|
}, [rotation]);
|
|
1114
1116
|
React.useEffect(function () {
|
|
1115
|
-
var _markerRef$
|
|
1117
|
+
var _markerRef$current13;
|
|
1116
1118
|
|
|
1117
|
-
title != undefined && ((_markerRef$
|
|
1119
|
+
title != undefined && ((_markerRef$current13 = markerRef.current) === null || _markerRef$current13 === void 0 ? void 0 : _markerRef$current13.setTitle(title));
|
|
1118
1120
|
}, [title]);
|
|
1119
1121
|
React.useEffect(function () {
|
|
1120
|
-
var _markerRef$
|
|
1122
|
+
var _markerRef$current14;
|
|
1121
1123
|
|
|
1122
|
-
snippet != undefined && ((_markerRef$
|
|
1124
|
+
snippet != undefined && ((_markerRef$current14 = markerRef.current) === null || _markerRef$current14 === void 0 ? void 0 : _markerRef$current14.setSnippet(snippet));
|
|
1123
1125
|
}, [snippet]);
|
|
1124
1126
|
React.useEffect(function () {
|
|
1125
|
-
var _markerRef$
|
|
1127
|
+
var _markerRef$current15;
|
|
1126
1128
|
|
|
1127
|
-
windowAnchor != undefined && ((_markerRef$
|
|
1129
|
+
windowAnchor != undefined && ((_markerRef$current15 = markerRef.current) === null || _markerRef$current15 === void 0 ? void 0 : _markerRef$current15.setWindowAnchor(windowAnchor));
|
|
1128
1130
|
}, [windowAnchor]);
|
|
1129
1131
|
React.useEffect(function () {
|
|
1130
|
-
var _markerRef$
|
|
1132
|
+
var _markerRef$current16;
|
|
1131
1133
|
|
|
1132
|
-
zIndex != undefined && ((_markerRef$
|
|
1134
|
+
zIndex != undefined && ((_markerRef$current16 = markerRef.current) === null || _markerRef$current16 === void 0 ? void 0 : _markerRef$current16.setZIndex(zIndex));
|
|
1133
1135
|
}, [zIndex]);
|
|
1134
1136
|
React.useEffect(function () {
|
|
1135
|
-
var _markerRef$
|
|
1137
|
+
var _markerRef$current17;
|
|
1136
1138
|
|
|
1137
|
-
label != undefined && ((_markerRef$
|
|
1139
|
+
label != undefined && ((_markerRef$current17 = markerRef.current) === null || _markerRef$current17 === void 0 ? void 0 : _markerRef$current17.setLabel(label));
|
|
1138
1140
|
}, [label]);
|
|
1139
1141
|
React.useEffect(function () {
|
|
1140
|
-
var _markerRef$
|
|
1142
|
+
var _markerRef$current18;
|
|
1141
1143
|
|
|
1142
|
-
draggable != undefined && ((_markerRef$
|
|
1144
|
+
draggable != undefined && ((_markerRef$current18 = markerRef.current) === null || _markerRef$current18 === void 0 ? void 0 : _markerRef$current18.setDraggable(draggable));
|
|
1143
1145
|
}, [draggable]);
|
|
1144
1146
|
React.useEffect(function () {
|
|
1145
|
-
var _markerRef$
|
|
1147
|
+
var _markerRef$current19;
|
|
1146
1148
|
|
|
1147
|
-
iconView != undefined && ((_markerRef$
|
|
1149
|
+
iconView != undefined && ((_markerRef$current19 = markerRef.current) === null || _markerRef$current19 === void 0 ? void 0 : _markerRef$current19.setIconView(iconView));
|
|
1148
1150
|
}, [iconView]);
|
|
1149
1151
|
React.useEffect(function () {
|
|
1150
|
-
var _markerRef$
|
|
1152
|
+
var _markerRef$current20;
|
|
1151
1153
|
|
|
1152
|
-
userInteractionEnabled != undefined && ((_markerRef$
|
|
1154
|
+
userInteractionEnabled != undefined && ((_markerRef$current20 = markerRef.current) === null || _markerRef$current20 === void 0 ? void 0 : _markerRef$current20.setUserInteraction(userInteractionEnabled));
|
|
1153
1155
|
}, [userInteractionEnabled]);
|
|
1154
1156
|
React.useEffect(function () {
|
|
1155
|
-
var _markerRef$
|
|
1157
|
+
var _markerRef$current21;
|
|
1156
1158
|
|
|
1157
|
-
icon != undefined && ((_markerRef$
|
|
1159
|
+
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
1160
|
}, [icon]);
|
|
1159
1161
|
React.useEffect(function () {
|
|
1160
|
-
var _markerRef$
|
|
1162
|
+
var _markerRef$current22;
|
|
1161
1163
|
|
|
1162
|
-
props.infoWindow != undefined && ((_markerRef$
|
|
1164
|
+
props.infoWindow != undefined && ((_markerRef$current22 = markerRef.current) === null || _markerRef$current22 === void 0 ? void 0 : _markerRef$current22.setInfoWindow(props.infoWindow));
|
|
1163
1165
|
}, [props.infoWindow]);
|
|
1164
1166
|
React.useEffect(function () {
|
|
1165
|
-
var _markerRef$
|
|
1167
|
+
var _markerRef$current23;
|
|
1166
1168
|
|
|
1167
|
-
props.infoContents != undefined && ((_markerRef$
|
|
1169
|
+
props.infoContents != undefined && ((_markerRef$current23 = markerRef.current) === null || _markerRef$current23 === void 0 ? void 0 : _markerRef$current23.setInfoContents(props.infoContents));
|
|
1168
1170
|
}, [props.infoContents]);
|
|
1169
1171
|
React.useEffect(function () {
|
|
1170
1172
|
if (props.showInfoWindow != undefined) {
|
|
1171
|
-
|
|
1173
|
+
var _markerRef$current24, _markerRef$current25;
|
|
1174
|
+
|
|
1175
|
+
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
1176
|
}
|
|
1173
1177
|
}, [props.showInfoWindow]);
|
|
1174
1178
|
return null;
|