react-map4d-map 1.1.9 → 1.2.0

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.
@@ -473,6 +473,7 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
473
473
  });
474
474
  directionRef.current = new map4d.DirectionsRenderer(option);
475
475
  (_directionRef$current = directionRef.current) === null || _directionRef$current === void 0 ? void 0 : _directionRef$current.setMap(theMap);
476
+ directionRef.current.onHover = props.onHover;
476
477
  onCreated && onCreated(directionRef.current);
477
478
  }
478
479
  }, [theMap]);
@@ -808,7 +809,7 @@ var MFMap = function MFMap(props) {
808
809
  }, [props.environment, props.version, props.accessKey]);
809
810
 
810
811
  var registerEvent = function registerEvent() {
811
- var _mapRef$current2, _mapRef$current3, _mapRef$current4;
812
+ var _mapRef$current2, _mapRef$current3, _mapRef$current4, _mapRef$current5, _mapRef$current6, _mapRef$current7, _mapRef$current8;
812
813
 
813
814
  var eventClickMarker = (_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 ? void 0 : _mapRef$current2.addListener("click", function (args) {
814
815
  var _args$marker, _args$marker2;
@@ -831,12 +832,40 @@ var MFMap = function MFMap(props) {
831
832
  }, {
832
833
  marker: true
833
834
  });
834
- events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker]);
835
+ var eventHoverMarker = (_mapRef$current5 = mapRef.current) === null || _mapRef$current5 === void 0 ? void 0 : _mapRef$current5.addListener("hover", function (args) {
836
+ var _args$marker7, _args$marker8;
837
+
838
+ ((_args$marker7 = args.marker) === null || _args$marker7 === void 0 ? void 0 : _args$marker7.onHover) && ((_args$marker8 = args.marker) === null || _args$marker8 === void 0 ? void 0 : _args$marker8.onHover());
839
+ }, {
840
+ marker: true
841
+ });
842
+ var eventHoverPolygon = (_mapRef$current6 = mapRef.current) === null || _mapRef$current6 === void 0 ? void 0 : _mapRef$current6.addListener("hover", function (args) {
843
+ var _args$polygon, _args$polygon2;
844
+
845
+ ((_args$polygon = args.polygon) === null || _args$polygon === void 0 ? void 0 : _args$polygon.onHover) && ((_args$polygon2 = args.polygon) === null || _args$polygon2 === void 0 ? void 0 : _args$polygon2.onHover());
846
+ }, {
847
+ polygon: true
848
+ });
849
+ var eventHoverPolyline = (_mapRef$current7 = mapRef.current) === null || _mapRef$current7 === void 0 ? void 0 : _mapRef$current7.addListener("hover", function (args) {
850
+ var _args$polyline, _args$polyline2;
851
+
852
+ ((_args$polyline = args.polyline) === null || _args$polyline === void 0 ? void 0 : _args$polyline.onHover) && ((_args$polyline2 = args.polyline) === null || _args$polyline2 === void 0 ? void 0 : _args$polyline2.onHover());
853
+ }, {
854
+ polyline: true
855
+ });
856
+ var eventHoverDirection = (_mapRef$current8 = mapRef.current) === null || _mapRef$current8 === void 0 ? void 0 : _mapRef$current8.addListener("hover", function (args) {
857
+ var _args$renderer, _args$renderer2;
858
+
859
+ ((_args$renderer = args.renderer) === null || _args$renderer === void 0 ? void 0 : _args$renderer.onHover) && ((_args$renderer2 = args.renderer) === null || _args$renderer2 === void 0 ? void 0 : _args$renderer2.onHover());
860
+ }, {
861
+ directions: true
862
+ });
863
+ events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection]);
835
864
 
836
865
  if (props.onClickLocation) {
837
- var _mapRef$current5;
866
+ var _mapRef$current9;
838
867
 
839
- var onClickLocation = (_mapRef$current5 = mapRef.current) === null || _mapRef$current5 === void 0 ? void 0 : _mapRef$current5.addListener("click", function (args) {
868
+ var onClickLocation = (_mapRef$current9 = mapRef.current) === null || _mapRef$current9 === void 0 ? void 0 : _mapRef$current9.addListener("click", function (args) {
840
869
  props.onClickLocation && props.onClickLocation(args);
841
870
  }, {
842
871
  location: true
@@ -845,9 +874,9 @@ var MFMap = function MFMap(props) {
845
874
  }
846
875
 
847
876
  if (props.onRightClickLocation) {
848
- var _mapRef$current6;
877
+ var _mapRef$current10;
849
878
 
850
- var onRightClickLocation = (_mapRef$current6 = mapRef.current) === null || _mapRef$current6 === void 0 ? void 0 : _mapRef$current6.addListener("rightClick", function (args) {
879
+ var onRightClickLocation = (_mapRef$current10 = mapRef.current) === null || _mapRef$current10 === void 0 ? void 0 : _mapRef$current10.addListener("rightClick", function (args) {
851
880
  props.onRightClickLocation && props.onRightClickLocation(args);
852
881
  }, {
853
882
  location: true
@@ -856,9 +885,9 @@ var MFMap = function MFMap(props) {
856
885
  }
857
886
 
858
887
  if (props.onTilesLoaded) {
859
- var _mapRef$current7;
888
+ var _mapRef$current11;
860
889
 
861
- var onTilesLoaded = (_mapRef$current7 = mapRef.current) === null || _mapRef$current7 === void 0 ? void 0 : _mapRef$current7.addListener("tilesLoaded", function (args) {
890
+ var onTilesLoaded = (_mapRef$current11 = mapRef.current) === null || _mapRef$current11 === void 0 ? void 0 : _mapRef$current11.addListener("tilesLoaded", function (args) {
862
891
  props.onTilesLoaded && props.onTilesLoaded(args);
863
892
  }, {
864
893
  location: true
@@ -867,9 +896,9 @@ var MFMap = function MFMap(props) {
867
896
  }
868
897
 
869
898
  if (props.onCameraChanging) {
870
- var _mapRef$current8;
899
+ var _mapRef$current12;
871
900
 
872
- var onCameraChanging = (_mapRef$current8 = mapRef.current) === null || _mapRef$current8 === void 0 ? void 0 : _mapRef$current8.addListener("cameraChanging", function (args) {
901
+ var onCameraChanging = (_mapRef$current12 = mapRef.current) === null || _mapRef$current12 === void 0 ? void 0 : _mapRef$current12.addListener("cameraChanging", function (args) {
873
902
  props.onCameraChanging && props.onCameraChanging(args);
874
903
  }, {
875
904
  location: true
@@ -975,6 +1004,7 @@ var MFMarker = function MFMarker(props) {
975
1004
  markerRef.current.onClick = onClick;
976
1005
  markerRef.current.onRightClick = props.onRightClick;
977
1006
  markerRef.current.onDragEnd = props.onDragEnd;
1007
+ markerRef.current.onHover = props.onHover;
978
1008
  onCreated && onCreated(markerRef.current);
979
1009
  (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker) && (markerClusterContext === null || markerClusterContext === void 0 ? void 0 : markerClusterContext.addMarker(markerRef.current));
980
1010
  }
@@ -1431,6 +1461,7 @@ var MFPolygon = function MFPolygon(props) {
1431
1461
  });
1432
1462
  polygonRef.current = new map4d.Polygon(option);
1433
1463
  (_polygonRef$current = polygonRef.current) === null || _polygonRef$current === void 0 ? void 0 : _polygonRef$current.setMap(theMap);
1464
+ polygonRef.current.onHover = props.onHover;
1434
1465
  onCreated && onCreated(polygonRef.current);
1435
1466
  }
1436
1467
  }, [theMap]);
@@ -1552,6 +1583,7 @@ var MFPolyline = function MFPolyline(props) {
1552
1583
  });
1553
1584
  polylineRef.current = new map4d.Polyline(option);
1554
1585
  (_polylineRef$current = polylineRef.current) === null || _polylineRef$current === void 0 ? void 0 : _polylineRef$current.setMap(theMap);
1586
+ polylineRef.current.onHover = props.onHover;
1555
1587
  onCreated && onCreated(polylineRef.current);
1556
1588
  }
1557
1589
  }, [theMap]);