react-map4d-map 1.3.3 → 1.3.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.
- package/dist/components/MFBuilding.d.ts +1 -1
- package/dist/components/MFBuildingOverlay.d.ts +1 -1
- package/dist/components/MFCircle.d.ts +1 -1
- package/dist/components/MFDataLayer.d.ts +1 -1
- package/dist/components/MFDirectionsRenderer.d.ts +1 -1
- package/dist/components/MFGroundOverlay.d.ts +1 -1
- package/dist/components/MFImageOverlay.d.ts +1 -1
- package/dist/components/MFMap.d.ts +1 -1
- package/dist/components/MFMarker.d.ts +1 -1
- package/dist/components/MFPOI.d.ts +1 -1
- package/dist/components/MFPOIOverlay.d.ts +1 -1
- package/dist/components/MFPolygon.d.ts +1 -1
- package/dist/components/MFPolyline.d.ts +1 -1
- package/dist/components/MFTileOverlay.d.ts +1 -1
- package/dist/index.css +9 -0
- package/dist/index.js +65 -101
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +65 -101
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -3
package/dist/index.modern.js
CHANGED
|
@@ -483,12 +483,6 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
483
483
|
directionRef.current.onMouseMove = onMouseMove;
|
|
484
484
|
onCreated && onCreated(directionRef.current);
|
|
485
485
|
}
|
|
486
|
-
|
|
487
|
-
return function () {
|
|
488
|
-
var _directionRef$current2;
|
|
489
|
-
|
|
490
|
-
(_directionRef$current2 = directionRef.current) === null || _directionRef$current2 === void 0 ? void 0 : _directionRef$current2.setMap(null);
|
|
491
|
-
};
|
|
492
486
|
}, [theMap]);
|
|
493
487
|
useEffect(function () {
|
|
494
488
|
if (directionRef.current) {
|
|
@@ -512,46 +506,46 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
512
506
|
}, [onMouseMove]);
|
|
513
507
|
useEffect(function () {
|
|
514
508
|
if (theMap) {
|
|
515
|
-
var _directionRef$
|
|
509
|
+
var _directionRef$current2;
|
|
516
510
|
|
|
517
|
-
(_directionRef$
|
|
511
|
+
(_directionRef$current2 = directionRef.current) === null || _directionRef$current2 === void 0 ? void 0 : _directionRef$current2.setMap(theMap);
|
|
518
512
|
}
|
|
519
513
|
|
|
520
514
|
return function () {
|
|
521
|
-
var _directionRef$
|
|
515
|
+
var _directionRef$current3;
|
|
522
516
|
|
|
523
|
-
(_directionRef$
|
|
517
|
+
(_directionRef$current3 = directionRef.current) === null || _directionRef$current3 === void 0 ? void 0 : _directionRef$current3.setMap(null);
|
|
524
518
|
};
|
|
525
519
|
}, [theMap]);
|
|
526
520
|
useEffect(function () {
|
|
527
521
|
return function () {
|
|
528
|
-
var _directionRef$
|
|
522
|
+
var _directionRef$current4;
|
|
529
523
|
|
|
530
|
-
(_directionRef$
|
|
524
|
+
(_directionRef$current4 = directionRef.current) === null || _directionRef$current4 === void 0 ? void 0 : _directionRef$current4.setMap(null);
|
|
531
525
|
};
|
|
532
526
|
}, []);
|
|
533
527
|
useEffect(function () {
|
|
534
|
-
var _directionRef$
|
|
528
|
+
var _directionRef$current5;
|
|
535
529
|
|
|
536
|
-
routes != undefined && ((_directionRef$
|
|
530
|
+
routes != undefined && ((_directionRef$current5 = directionRef.current) === null || _directionRef$current5 === void 0 ? void 0 : _directionRef$current5.setRoutes(routes));
|
|
537
531
|
}, [routes]);
|
|
538
532
|
useEffect(function () {
|
|
539
|
-
var _directionRef$
|
|
533
|
+
var _directionRef$current6;
|
|
540
534
|
|
|
541
|
-
activedIndex != undefined && ((_directionRef$
|
|
535
|
+
activedIndex != undefined && ((_directionRef$current6 = directionRef.current) === null || _directionRef$current6 === void 0 ? void 0 : _directionRef$current6.setActivedIndex(activedIndex));
|
|
542
536
|
}, [activedIndex]);
|
|
543
537
|
useEffect(function () {
|
|
544
|
-
var _directionRef$
|
|
538
|
+
var _directionRef$current7;
|
|
545
539
|
|
|
546
|
-
activeStrokePattern != undefined && ((_directionRef$
|
|
540
|
+
activeStrokePattern != undefined && ((_directionRef$current7 = directionRef.current) === null || _directionRef$current7 === void 0 ? void 0 : _directionRef$current7.setActiveStrokePattern(activeStrokePattern));
|
|
547
541
|
}, [activeStrokePattern]);
|
|
548
542
|
useEffect(function () {
|
|
549
|
-
var _directionRef$
|
|
543
|
+
var _directionRef$current8;
|
|
550
544
|
|
|
551
|
-
inactiveStrokePattern != undefined && ((_directionRef$
|
|
545
|
+
inactiveStrokePattern != undefined && ((_directionRef$current8 = directionRef.current) === null || _directionRef$current8 === void 0 ? void 0 : _directionRef$current8.setInactiveStrokePattern(inactiveStrokePattern));
|
|
552
546
|
}, [inactiveStrokePattern]);
|
|
553
547
|
useEffect(function () {
|
|
554
|
-
var _directionRef$
|
|
548
|
+
var _directionRef$current9;
|
|
555
549
|
|
|
556
550
|
var option = {
|
|
557
551
|
routes: routes,
|
|
@@ -576,7 +570,7 @@ var MFDirectionsRenderer = function MFDirectionsRenderer(props) {
|
|
|
576
570
|
delete option[key];
|
|
577
571
|
}
|
|
578
572
|
});
|
|
579
|
-
(_directionRef$
|
|
573
|
+
(_directionRef$current9 = directionRef.current) === null || _directionRef$current9 === void 0 ? void 0 : _directionRef$current9.setOptions(option);
|
|
580
574
|
}, [activeStrokeWidth, activeStrokeColor, activeOutlineWidth, activeOutlineColor, inactiveStrokeColor, inactiveOutlineWidth, inactiveOutlineColor, originMarkerOptions, destinationMarkerOptions, waypointMarkerOptions, onMarkerDragEnd]);
|
|
581
575
|
return null;
|
|
582
576
|
};
|
|
@@ -767,8 +761,6 @@ var createId = function createId() {
|
|
|
767
761
|
};
|
|
768
762
|
|
|
769
763
|
var MFMap = function MFMap(props) {
|
|
770
|
-
var _props$options3, _props$options8;
|
|
771
|
-
|
|
772
764
|
var callback = useRef("callback");
|
|
773
765
|
var mapDomRef = useRef();
|
|
774
766
|
var mapRef = useRef();
|
|
@@ -837,156 +829,138 @@ var MFMap = function MFMap(props) {
|
|
|
837
829
|
|
|
838
830
|
destroy();
|
|
839
831
|
};
|
|
840
|
-
}, [props.environment, props.version, props.accessKey]);
|
|
841
|
-
useEffect(function () {
|
|
842
|
-
var _props$options, _mapRef$current2, _props$options2;
|
|
843
|
-
|
|
844
|
-
((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.mapType) != undefined && ((_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 ? void 0 : _mapRef$current2.setMapType((_props$options2 = props.options) === null || _props$options2 === void 0 ? void 0 : _props$options2.mapType));
|
|
845
|
-
}, [(_props$options3 = props.options) === null || _props$options3 === void 0 ? void 0 : _props$options3.mapType]);
|
|
846
|
-
useEffect(function () {
|
|
847
|
-
var _props$options4, _props$options6, _mapRef$current5, _props$options7;
|
|
848
|
-
|
|
849
|
-
if (((_props$options4 = props.options) === null || _props$options4 === void 0 ? void 0 : _props$options4.center) != undefined) {
|
|
850
|
-
var _mapRef$current3, _props$options5, _mapRef$current4;
|
|
851
|
-
|
|
852
|
-
var camera = (_mapRef$current3 = mapRef.current) === null || _mapRef$current3 === void 0 ? void 0 : _mapRef$current3.getCamera();
|
|
853
|
-
camera === null || camera === void 0 ? void 0 : camera.setTarget((_props$options5 = props.options) === null || _props$options5 === void 0 ? void 0 : _props$options5.center);
|
|
854
|
-
(_mapRef$current4 = mapRef.current) === null || _mapRef$current4 === void 0 ? void 0 : _mapRef$current4.moveCamera(camera);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
((_props$options6 = props.options) === null || _props$options6 === void 0 ? void 0 : _props$options6.mapType) != undefined && ((_mapRef$current5 = mapRef.current) === null || _mapRef$current5 === void 0 ? void 0 : _mapRef$current5.setMapType((_props$options7 = props.options) === null || _props$options7 === void 0 ? void 0 : _props$options7.mapType));
|
|
858
|
-
}, [(_props$options8 = props.options) === null || _props$options8 === void 0 ? void 0 : _props$options8.center]);
|
|
832
|
+
}, [props.environment, props.version, props.accessKey, props.options]);
|
|
859
833
|
|
|
860
834
|
var registerEvent = function registerEvent() {
|
|
861
|
-
var _mapRef$
|
|
835
|
+
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;
|
|
862
836
|
|
|
863
|
-
var eventClickMarker = (_mapRef$
|
|
837
|
+
var eventClickMarker = (_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 ? void 0 : _mapRef$current2.addListener("click", function (args) {
|
|
864
838
|
var _args$marker, _args$marker2;
|
|
865
839
|
|
|
866
840
|
((_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));
|
|
867
841
|
}, {
|
|
868
842
|
marker: true
|
|
869
843
|
});
|
|
870
|
-
var eventRightClickMarker = (_mapRef$
|
|
844
|
+
var eventRightClickMarker = (_mapRef$current3 = mapRef.current) === null || _mapRef$current3 === void 0 ? void 0 : _mapRef$current3.addListener("rightClick", function (args) {
|
|
871
845
|
var _args$marker3, _args$marker4;
|
|
872
846
|
|
|
873
847
|
((_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));
|
|
874
848
|
}, {
|
|
875
849
|
marker: true
|
|
876
850
|
});
|
|
877
|
-
var eventDragEndMarker = (_mapRef$
|
|
851
|
+
var eventDragEndMarker = (_mapRef$current4 = mapRef.current) === null || _mapRef$current4 === void 0 ? void 0 : _mapRef$current4.addListener("dragEnd", function (args) {
|
|
878
852
|
var _args$marker5, _args$marker6;
|
|
879
853
|
|
|
880
854
|
((_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));
|
|
881
855
|
}, {
|
|
882
856
|
marker: true
|
|
883
857
|
});
|
|
884
|
-
var eventHoverMarker = (_mapRef$
|
|
858
|
+
var eventHoverMarker = (_mapRef$current5 = mapRef.current) === null || _mapRef$current5 === void 0 ? void 0 : _mapRef$current5.addListener("hover", function (args) {
|
|
885
859
|
var _args$marker7, _args$marker8;
|
|
886
860
|
|
|
887
861
|
((_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));
|
|
888
862
|
}, {
|
|
889
863
|
marker: true
|
|
890
864
|
});
|
|
891
|
-
var eventHoverPolygon = (_mapRef$
|
|
865
|
+
var eventHoverPolygon = (_mapRef$current6 = mapRef.current) === null || _mapRef$current6 === void 0 ? void 0 : _mapRef$current6.addListener("hover", function (args) {
|
|
892
866
|
var _args$polygon, _args$polygon2;
|
|
893
867
|
|
|
894
868
|
((_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));
|
|
895
869
|
}, {
|
|
896
870
|
polygon: true
|
|
897
871
|
});
|
|
898
|
-
var eventHoverPolyline = (_mapRef$
|
|
872
|
+
var eventHoverPolyline = (_mapRef$current7 = mapRef.current) === null || _mapRef$current7 === void 0 ? void 0 : _mapRef$current7.addListener("hover", function (args) {
|
|
899
873
|
var _args$polyline, _args$polyline2;
|
|
900
874
|
|
|
901
875
|
((_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));
|
|
902
876
|
}, {
|
|
903
877
|
polyline: true
|
|
904
878
|
});
|
|
905
|
-
var eventHoverDirection = (_mapRef$
|
|
879
|
+
var eventHoverDirection = (_mapRef$current8 = mapRef.current) === null || _mapRef$current8 === void 0 ? void 0 : _mapRef$current8.addListener("hover", function (args) {
|
|
906
880
|
var _args$renderer, _args$renderer2;
|
|
907
881
|
|
|
908
882
|
((_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));
|
|
909
883
|
}, {
|
|
910
884
|
directions: true
|
|
911
885
|
});
|
|
912
|
-
var eventClickPolyline = (_mapRef$
|
|
886
|
+
var eventClickPolyline = (_mapRef$current9 = mapRef.current) === null || _mapRef$current9 === void 0 ? void 0 : _mapRef$current9.addListener("click", function (args) {
|
|
913
887
|
var _args$polyline3, _args$polyline4;
|
|
914
888
|
|
|
915
889
|
((_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));
|
|
916
890
|
}, {
|
|
917
891
|
polyline: true
|
|
918
892
|
});
|
|
919
|
-
var eventMouseOutDirection = (_mapRef$
|
|
893
|
+
var eventMouseOutDirection = (_mapRef$current10 = mapRef.current) === null || _mapRef$current10 === void 0 ? void 0 : _mapRef$current10.addListener("mouseOut", function (args) {
|
|
920
894
|
var _args$renderer3, _args$renderer4;
|
|
921
895
|
|
|
922
896
|
((_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));
|
|
923
897
|
}, {
|
|
924
898
|
directions: true
|
|
925
899
|
});
|
|
926
|
-
var eventMouseOverDirection = (_mapRef$
|
|
900
|
+
var eventMouseOverDirection = (_mapRef$current11 = mapRef.current) === null || _mapRef$current11 === void 0 ? void 0 : _mapRef$current11.addListener("mouseOver", function (args) {
|
|
927
901
|
var _args$renderer5, _args$renderer6;
|
|
928
902
|
|
|
929
903
|
((_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));
|
|
930
904
|
}, {
|
|
931
905
|
directions: true
|
|
932
906
|
});
|
|
933
|
-
var eventMouseMoveDirection = (_mapRef$
|
|
907
|
+
var eventMouseMoveDirection = (_mapRef$current12 = mapRef.current) === null || _mapRef$current12 === void 0 ? void 0 : _mapRef$current12.addListener("mouseMove", function (args) {
|
|
934
908
|
var _args$renderer7, _args$renderer8;
|
|
935
909
|
|
|
936
910
|
((_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));
|
|
937
911
|
}, {
|
|
938
912
|
directions: true
|
|
939
913
|
});
|
|
940
|
-
var eventMouseOutPolyline = (_mapRef$
|
|
914
|
+
var eventMouseOutPolyline = (_mapRef$current13 = mapRef.current) === null || _mapRef$current13 === void 0 ? void 0 : _mapRef$current13.addListener("mouseOut", function (args) {
|
|
941
915
|
var _args$polyline5, _args$polyline6;
|
|
942
916
|
|
|
943
917
|
((_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));
|
|
944
918
|
}, {
|
|
945
919
|
polyline: true
|
|
946
920
|
});
|
|
947
|
-
var eventMouseOverPolyline = (_mapRef$
|
|
921
|
+
var eventMouseOverPolyline = (_mapRef$current14 = mapRef.current) === null || _mapRef$current14 === void 0 ? void 0 : _mapRef$current14.addListener("mouseOver", function (args) {
|
|
948
922
|
var _args$polyline7, _args$polyline8;
|
|
949
923
|
|
|
950
924
|
((_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));
|
|
951
925
|
}, {
|
|
952
926
|
polyline: true
|
|
953
927
|
});
|
|
954
|
-
var eventMouseMovePolyline = (_mapRef$
|
|
928
|
+
var eventMouseMovePolyline = (_mapRef$current15 = mapRef.current) === null || _mapRef$current15 === void 0 ? void 0 : _mapRef$current15.addListener("mouseMove", function (args) {
|
|
955
929
|
var _args$polyline9, _args$polyline10;
|
|
956
930
|
|
|
957
931
|
((_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));
|
|
958
932
|
}, {
|
|
959
933
|
polyline: true
|
|
960
934
|
});
|
|
961
|
-
var eventMouseOutMarker = (_mapRef$
|
|
935
|
+
var eventMouseOutMarker = (_mapRef$current16 = mapRef.current) === null || _mapRef$current16 === void 0 ? void 0 : _mapRef$current16.addListener("mouseOut", function (args) {
|
|
962
936
|
var _args$marker9, _args$marker10;
|
|
963
937
|
|
|
964
938
|
((_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));
|
|
965
939
|
}, {
|
|
966
940
|
marker: true
|
|
967
941
|
});
|
|
968
|
-
var eventMouseOverMarker = (_mapRef$
|
|
942
|
+
var eventMouseOverMarker = (_mapRef$current17 = mapRef.current) === null || _mapRef$current17 === void 0 ? void 0 : _mapRef$current17.addListener("mouseOver", function (args) {
|
|
969
943
|
var _args$marker11, _args$marker12;
|
|
970
944
|
|
|
971
945
|
((_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));
|
|
972
946
|
}, {
|
|
973
947
|
marker: true
|
|
974
948
|
});
|
|
975
|
-
var eventMouseMoveMarker = (_mapRef$
|
|
949
|
+
var eventMouseMoveMarker = (_mapRef$current18 = mapRef.current) === null || _mapRef$current18 === void 0 ? void 0 : _mapRef$current18.addListener("mouseMove", function (args) {
|
|
976
950
|
var _args$marker13, _args$marker14;
|
|
977
951
|
|
|
978
952
|
((_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));
|
|
979
953
|
}, {
|
|
980
954
|
marker: true
|
|
981
955
|
});
|
|
982
|
-
var eventClickPoi = (_mapRef$
|
|
956
|
+
var eventClickPoi = (_mapRef$current19 = mapRef.current) === null || _mapRef$current19 === void 0 ? void 0 : _mapRef$current19.addListener("click", function (args) {
|
|
983
957
|
var _args$poi, _args$poi2;
|
|
984
958
|
|
|
985
959
|
((_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));
|
|
986
960
|
}, {
|
|
987
961
|
poi: true
|
|
988
962
|
});
|
|
989
|
-
var eventHoverPoi = (_mapRef$
|
|
963
|
+
var eventHoverPoi = (_mapRef$current20 = mapRef.current) === null || _mapRef$current20 === void 0 ? void 0 : _mapRef$current20.addListener("hover", function (args) {
|
|
990
964
|
var _args$poi3, _args$poi4;
|
|
991
965
|
|
|
992
966
|
((_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));
|
|
@@ -996,9 +970,9 @@ var MFMap = function MFMap(props) {
|
|
|
996
970
|
events.current = events.current.concat([eventClickMarker, eventRightClickMarker, eventDragEndMarker, eventHoverMarker, eventHoverPolygon, eventHoverPolyline, eventHoverDirection, eventClickPolyline, eventMouseOutDirection, eventMouseOverDirection, eventMouseMoveDirection, eventMouseOutPolyline, eventMouseOverPolyline, eventMouseMovePolyline, eventMouseOutMarker, eventMouseOverMarker, eventMouseMoveMarker, eventClickPoi, eventHoverPoi]);
|
|
997
971
|
|
|
998
972
|
if (props.onClickLocation) {
|
|
999
|
-
var _mapRef$
|
|
973
|
+
var _mapRef$current21;
|
|
1000
974
|
|
|
1001
|
-
var onClickLocation = (_mapRef$
|
|
975
|
+
var onClickLocation = (_mapRef$current21 = mapRef.current) === null || _mapRef$current21 === void 0 ? void 0 : _mapRef$current21.addListener("click", function (args) {
|
|
1002
976
|
props.onClickLocation && props.onClickLocation(args);
|
|
1003
977
|
}, {
|
|
1004
978
|
location: true
|
|
@@ -1007,9 +981,9 @@ var MFMap = function MFMap(props) {
|
|
|
1007
981
|
}
|
|
1008
982
|
|
|
1009
983
|
if (props.onRightClickLocation) {
|
|
1010
|
-
var _mapRef$
|
|
984
|
+
var _mapRef$current22;
|
|
1011
985
|
|
|
1012
|
-
var onRightClickLocation = (_mapRef$
|
|
986
|
+
var onRightClickLocation = (_mapRef$current22 = mapRef.current) === null || _mapRef$current22 === void 0 ? void 0 : _mapRef$current22.addListener("rightClick", function (args) {
|
|
1013
987
|
props.onRightClickLocation && props.onRightClickLocation(args);
|
|
1014
988
|
}, {
|
|
1015
989
|
location: true
|
|
@@ -1018,9 +992,9 @@ var MFMap = function MFMap(props) {
|
|
|
1018
992
|
}
|
|
1019
993
|
|
|
1020
994
|
if (props.onTilesLoaded) {
|
|
1021
|
-
var _mapRef$
|
|
995
|
+
var _mapRef$current23;
|
|
1022
996
|
|
|
1023
|
-
var onTilesLoaded = (_mapRef$
|
|
997
|
+
var onTilesLoaded = (_mapRef$current23 = mapRef.current) === null || _mapRef$current23 === void 0 ? void 0 : _mapRef$current23.addListener("tilesLoaded", function (args) {
|
|
1024
998
|
props.onTilesLoaded && props.onTilesLoaded(args);
|
|
1025
999
|
}, {
|
|
1026
1000
|
location: true
|
|
@@ -1029,9 +1003,9 @@ var MFMap = function MFMap(props) {
|
|
|
1029
1003
|
}
|
|
1030
1004
|
|
|
1031
1005
|
if (props.onCameraChanging) {
|
|
1032
|
-
var _mapRef$
|
|
1006
|
+
var _mapRef$current24;
|
|
1033
1007
|
|
|
1034
|
-
var onCameraChanging = (_mapRef$
|
|
1008
|
+
var onCameraChanging = (_mapRef$current24 = mapRef.current) === null || _mapRef$current24 === void 0 ? void 0 : _mapRef$current24.addListener("cameraChanging", function (args) {
|
|
1035
1009
|
props.onCameraChanging && props.onCameraChanging(args);
|
|
1036
1010
|
}, {
|
|
1037
1011
|
location: true
|
|
@@ -1629,7 +1603,6 @@ var MFPolygon = function MFPolygon(props) {
|
|
|
1629
1603
|
var map4dContext = useContext(Map4dContext);
|
|
1630
1604
|
var theMap = map || map4dContext.map;
|
|
1631
1605
|
var polygonRef = useRef();
|
|
1632
|
-
var a = useRef();
|
|
1633
1606
|
useEffect(function () {
|
|
1634
1607
|
if (theMap && !polygonRef.current) {
|
|
1635
1608
|
var _polygonRef$current;
|
|
@@ -1652,8 +1625,6 @@ var MFPolygon = function MFPolygon(props) {
|
|
|
1652
1625
|
}
|
|
1653
1626
|
});
|
|
1654
1627
|
polygonRef.current = new map4d.Polygon(option);
|
|
1655
|
-
a.current = theMap;
|
|
1656
|
-
console.log(a.current);
|
|
1657
1628
|
(_polygonRef$current = polygonRef.current) === null || _polygonRef$current === void 0 ? void 0 : _polygonRef$current.setMap(theMap);
|
|
1658
1629
|
polygonRef.current.onHover = props.onHover;
|
|
1659
1630
|
onCreated && onCreated(polygonRef.current);
|
|
@@ -1685,61 +1656,54 @@ var MFPolygon = function MFPolygon(props) {
|
|
|
1685
1656
|
}
|
|
1686
1657
|
}, [onHover]);
|
|
1687
1658
|
useEffect(function () {
|
|
1688
|
-
var _polygonRef$
|
|
1659
|
+
var _polygonRef$current5;
|
|
1689
1660
|
|
|
1690
|
-
|
|
1691
|
-
var _polygonRef$current5;
|
|
1692
|
-
|
|
1693
|
-
var c = (_polygonRef$current5 = polygonRef.current) === null || _polygonRef$current5 === void 0 ? void 0 : _polygonRef$current5.getMap();
|
|
1694
|
-
console.log(c == a.current);
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
(_polygonRef$current6 = polygonRef.current) === null || _polygonRef$current6 === void 0 ? void 0 : _polygonRef$current6.setPaths(paths);
|
|
1661
|
+
(_polygonRef$current5 = polygonRef.current) === null || _polygonRef$current5 === void 0 ? void 0 : _polygonRef$current5.setPaths(paths);
|
|
1698
1662
|
}, [paths]);
|
|
1699
1663
|
useEffect(function () {
|
|
1700
|
-
var _polygonRef$
|
|
1664
|
+
var _polygonRef$current6;
|
|
1701
1665
|
|
|
1702
|
-
fillColor != undefined && ((_polygonRef$
|
|
1666
|
+
fillColor != undefined && ((_polygonRef$current6 = polygonRef.current) === null || _polygonRef$current6 === void 0 ? void 0 : _polygonRef$current6.setFillColor(fillColor));
|
|
1703
1667
|
}, [fillColor]);
|
|
1704
1668
|
useEffect(function () {
|
|
1705
|
-
var _polygonRef$
|
|
1669
|
+
var _polygonRef$current7;
|
|
1706
1670
|
|
|
1707
|
-
fillOpacity != undefined && ((_polygonRef$
|
|
1671
|
+
fillOpacity != undefined && ((_polygonRef$current7 = polygonRef.current) === null || _polygonRef$current7 === void 0 ? void 0 : _polygonRef$current7.setFillOpacity(fillOpacity));
|
|
1708
1672
|
}, [fillOpacity]);
|
|
1709
1673
|
useEffect(function () {
|
|
1710
|
-
var _polygonRef$
|
|
1674
|
+
var _polygonRef$current8;
|
|
1711
1675
|
|
|
1712
|
-
(_polygonRef$
|
|
1676
|
+
(_polygonRef$current8 = polygonRef.current) === null || _polygonRef$current8 === void 0 ? void 0 : _polygonRef$current8.setVisible(visible);
|
|
1713
1677
|
}, [visible]);
|
|
1714
1678
|
useEffect(function () {
|
|
1715
|
-
var _polygonRef$
|
|
1679
|
+
var _polygonRef$current9;
|
|
1716
1680
|
|
|
1717
|
-
strokeColor != undefined && ((_polygonRef$
|
|
1681
|
+
strokeColor != undefined && ((_polygonRef$current9 = polygonRef.current) === null || _polygonRef$current9 === void 0 ? void 0 : _polygonRef$current9.setStrokeColor(strokeColor));
|
|
1718
1682
|
}, [strokeColor]);
|
|
1719
1683
|
useEffect(function () {
|
|
1720
|
-
var _polygonRef$
|
|
1684
|
+
var _polygonRef$current10;
|
|
1721
1685
|
|
|
1722
|
-
strokeWidth != undefined && ((_polygonRef$
|
|
1686
|
+
strokeWidth != undefined && ((_polygonRef$current10 = polygonRef.current) === null || _polygonRef$current10 === void 0 ? void 0 : _polygonRef$current10.setStrokeWidth(strokeWidth));
|
|
1723
1687
|
}, [strokeWidth]);
|
|
1724
1688
|
useEffect(function () {
|
|
1725
|
-
var _polygonRef$
|
|
1689
|
+
var _polygonRef$current11;
|
|
1726
1690
|
|
|
1727
|
-
draggable != undefined && ((_polygonRef$
|
|
1691
|
+
draggable != undefined && ((_polygonRef$current11 = polygonRef.current) === null || _polygonRef$current11 === void 0 ? void 0 : _polygonRef$current11.setDraggable(draggable));
|
|
1728
1692
|
}, [draggable]);
|
|
1729
1693
|
useEffect(function () {
|
|
1730
|
-
var _polygonRef$
|
|
1694
|
+
var _polygonRef$current12;
|
|
1731
1695
|
|
|
1732
|
-
elevation != undefined && ((_polygonRef$
|
|
1696
|
+
elevation != undefined && ((_polygonRef$current12 = polygonRef.current) === null || _polygonRef$current12 === void 0 ? void 0 : _polygonRef$current12.setElevation(elevation));
|
|
1733
1697
|
}, [elevation]);
|
|
1734
1698
|
useEffect(function () {
|
|
1735
|
-
var _polygonRef$
|
|
1699
|
+
var _polygonRef$current13;
|
|
1736
1700
|
|
|
1737
|
-
zIndex != undefined && ((_polygonRef$
|
|
1701
|
+
zIndex != undefined && ((_polygonRef$current13 = polygonRef.current) === null || _polygonRef$current13 === void 0 ? void 0 : _polygonRef$current13.setZIndex(zIndex));
|
|
1738
1702
|
}, [zIndex]);
|
|
1739
1703
|
useEffect(function () {
|
|
1740
|
-
var _polygonRef$
|
|
1704
|
+
var _polygonRef$current14;
|
|
1741
1705
|
|
|
1742
|
-
userInteractionEnabled != undefined && ((_polygonRef$
|
|
1706
|
+
userInteractionEnabled != undefined && ((_polygonRef$current14 = polygonRef.current) === null || _polygonRef$current14 === void 0 ? void 0 : _polygonRef$current14.setUserInteraction(userInteractionEnabled));
|
|
1743
1707
|
}, [userInteractionEnabled]);
|
|
1744
1708
|
return null;
|
|
1745
1709
|
};
|