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