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