react-map4d-map 1.2.4 → 1.2.5

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.
@@ -22,10 +22,10 @@ interface DirectionsRendererProps {
22
22
  onMarkerDragEnd?: Function;
23
23
  map?: map4d.Map;
24
24
  onCreated?: (directionsRenderer?: map4d.DirectionsRenderer) => void;
25
- onHover?: (directions: any) => void;
26
- onMouseOut?: (marker: any) => void;
27
- onMouseOver?: (marker: any) => void;
28
- onMouseMove?: (marker: any) => void;
25
+ onHover?: (args: any) => void;
26
+ onMouseOut?: (args: any) => void;
27
+ onMouseOver?: (args: any) => void;
28
+ onMouseMove?: (args: any) => void;
29
29
  }
30
30
  declare const MFDirectionsRenderer: (props: DirectionsRendererProps) => null;
31
31
  export default MFDirectionsRenderer;
@@ -23,14 +23,14 @@ interface MarkerProps {
23
23
  infoWindow?: string | Node;
24
24
  infoContents?: string | Node;
25
25
  showInfoWindow?: boolean;
26
- onClick?: (marker: any) => void;
26
+ onClick?: (args: any) => void;
27
27
  onCreated?: (marker: any) => void;
28
- onRightClick?: (marker: any) => void;
29
- onDragEnd?: (marker: any) => void;
30
- onHover?: (marker: any) => void;
31
- onMouseOut?: (marker: any) => void;
32
- onMouseOver?: (marker: any) => void;
33
- onMouseMove?: (marker: any) => void;
28
+ onRightClick?: (args: any) => void;
29
+ onDragEnd?: (args: any) => void;
30
+ onHover?: (args: any) => void;
31
+ onMouseOut?: (args: any) => void;
32
+ onMouseOver?: (args: any) => void;
33
+ onMouseMove?: (args: any) => void;
34
34
  }
35
35
  declare const MFMarker: (props: MarkerProps) => null;
36
36
  export default MFMarker;
@@ -1,6 +1,19 @@
1
1
  interface POIProps extends map4d.POIOptions {
2
+ position: any;
3
+ title?: string;
4
+ subtitle?: string;
5
+ color?: string;
6
+ type?: string;
7
+ icon?: string;
8
+ elevation?: number;
9
+ zIndex?: number;
10
+ visible?: boolean;
11
+ draggable?: boolean;
12
+ userInteractionEnabled?: boolean;
2
13
  map?: map4d.Map;
3
14
  onCreated?: (poi: map4d.POI) => void;
15
+ onClick?: (args: any) => void;
16
+ onHover?: (args: any) => void;
4
17
  }
5
18
  declare const MFPOI: (props: POIProps) => null;
6
19
  export default MFPOI;
@@ -11,7 +11,7 @@ interface PolygonProps {
11
11
  userInteractionEnabled?: boolean;
12
12
  map?: map4d.Map;
13
13
  onCreated?: (polygon: map4d.Polygon) => void;
14
- onHover?: (polygon: any) => void;
14
+ onHover?: (args: any) => void;
15
15
  }
16
16
  declare const MFPolygon: (props: PolygonProps) => null;
17
17
  export default MFPolygon;
@@ -12,11 +12,11 @@ interface PolylineProps {
12
12
  userInteractionEnabled?: boolean;
13
13
  map?: map4d.Map;
14
14
  onCreated?: (polyline: map4d.Polyline) => void;
15
- onHover?: (polyline: any) => void;
16
- onClick?: (polyline: any) => void;
17
- onMouseOut?: (marker: any) => void;
18
- onMouseOver?: (marker: any) => void;
19
- onMouseMove?: (marker: any) => void;
15
+ onHover?: (args: any) => void;
16
+ onClick?: (args: any) => void;
17
+ onMouseOut?: (args: any) => void;
18
+ onMouseOver?: (args: any) => void;
19
+ onMouseMove?: (args: any) => void;
20
20
  }
21
21
  declare const MFPolyline: (props: PolylineProps) => null;
22
22
  export default MFPolyline;
package/dist/index.js CHANGED
@@ -839,133 +839,147 @@ var MFMap = function MFMap(props) {
839
839
  }, [props.environment, props.version, props.accessKey]);
840
840
 
841
841
  var registerEvent = function registerEvent() {
842
- 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;
842
+ 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, _mapRef$current19, _mapRef$current20;
843
843
 
844
844
  var eventClickMarker = (_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 ? void 0 : _mapRef$current2.addListener("click", function (args) {
845
845
  var _args$marker, _args$marker2;
846
846
 
847
- ((_args$marker = args.marker) === null || _args$marker === void 0 ? void 0 : _args$marker.onClick) && ((_args$marker2 = args.marker) === null || _args$marker2 === void 0 ? void 0 : _args$marker2.onClick());
847
+ ((_args$marker = args.marker) === null || _args$marker === void 0 ? void 0 : _args$marker.onClick) && ((_args$marker2 = args.marker) === null || _args$marker2 === void 0 ? void 0 : _args$marker2.onClick(args));
848
848
  }, {
849
849
  marker: true
850
850
  });
851
851
  var eventRightClickMarker = (_mapRef$current3 = mapRef.current) === null || _mapRef$current3 === void 0 ? void 0 : _mapRef$current3.addListener("rightClick", function (args) {
852
852
  var _args$marker3, _args$marker4;
853
853
 
854
- ((_args$marker3 = args.marker) === null || _args$marker3 === void 0 ? void 0 : _args$marker3.onRightClick) && ((_args$marker4 = args.marker) === null || _args$marker4 === void 0 ? void 0 : _args$marker4.onRightClick());
854
+ ((_args$marker3 = args.marker) === null || _args$marker3 === void 0 ? void 0 : _args$marker3.onRightClick) && ((_args$marker4 = args.marker) === null || _args$marker4 === void 0 ? void 0 : _args$marker4.onRightClick(args));
855
855
  }, {
856
856
  marker: true
857
857
  });
858
858
  var eventDragEndMarker = (_mapRef$current4 = mapRef.current) === null || _mapRef$current4 === void 0 ? void 0 : _mapRef$current4.addListener("dragEnd", function (args) {
859
859
  var _args$marker5, _args$marker6;
860
860
 
861
- ((_args$marker5 = args.marker) === null || _args$marker5 === void 0 ? void 0 : _args$marker5.onDragEnd) && ((_args$marker6 = args.marker) === null || _args$marker6 === void 0 ? void 0 : _args$marker6.onDragEnd());
861
+ ((_args$marker5 = args.marker) === null || _args$marker5 === void 0 ? void 0 : _args$marker5.onDragEnd) && ((_args$marker6 = args.marker) === null || _args$marker6 === void 0 ? void 0 : _args$marker6.onDragEnd(args));
862
862
  }, {
863
863
  marker: true
864
864
  });
865
865
  var eventHoverMarker = (_mapRef$current5 = mapRef.current) === null || _mapRef$current5 === void 0 ? void 0 : _mapRef$current5.addListener("hover", function (args) {
866
866
  var _args$marker7, _args$marker8;
867
867
 
868
- ((_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());
868
+ ((_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(args));
869
869
  }, {
870
870
  marker: true
871
871
  });
872
872
  var eventHoverPolygon = (_mapRef$current6 = mapRef.current) === null || _mapRef$current6 === void 0 ? void 0 : _mapRef$current6.addListener("hover", function (args) {
873
873
  var _args$polygon, _args$polygon2;
874
874
 
875
- ((_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());
875
+ ((_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(args));
876
876
  }, {
877
877
  polygon: true
878
878
  });
879
879
  var eventHoverPolyline = (_mapRef$current7 = mapRef.current) === null || _mapRef$current7 === void 0 ? void 0 : _mapRef$current7.addListener("hover", function (args) {
880
880
  var _args$polyline, _args$polyline2;
881
881
 
882
- ((_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());
882
+ ((_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(args));
883
883
  }, {
884
884
  polyline: true
885
885
  });
886
886
  var eventHoverDirection = (_mapRef$current8 = mapRef.current) === null || _mapRef$current8 === void 0 ? void 0 : _mapRef$current8.addListener("hover", function (args) {
887
887
  var _args$renderer, _args$renderer2;
888
888
 
889
- ((_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());
889
+ ((_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(args));
890
890
  }, {
891
891
  directions: true
892
892
  });
893
893
  var eventClickPolyline = (_mapRef$current9 = mapRef.current) === null || _mapRef$current9 === void 0 ? void 0 : _mapRef$current9.addListener("click", function (args) {
894
894
  var _args$polyline3, _args$polyline4;
895
895
 
896
- ((_args$polyline3 = args.polyline) === null || _args$polyline3 === void 0 ? void 0 : _args$polyline3.onClick) && ((_args$polyline4 = args.polyline) === null || _args$polyline4 === void 0 ? void 0 : _args$polyline4.onClick());
896
+ ((_args$polyline3 = args.polyline) === null || _args$polyline3 === void 0 ? void 0 : _args$polyline3.onClick) && ((_args$polyline4 = args.polyline) === null || _args$polyline4 === void 0 ? void 0 : _args$polyline4.onClick(args));
897
897
  }, {
898
898
  polyline: true
899
899
  });
900
900
  var eventMouseOutDirection = (_mapRef$current10 = mapRef.current) === null || _mapRef$current10 === void 0 ? void 0 : _mapRef$current10.addListener("mouseOut", function (args) {
901
901
  var _args$renderer3, _args$renderer4;
902
902
 
903
- ((_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());
903
+ ((_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(args));
904
904
  }, {
905
905
  directions: true
906
906
  });
907
907
  var eventMouseOverDirection = (_mapRef$current11 = mapRef.current) === null || _mapRef$current11 === void 0 ? void 0 : _mapRef$current11.addListener("mouseOver", function (args) {
908
908
  var _args$renderer5, _args$renderer6;
909
909
 
910
- ((_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());
910
+ ((_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(args));
911
911
  }, {
912
912
  directions: true
913
913
  });
914
914
  var eventMouseMoveDirection = (_mapRef$current12 = mapRef.current) === null || _mapRef$current12 === void 0 ? void 0 : _mapRef$current12.addListener("mouseMove", function (args) {
915
915
  var _args$renderer7, _args$renderer8;
916
916
 
917
- ((_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());
917
+ ((_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(args));
918
918
  }, {
919
919
  directions: true
920
920
  });
921
921
  var eventMouseOutPolyline = (_mapRef$current13 = mapRef.current) === null || _mapRef$current13 === void 0 ? void 0 : _mapRef$current13.addListener("mouseOut", function (args) {
922
922
  var _args$polyline5, _args$polyline6;
923
923
 
924
- ((_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());
924
+ ((_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(args));
925
925
  }, {
926
926
  polyline: true
927
927
  });
928
928
  var eventMouseOverPolyline = (_mapRef$current14 = mapRef.current) === null || _mapRef$current14 === void 0 ? void 0 : _mapRef$current14.addListener("mouseOver", function (args) {
929
929
  var _args$polyline7, _args$polyline8;
930
930
 
931
- ((_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());
931
+ ((_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(args));
932
932
  }, {
933
933
  polyline: true
934
934
  });
935
935
  var eventMouseMovePolyline = (_mapRef$current15 = mapRef.current) === null || _mapRef$current15 === void 0 ? void 0 : _mapRef$current15.addListener("mouseMove", function (args) {
936
936
  var _args$polyline9, _args$polyline10;
937
937
 
938
- ((_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());
938
+ ((_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(args));
939
939
  }, {
940
940
  polyline: true
941
941
  });
942
942
  var eventMouseOutMarker = (_mapRef$current16 = mapRef.current) === null || _mapRef$current16 === void 0 ? void 0 : _mapRef$current16.addListener("mouseOut", function (args) {
943
943
  var _args$marker9, _args$marker10;
944
944
 
945
- ((_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());
945
+ ((_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(args));
946
946
  }, {
947
947
  marker: true
948
948
  });
949
949
  var eventMouseOverMarker = (_mapRef$current17 = mapRef.current) === null || _mapRef$current17 === void 0 ? void 0 : _mapRef$current17.addListener("mouseOver", function (args) {
950
950
  var _args$marker11, _args$marker12;
951
951
 
952
- ((_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());
952
+ ((_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(args));
953
953
  }, {
954
954
  marker: true
955
955
  });
956
956
  var eventMouseMoveMarker = (_mapRef$current18 = mapRef.current) === null || _mapRef$current18 === void 0 ? void 0 : _mapRef$current18.addListener("mouseMove", function (args) {
957
957
  var _args$marker13, _args$marker14;
958
958
 
959
- ((_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());
959
+ ((_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(args));
960
960
  }, {
961
961
  marker: true
962
962
  });
963
- events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection, eventClickPolyline, eventMouseOutDirection, eventMouseOverDirection, eventMouseMoveDirection, eventMouseOutPolyline, eventMouseOverPolyline, eventMouseMovePolyline, eventMouseOutMarker, eventMouseOverMarker, eventMouseMoveMarker]);
963
+ var eventClickPoi = (_mapRef$current19 = mapRef.current) === null || _mapRef$current19 === void 0 ? void 0 : _mapRef$current19.addListener("click", function (args) {
964
+ var _args$poi, _args$poi2;
965
+
966
+ ((_args$poi = args.poi) === null || _args$poi === void 0 ? void 0 : _args$poi.onClick) && ((_args$poi2 = args.poi) === null || _args$poi2 === void 0 ? void 0 : _args$poi2.onClick(args));
967
+ }, {
968
+ poi: true
969
+ });
970
+ var eventHoverPoi = (_mapRef$current20 = mapRef.current) === null || _mapRef$current20 === void 0 ? void 0 : _mapRef$current20.addListener("hover", function (args) {
971
+ var _args$poi3, _args$poi4;
972
+
973
+ ((_args$poi3 = args.poi) === null || _args$poi3 === void 0 ? void 0 : _args$poi3.onHover) && ((_args$poi4 = args.poi) === null || _args$poi4 === void 0 ? void 0 : _args$poi4.onHover(args));
974
+ }, {
975
+ poi: true
976
+ });
977
+ events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection, eventClickPolyline, eventMouseOutDirection, eventMouseOverDirection, eventMouseMoveDirection, eventMouseOutPolyline, eventMouseOverPolyline, eventMouseMovePolyline, eventMouseOutMarker, eventMouseOverMarker, eventMouseMoveMarker, eventClickPoi, eventHoverPoi]);
964
978
 
965
979
  if (props.onClickLocation) {
966
- var _mapRef$current19;
980
+ var _mapRef$current21;
967
981
 
968
- var onClickLocation = (_mapRef$current19 = mapRef.current) === null || _mapRef$current19 === void 0 ? void 0 : _mapRef$current19.addListener("click", function (args) {
982
+ var onClickLocation = (_mapRef$current21 = mapRef.current) === null || _mapRef$current21 === void 0 ? void 0 : _mapRef$current21.addListener("click", function (args) {
969
983
  props.onClickLocation && props.onClickLocation(args);
970
984
  }, {
971
985
  location: true
@@ -974,9 +988,9 @@ var MFMap = function MFMap(props) {
974
988
  }
975
989
 
976
990
  if (props.onRightClickLocation) {
977
- var _mapRef$current20;
991
+ var _mapRef$current22;
978
992
 
979
- var onRightClickLocation = (_mapRef$current20 = mapRef.current) === null || _mapRef$current20 === void 0 ? void 0 : _mapRef$current20.addListener("rightClick", function (args) {
993
+ var onRightClickLocation = (_mapRef$current22 = mapRef.current) === null || _mapRef$current22 === void 0 ? void 0 : _mapRef$current22.addListener("rightClick", function (args) {
980
994
  props.onRightClickLocation && props.onRightClickLocation(args);
981
995
  }, {
982
996
  location: true
@@ -985,9 +999,9 @@ var MFMap = function MFMap(props) {
985
999
  }
986
1000
 
987
1001
  if (props.onTilesLoaded) {
988
- var _mapRef$current21;
1002
+ var _mapRef$current23;
989
1003
 
990
- var onTilesLoaded = (_mapRef$current21 = mapRef.current) === null || _mapRef$current21 === void 0 ? void 0 : _mapRef$current21.addListener("tilesLoaded", function (args) {
1004
+ var onTilesLoaded = (_mapRef$current23 = mapRef.current) === null || _mapRef$current23 === void 0 ? void 0 : _mapRef$current23.addListener("tilesLoaded", function (args) {
991
1005
  props.onTilesLoaded && props.onTilesLoaded(args);
992
1006
  }, {
993
1007
  location: true
@@ -996,9 +1010,9 @@ var MFMap = function MFMap(props) {
996
1010
  }
997
1011
 
998
1012
  if (props.onCameraChanging) {
999
- var _mapRef$current22;
1013
+ var _mapRef$current24;
1000
1014
 
1001
- var onCameraChanging = (_mapRef$current22 = mapRef.current) === null || _mapRef$current22 === void 0 ? void 0 : _mapRef$current22.addListener("cameraChanging", function (args) {
1015
+ var onCameraChanging = (_mapRef$current24 = mapRef.current) === null || _mapRef$current24 === void 0 ? void 0 : _mapRef$current24.addListener("cameraChanging", function (args) {
1002
1016
  props.onCameraChanging && props.onCameraChanging(args);
1003
1017
  }, {
1004
1018
  location: true
@@ -1389,7 +1403,9 @@ var MFPOI = function MFPOI(props) {
1389
1403
  draggable = props.draggable,
1390
1404
  userInteractionEnabled = props.userInteractionEnabled,
1391
1405
  map = props.map,
1392
- onCreated = props.onCreated;
1406
+ onCreated = props.onCreated,
1407
+ onClick = props.onClick,
1408
+ onHover = props.onHover;
1393
1409
  var map4dContext = React.useContext(Map4dContext);
1394
1410
  var theMap = map || map4dContext.map;
1395
1411
  var poiRef = React.useRef();
@@ -1419,6 +1435,8 @@ var MFPOI = function MFPOI(props) {
1419
1435
  }
1420
1436
  });
1421
1437
  poiRef.current = new map4d.POI(option);
1438
+ poiRef.current.onClick = onClick;
1439
+ poiRef.current.onHover = onHover;
1422
1440
  (_poiRef$current = poiRef.current) === null || _poiRef$current === void 0 ? void 0 : _poiRef$current.setMap(theMap);
1423
1441
  onCreated && onCreated(poiRef.current);
1424
1442
  }
@@ -1498,6 +1516,16 @@ var MFPOI = function MFPOI(props) {
1498
1516
 
1499
1517
  userInteractionEnabled != undefined && ((_poiRef$current15 = poiRef.current) === null || _poiRef$current15 === void 0 ? void 0 : _poiRef$current15.setUserInteraction(userInteractionEnabled));
1500
1518
  }, [userInteractionEnabled]);
1519
+ React.useEffect(function () {
1520
+ if (poiRef.current) {
1521
+ poiRef.current.onClick = onClick;
1522
+ }
1523
+ }, [onClick]);
1524
+ React.useEffect(function () {
1525
+ if (poiRef.current) {
1526
+ poiRef.current.onHover = onHover;
1527
+ }
1528
+ }, [onHover]);
1501
1529
  return null;
1502
1530
  };
1503
1531