react-map4d-map 1.2.3 → 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.
@@ -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
- events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection, eventClickPolyline]);
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$current10;
963
+ var _mapRef$current19;
880
964
 
881
- var onClickLocation = (_mapRef$current10 = mapRef.current) === null || _mapRef$current10 === void 0 ? void 0 : _mapRef$current10.addListener("click", function (args) {
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$current11;
974
+ var _mapRef$current20;
891
975
 
892
- var onRightClickLocation = (_mapRef$current11 = mapRef.current) === null || _mapRef$current11 === void 0 ? void 0 : _mapRef$current11.addListener("rightClick", function (args) {
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$current12;
985
+ var _mapRef$current21;
902
986
 
903
- var onTilesLoaded = (_mapRef$current12 = mapRef.current) === null || _mapRef$current12 === void 0 ? void 0 : _mapRef$current12.addListener("tilesLoaded", function (args) {
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$current13;
996
+ var _mapRef$current22;
913
997
 
914
- var onCameraChanging = (_mapRef$current13 = mapRef.current) === null || _mapRef$current13 === void 0 ? void 0 : _mapRef$current13.addListener("cameraChanging", function (args) {
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;
@@ -1023,6 +1110,9 @@ var MFMarker = function MFMarker(props) {
1023
1110
  markerRef.current.onRightClick = props.onRightClick;
1024
1111
  markerRef.current.onDragEnd = props.onDragEnd;
1025
1112
  markerRef.current.onHover = props.onHover;
1113
+ markerRef.current.onMouseOut = onMouseOut;
1114
+ markerRef.current.onMouseOver = onMouseOver;
1115
+ markerRef.current.onMouseMove = onMouseMove;
1026
1116
  onCreated && onCreated(markerRef.current);
1027
1117
  (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker(markerRef.current));
1028
1118
  }
@@ -1060,6 +1150,21 @@ var MFMarker = function MFMarker(props) {
1060
1150
  markerRef.current.onHover = onHover;
1061
1151
  }
1062
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]);
1063
1168
  useEffect(function () {
1064
1169
  if (markerRef.current) {
1065
1170
  markerRef.current.onClick = onClick;
@@ -1600,7 +1705,10 @@ var MFPolyline = function MFPolyline(props) {
1600
1705
  map = props.map,
1601
1706
  onClick = props.onClick,
1602
1707
  onHover = props.onHover,
1603
- onCreated = props.onCreated;
1708
+ onCreated = props.onCreated,
1709
+ onMouseOut = props.onMouseOut,
1710
+ onMouseOver = props.onMouseOver,
1711
+ onMouseMove = props.onMouseMove;
1604
1712
  var map4dContext = useContext(Map4dContext);
1605
1713
  var theMap = map || map4dContext.map;
1606
1714
  var polylineRef = useRef();
@@ -1633,6 +1741,9 @@ var MFPolyline = function MFPolyline(props) {
1633
1741
  (_polylineRef$current = polylineRef.current) === null || _polylineRef$current === void 0 ? void 0 : _polylineRef$current.setMap(theMap);
1634
1742
  polylineRef.current.onHover = props.onHover;
1635
1743
  polylineRef.current.onClick = props.onClick;
1744
+ polylineRef.current.onMouseOut = onMouseOut;
1745
+ polylineRef.current.onMouseOver = onMouseOver;
1746
+ polylineRef.current.onMouseMove = onMouseMove;
1636
1747
  onCreated && onCreated(polylineRef.current);
1637
1748
  }
1638
1749
  }, [theMap]);
@@ -1661,6 +1772,21 @@ var MFPolyline = function MFPolyline(props) {
1661
1772
  polylineRef.current.onHover = onHover;
1662
1773
  }
1663
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]);
1664
1790
  useEffect(function () {
1665
1791
  if (polylineRef.current) {
1666
1792
  polylineRef.current.onClick = onClick;