@mapsindoors/react-native-maps-indoors-mapbox 0.0.5-beta → 1.0.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.
- package/README.md +10 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactlibrary/MapboxMapView.java +112 -0
- package/android/src/main/java/com/reactlibrary/MapsIndoorsPackage.java +7 -2
- package/android/src/main/java/com/reactlibrary/{DirectionsRendererModule.java → core/DirectionsRendererModule.java} +3 -2
- package/android/src/main/java/com/reactlibrary/{DirectionsServiceModule.java → core/DirectionsServiceModule.java} +1 -1
- package/android/src/main/java/com/reactlibrary/{MPDisplayRuleModule.java → core/MPDisplayRuleModule.java} +2 -2
- package/android/src/main/java/com/reactlibrary/{MapControlModule.java → core/MapControlModule.java} +16 -57
- package/android/src/main/java/com/reactlibrary/{MapsIndoorsModule.java → core/MapsIndoorsModule.java} +6 -6
- package/android/src/main/java/com/reactlibrary/core/RCMapView.java +16 -0
- package/android/src/main/java/com/reactlibrary/core/README.md +3 -0
- package/android/src/main/java/com/reactlibrary/{UtilsModule.java → core/UtilsModule.java} +2 -2
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Bounds.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Filter.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Location.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/MPCameraPosition.java +12 -7
- package/android/src/main/java/com/reactlibrary/core/models/MPCameraUpdate.java +68 -0
- package/android/src/main/java/com/reactlibrary/{models → core/models}/MPError.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/PositionProvider.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/PositionResult.java +1 -1
- package/android/src/main/java/com/reactlibrary/{models → core/models}/Query.java +1 -1
- package/index.ts +88 -89
- package/ios/MapsIndoorsViewManager.swift +88 -9
- package/ios/core/CameraPosition.swift +15 -0
- package/ios/core/CameraUpdate.swift +19 -0
- package/ios/core/CameraUpdateError.swift +11 -0
- package/ios/{DirectionsRendererBridge.m → core/DirectionsRendererBridge.m} +1 -1
- package/ios/{DirectionsRendererModule.swift → core/DirectionsRendererModule.swift} +17 -7
- package/ios/{MapControlModule.swift → core/MapControlModule.swift} +10 -100
- package/ios/{MapsIndoorsBridge.m → core/MapsIndoorsBridge.m} +18 -0
- package/ios/{MapsIndoorsData.swift → core/MapsIndoorsData.swift} +2 -2
- package/ios/{MapsIndoorsModule.swift → core/MapsIndoorsModule.swift} +50 -1
- package/ios/core/RCMapView.swift +14 -0
- package/ios/core/README.md +4 -0
- package/ios/{UtilsModule.swift → core/UtilsModule.swift} +4 -4
- package/package.json +6 -5
- package/react-native-maps-indoors-mapbox.podspec +2 -2
- package/src/{MPBounds.ts → core/MPBounds.ts} +12 -4
- package/src/{MPBuilding.ts → core/MPBuilding.ts} +1 -1
- package/src/{MPCameraEvent.ts → core/MPCameraEvent.ts} +1 -1
- package/src/{MPCameraEventListener.ts → core/MPCameraEventListener.ts} +1 -1
- package/src/{MPCameraPosition.ts → core/MPCameraPosition.ts} +0 -1
- package/src/{MPCategory.ts → core/MPCategory.ts} +1 -1
- package/src/{MPDirectionsRenderer.ts → core/MPDirectionsRenderer.ts} +4 -4
- package/src/{MPDirectionsService.ts → core/MPDirectionsService.ts} +1 -1
- package/src/{MPDisplayRule.ts → core/MPDisplayRule.ts} +1 -1
- package/src/{MPEntity.ts → core/MPEntity.ts} +1 -1
- package/src/{MPEntityInfo.ts → core/MPEntityInfo.ts} +1 -1
- package/src/{MPFilter.ts → core/MPFilter.ts} +1 -1
- package/src/{MPFilterBehavior.ts → core/MPFilterBehavior.ts} +1 -1
- package/src/{MPFloor.ts → core/MPFloor.ts} +1 -1
- package/src/{MPFloorSelectorInterface.ts → core/MPFloorSelectorInterface.ts} +1 -1
- package/src/{MPLocation.ts → core/MPLocation.ts} +1 -1
- package/src/{MPMapConfig.ts → core/MPMapConfig.ts} +1 -1
- package/src/{MPMultiPolygon.ts → core/MPMultiPolygon.ts} +1 -1
- package/src/{MPPoint.ts → core/MPPoint.ts} +5 -6
- package/src/{MPPolygon.ts → core/MPPolygon.ts} +1 -1
- package/src/{MPPositionProviderInterface.ts → core/MPPositionProviderInterface.ts} +1 -1
- package/src/{MPPositionResultInterface.ts → core/MPPositionResultInterface.ts} +1 -1
- package/src/{MPPropertyData.ts → core/MPPropertyData.ts} +1 -1
- package/src/{MPQuery.ts → core/MPQuery.ts} +1 -1
- package/src/{MPRoute.ts → core/MPRoute.ts} +1 -1
- package/src/{MPRouteCoordinate.ts → core/MPRouteCoordinate.ts} +1 -1
- package/src/{MPRouteLeg.ts → core/MPRouteLeg.ts} +1 -1
- package/src/{MPRouteStep.ts → core/MPRouteStep.ts} +1 -1
- package/src/{MPSelectionBehavior.ts → core/MPSelectionBehavior.ts} +1 -1
- package/src/{MPSettings3D.ts → core/MPSettings3D.ts} +1 -1
- package/src/{MPSolution.ts → core/MPSolution.ts} +1 -1
- package/src/{MPSolutionConfig.ts → core/MPSolutionConfig.ts} +1 -1
- package/src/{MPSolutionDisplayRule.ts → core/MPSolutionDisplayRule.ts} +1 -1
- package/src/{MPUserRoleCollection.ts → core/MPUserRoleCollection.ts} +1 -1
- package/src/{MPUtils.ts → core/MPUtils.ts} +1 -1
- package/src/{MPVenue.ts → core/MPVenue.ts} +1 -1
- package/src/{MapControl.ts → core/MapControl.ts} +1 -1
- package/src/{MapsIndoors.ts → core/MapsIndoors.ts} +1 -1
- package/src/{OnBuildingFoundAtCameraTargetListener.ts → core/OnBuildingFoundAtCameraTargetListener.ts} +1 -1
- package/src/{OnFloorSelectionChangedListener.ts → core/OnFloorSelectionChangedListener.ts} +1 -1
- package/src/{OnLegSelectedListener.ts → core/OnLegSelectedListener.ts} +1 -1
- package/src/{OnLocationSelectedListener.ts → core/OnLocationSelectedListener.ts} +1 -1
- package/src/{OnMapClickListener.ts → core/OnMapClickListener.ts} +1 -1
- package/src/{OnMarkerClickListener.ts → core/OnMarkerClickListener.ts} +1 -1
- package/src/{OnMarkerInfoWindowClickListener.ts → core/OnMarkerInfoWindowClickListener.ts} +1 -1
- package/src/{OnPositionUpdateListener.ts → core/OnPositionUpdateListener.ts} +1 -1
- package/src/{OnVenueFoundAtCameraTargetListener.ts → core/OnVenueFoundAtCameraTargetListener.ts} +1 -1
- package/src/core/README.md +4 -0
- package/android/src/main/java/com/reactlibrary/models/MPCameraUpdate.java +0 -92
- /package/ios/{DirectionsServiceBridge.m → core/DirectionsServiceBridge.m} +0 -0
- /package/ios/{DirectionsServiceModule.swift → core/DirectionsServiceModule.swift} +0 -0
- /package/ios/{MPDisplayRuleBridge.m → core/MPDisplayRuleBridge.m} +0 -0
- /package/ios/{MPDisplayRuleModule.swift → core/MPDisplayRuleModule.swift} +0 -0
- /package/ios/{MapControlBridge.m → core/MapControlBridge.m} +0 -0
- /package/ios/{ReactPositionProvider.swift → core/ReactPositionProvider.swift} +0 -0
- /package/ios/{UtilsBridge.m → core/UtilsBridge.m} +0 -0
- /package/ios/{helpers.swift → core/helpers.swift} +0 -0
- /package/src/{EventNames.ts → core/EventNames.ts} +0 -0
- /package/src/{MPBuildingCollection.ts → core/MPBuildingCollection.ts} +0 -0
- /package/src/{MPBuildingInfo.ts → core/MPBuildingInfo.ts} +0 -0
- /package/src/{MPCameraUpdate.ts → core/MPCameraUpdate.ts} +0 -0
- /package/src/{MPCameraViewFitMode.ts → core/MPCameraViewFitMode.ts} +0 -0
- /package/src/{MPCategoryCollection.ts → core/MPCategoryCollection.ts} +0 -0
- /package/src/{MPCollection.ts → core/MPCollection.ts} +0 -0
- /package/src/{MPCollisionHandling.ts → core/MPCollisionHandling.ts} +0 -0
- /package/src/{MPDataField.ts → core/MPDataField.ts} +0 -0
- /package/src/{MPError.ts → core/MPError.ts} +0 -0
- /package/src/{MPGeometry.ts → core/MPGeometry.ts} +0 -0
- /package/src/{MPHighway.ts → core/MPHighway.ts} +0 -0
- /package/src/{MPIconSize.ts → core/MPIconSize.ts} +0 -0
- /package/src/{MPLocationPropertyNames.ts → core/MPLocationPropertyNames.ts} +0 -0
- /package/src/{MPLocationType.ts → core/MPLocationType.ts} +0 -0
- /package/src/{MPMapStyle.ts → core/MPMapStyle.ts} +0 -0
- /package/src/{MPRouteProperty.ts → core/MPRouteProperty.ts} +0 -0
- /package/src/{MPSize.ts → core/MPSize.ts} +0 -0
- /package/src/{MPUserRole.ts → core/MPUserRole.ts} +0 -0
- /package/src/{MPVenueCollection.ts → core/MPVenueCollection.ts} +0 -0
- /package/src/{MPVenueInfo.ts → core/MPVenueInfo.ts} +0 -0
- /package/src/{MapView.tsx → core/MapView.tsx} +0 -0
- /package/src/{OnFloorUpdateListener.ts → core/OnFloorUpdateListener.ts} +0 -0
- /package/src/{OnLiveLocationUpdateListener.ts → core/OnLiveLocationUpdateListener.ts} +0 -0
package/index.ts
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import MPGeometry from './src/MPGeometry';
|
|
2
|
-
import MPPoint from './src/MPPoint';
|
|
3
|
-
import MPEntity from './src/MPEntity';
|
|
4
|
-
import MPVenue from './src/MPVenue';
|
|
5
|
-
import MPFloor from './src/MPFloor';
|
|
6
|
-
import MPQuery from './src/MPQuery';
|
|
7
|
-
import MPError from './src/MPError';
|
|
8
|
-
import MPFilter from './src/MPFilter';
|
|
9
|
-
import MPBounds from './src/MPBounds';
|
|
10
|
-
import { MPLocationType } from './src/MPLocationType';
|
|
11
|
-
import { MPLocationPropertyNames } from './src/MPLocationPropertyNames';
|
|
12
|
-
import MPPolygon from './src/MPPolygon';
|
|
13
|
-
import MPMapStyle from './src/MPMapStyle';
|
|
14
|
-
import MPBuilding from './src/MPBuilding';
|
|
15
|
-
import MPLocation from './src/MPLocation';
|
|
16
|
-
import MPCategory from './src/MPCategory';
|
|
17
|
-
import MapControl from './src/MapControl';
|
|
18
|
-
import MPIconSize from './src/MPIconSize';
|
|
19
|
-
import MPUserRole from './src/MPUserRole';
|
|
20
|
-
import MPSolution from './src/MPSolution';
|
|
21
|
-
import MapsIndoors from './src/MapsIndoors';
|
|
22
|
-
import MPVenueInfo from './src/MPVenueInfo';
|
|
23
|
-
import MPDataField from './src/MPDataField';
|
|
24
|
-
import MPMapConfig from './src/MPMapConfig';
|
|
25
|
-
import MPSettings3D from './src/MPSettings3D';
|
|
26
|
-
import MPDisplayRule from './src/MPDisplayRule';
|
|
27
|
-
import MPCameraEvent from './src/MPCameraEvent';
|
|
28
|
-
import MPCameraUpdate from './src/MPCameraUpdate';
|
|
29
|
-
import MPMultiPolygon from './src/MPMultiPolygon';
|
|
30
|
-
import MPRoute from './src/MPRoute';
|
|
31
|
-
import MPRouteCoordinate from './src/MPRouteCoordinate';
|
|
32
|
-
import MPRouteLeg from './src/MPRouteLeg';
|
|
33
|
-
import MPRouteStep from './src/MPRouteStep';
|
|
34
|
-
import MPRouteProperty from './src/MPRouteProperty';
|
|
35
|
-
import MPDirectionsRenderer from './src/MPDirectionsRenderer';
|
|
36
|
-
import MPDirectionsService from './src/MPDirectionsService';
|
|
37
|
-
import { MPCameraViewFitMode } from './src/MPCameraViewFitMode';
|
|
38
|
-
import MPCameraPosition from './src/MPCameraPosition';
|
|
39
|
-
import MPFilterBehavior from './src/MPFilterBehavior';
|
|
40
|
-
import MPSolutionConfig from './src/MPSolutionConfig';
|
|
41
|
-
import { OnMapClickListener } from './src/OnMapClickListener';
|
|
42
|
-
import MPSelectionBehavior from './src/MPSelectionBehavior';
|
|
43
|
-
import { MPCollisionHandling } from './src/MPCollisionHandling';
|
|
44
|
-
import { MPSolutionDisplayRule } from './src/MPSolutionDisplayRule';
|
|
45
|
-
import MPCameraEventListener from './src/MPCameraEventListener';
|
|
46
|
-
import { OnFloorUpdateListener } from './src/OnFloorUpdateListener';
|
|
47
|
-
import { OnMarkerClickListener } from './src/OnMarkerClickListener';
|
|
48
|
-
import { OnPositionUpdateListener } from './src/OnPositionUpdateListener';
|
|
49
|
-
import { MPFloorSelectorInterface } from './src/MPFloorSelectorInterface';
|
|
50
|
-
import { MPPositionResultInterface } from './src/MPPositionResultInterface';
|
|
51
|
-
import { OnLocationSelectedListener } from './src/OnLocationSelectedListener';
|
|
52
|
-
import { MPPositionProviderInterface } from './src/MPPositionProviderInterface';
|
|
53
|
-
import { OnLiveLocationUpdateListener } from './src/OnLiveLocationUpdateListener';
|
|
54
|
-
import { OnMarkerInfoWindowClickListener } from './src/OnMarkerInfoWindowClickListener';
|
|
55
|
-
import { OnFloorSelectionChangedListener } from './src/OnFloorSelectionChangedListener';
|
|
56
|
-
import { OnVenueFoundAtCameraTargetListener } from './src/OnVenueFoundAtCameraTargetListener';
|
|
57
|
-
import { OnBuildingFoundAtCameraTargetListener } from './src/OnBuildingFoundAtCameraTargetListener';
|
|
58
|
-
import { OnLegSelectedListener } from './src/OnLegSelectedListener';
|
|
59
|
-
import MPBuildingCollection from './src/MPBuildingCollection';
|
|
60
|
-
import MPVenueCollection from './src/MPVenueCollection';
|
|
61
|
-
import MPCategoryCollection from './src/MPCategoryCollection';
|
|
62
|
-
import MPUserRoleCollection from './src/MPUserRoleCollection';
|
|
63
|
-
import { MPHighway } from './src/MPHighway';
|
|
64
|
-
import { MPFloorParams } from './src/MPFloor';
|
|
65
|
-
import { MPQueryParams } from './src/MPQuery';
|
|
66
|
-
import { MPRouteParams } from './src/MPRoute';
|
|
67
|
-
import { MPVenueParams } from './src/MPVenue';
|
|
68
|
-
import { MPPointParams } from './src/MPPoint';
|
|
69
|
-
import { MPBoundsParams } from './src/MPBounds';
|
|
70
|
-
import { MPFilterParams } from './src/MPFilter';
|
|
71
|
-
import { MPPolygonParams } from './src/MPPolygon';
|
|
72
|
-
import { MPBuildingParams } from './src/MPBuilding';
|
|
73
|
-
import { MPCategoryParams } from './src/MPCategory';
|
|
74
|
-
import { MPMapStyleParams } from './src/MPMapStyle';
|
|
75
|
-
import { MPRouteLegParams } from './src/MPRouteLeg';
|
|
76
|
-
import { MPSolutionParams } from './src/MPSolution';
|
|
77
|
-
import { MPUserRoleParams } from './src/MPUserRole';
|
|
78
|
-
import { MPDataFieldParams } from './src/MPDataField';
|
|
79
|
-
import { MPMapConfigParams } from './src/MPMapConfig';
|
|
80
|
-
import { MPRouteStepParams } from './src/MPRouteStep';
|
|
81
|
-
import { MPVenueInfoParams } from './src/MPVenueInfo';
|
|
82
|
-
import { MPMultiPolygonParams } from './src/MPMultiPolygon';
|
|
83
|
-
import { MPRoutePropertyParams } from './src/MPRouteProperty';
|
|
84
|
-
import { MPCameraPositionParams } from './src/MPCameraPosition';
|
|
85
|
-
import { MPFilterBehaviorParams } from './src/MPFilterBehavior';
|
|
86
|
-
import { MPSolutionConfigParams } from './src/MPSolutionConfig';
|
|
87
|
-
import { MPRouteCoordinateParams } from './src/MPRouteCoordinate';
|
|
88
|
-
import MapView from './src/MapView';
|
|
1
|
+
import MPGeometry from './src/core/MPGeometry';
|
|
2
|
+
import MPPoint from './src/core/MPPoint';
|
|
3
|
+
import MPEntity from './src/core/MPEntity';
|
|
4
|
+
import MPVenue from './src/core/MPVenue';
|
|
5
|
+
import MPFloor from './src/core/MPFloor';
|
|
6
|
+
import MPQuery from './src/core/MPQuery';
|
|
7
|
+
import MPError from './src/core/MPError';
|
|
8
|
+
import MPFilter from './src/core/MPFilter';
|
|
9
|
+
import MPBounds from './src/core/MPBounds';
|
|
10
|
+
import { MPLocationType } from './src/core/MPLocationType';
|
|
11
|
+
import { MPLocationPropertyNames } from './src/core/MPLocationPropertyNames';
|
|
12
|
+
import MPPolygon from './src/core/MPPolygon';
|
|
13
|
+
import MPMapStyle from './src/core/MPMapStyle';
|
|
14
|
+
import MPBuilding from './src/core/MPBuilding';
|
|
15
|
+
import MPLocation from './src/core/MPLocation';
|
|
16
|
+
import MPCategory from './src/core/MPCategory';
|
|
17
|
+
import MapControl from './src/core/MapControl';
|
|
18
|
+
import MPIconSize from './src/core/MPIconSize';
|
|
19
|
+
import MPUserRole from './src/core/MPUserRole';
|
|
20
|
+
import MPSolution from './src/core/MPSolution';
|
|
21
|
+
import MapsIndoors from './src/core/MapsIndoors';
|
|
22
|
+
import MPVenueInfo from './src/core/MPVenueInfo';
|
|
23
|
+
import MPDataField from './src/core/MPDataField';
|
|
24
|
+
import MPMapConfig from './src/core/MPMapConfig';
|
|
25
|
+
import MPSettings3D from './src/core/MPSettings3D';
|
|
26
|
+
import MPDisplayRule from './src/core/MPDisplayRule';
|
|
27
|
+
import MPCameraEvent from './src/core/MPCameraEvent';
|
|
28
|
+
import MPCameraUpdate from './src/core/MPCameraUpdate';
|
|
29
|
+
import MPMultiPolygon from './src/core/MPMultiPolygon';
|
|
30
|
+
import MPRoute from './src/core/MPRoute';
|
|
31
|
+
import MPRouteCoordinate from './src/core/MPRouteCoordinate';
|
|
32
|
+
import MPRouteLeg from './src/core/MPRouteLeg';
|
|
33
|
+
import MPRouteStep from './src/core/MPRouteStep';
|
|
34
|
+
import MPRouteProperty from './src/core/MPRouteProperty';
|
|
35
|
+
import MPDirectionsRenderer from './src/core/MPDirectionsRenderer';
|
|
36
|
+
import MPDirectionsService from './src/core/MPDirectionsService';
|
|
37
|
+
import { MPCameraViewFitMode } from './src/core/MPCameraViewFitMode';
|
|
38
|
+
import MPCameraPosition from './src/core/MPCameraPosition';
|
|
39
|
+
import MPFilterBehavior from './src/core/MPFilterBehavior';
|
|
40
|
+
import MPSolutionConfig from './src/core/MPSolutionConfig';
|
|
41
|
+
import { OnMapClickListener } from './src/core/OnMapClickListener';
|
|
42
|
+
import MPSelectionBehavior from './src/core/MPSelectionBehavior';
|
|
43
|
+
import { MPCollisionHandling } from './src/core/MPCollisionHandling';
|
|
44
|
+
import { MPSolutionDisplayRule } from './src/core/MPSolutionDisplayRule';
|
|
45
|
+
import MPCameraEventListener from './src/core/MPCameraEventListener';
|
|
46
|
+
import { OnFloorUpdateListener } from './src/core/OnFloorUpdateListener';
|
|
47
|
+
import { OnMarkerClickListener } from './src/core/OnMarkerClickListener';
|
|
48
|
+
import { OnPositionUpdateListener } from './src/core/OnPositionUpdateListener';
|
|
49
|
+
import { MPFloorSelectorInterface } from './src/core/MPFloorSelectorInterface';
|
|
50
|
+
import { MPPositionResultInterface } from './src/core/MPPositionResultInterface';
|
|
51
|
+
import { OnLocationSelectedListener } from './src/core/OnLocationSelectedListener';
|
|
52
|
+
import { MPPositionProviderInterface } from './src/core/MPPositionProviderInterface';
|
|
53
|
+
import { OnLiveLocationUpdateListener } from './src/core/OnLiveLocationUpdateListener';
|
|
54
|
+
import { OnMarkerInfoWindowClickListener } from './src/core/OnMarkerInfoWindowClickListener';
|
|
55
|
+
import { OnFloorSelectionChangedListener } from './src/core/OnFloorSelectionChangedListener';
|
|
56
|
+
import { OnVenueFoundAtCameraTargetListener } from './src/core/OnVenueFoundAtCameraTargetListener';
|
|
57
|
+
import { OnBuildingFoundAtCameraTargetListener } from './src/core/OnBuildingFoundAtCameraTargetListener';
|
|
58
|
+
import { OnLegSelectedListener } from './src/core/OnLegSelectedListener';
|
|
59
|
+
import MPBuildingCollection from './src/core/MPBuildingCollection';
|
|
60
|
+
import MPVenueCollection from './src/core/MPVenueCollection';
|
|
61
|
+
import MPCategoryCollection from './src/core/MPCategoryCollection';
|
|
62
|
+
import MPUserRoleCollection from './src/core/MPUserRoleCollection';
|
|
63
|
+
import { MPHighway } from './src/core/MPHighway';
|
|
64
|
+
import { MPFloorParams } from './src/core/MPFloor';
|
|
65
|
+
import { MPQueryParams } from './src/core/MPQuery';
|
|
66
|
+
import { MPRouteParams } from './src/core/MPRoute';
|
|
67
|
+
import { MPVenueParams } from './src/core/MPVenue';
|
|
68
|
+
import { MPPointParams } from './src/core/MPPoint';
|
|
69
|
+
import { MPBoundsParams } from './src/core/MPBounds';
|
|
70
|
+
import { MPFilterParams } from './src/core/MPFilter';
|
|
71
|
+
import { MPPolygonParams } from './src/core/MPPolygon';
|
|
72
|
+
import { MPBuildingParams } from './src/core/MPBuilding';
|
|
73
|
+
import { MPCategoryParams } from './src/core/MPCategory';
|
|
74
|
+
import { MPMapStyleParams } from './src/core/MPMapStyle';
|
|
75
|
+
import { MPRouteLegParams } from './src/core/MPRouteLeg';
|
|
76
|
+
import { MPSolutionParams } from './src/core/MPSolution';
|
|
77
|
+
import { MPUserRoleParams } from './src/core/MPUserRole';
|
|
78
|
+
import { MPDataFieldParams } from './src/core/MPDataField';
|
|
79
|
+
import { MPMapConfigParams } from './src/core/MPMapConfig';
|
|
80
|
+
import { MPRouteStepParams } from './src/core/MPRouteStep';
|
|
81
|
+
import { MPVenueInfoParams } from './src/core/MPVenueInfo';
|
|
82
|
+
import { MPMultiPolygonParams } from './src/core/MPMultiPolygon';
|
|
83
|
+
import { MPRoutePropertyParams } from './src/core/MPRouteProperty';
|
|
84
|
+
import { MPCameraPositionParams } from './src/core/MPCameraPosition';
|
|
85
|
+
import { MPFilterBehaviorParams } from './src/core/MPFilterBehavior';
|
|
86
|
+
import { MPSolutionConfigParams } from './src/core/MPSolutionConfig';
|
|
87
|
+
import { MPRouteCoordinateParams } from './src/core/MPRouteCoordinate';
|
|
88
|
+
import MapView from './src/core/MapView';
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
export default MapsIndoors;
|
|
@@ -181,4 +181,3 @@ export type {
|
|
|
181
181
|
MPSolutionConfigParams,
|
|
182
182
|
MPRouteCoordinateParams
|
|
183
183
|
};
|
|
184
|
-
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import React
|
|
3
3
|
|
|
4
|
+
import MapsIndoors
|
|
4
5
|
import MapsIndoorsCore
|
|
5
6
|
import MapsIndoorsMapbox
|
|
6
7
|
import MapboxMaps
|
|
@@ -9,22 +10,100 @@ import MapboxMaps
|
|
|
9
10
|
class MapsIndoorsViewManager : RCTViewManager {
|
|
10
11
|
@objc override static func requiresMainQueueSetup() -> Bool {return false}
|
|
11
12
|
|
|
12
|
-
//private var mcListener: ??? MPMapControlReadyListener
|
|
13
|
-
|
|
14
13
|
override func view() -> UIView! {
|
|
15
14
|
let mapInitOptions = MapInitOptions(resourceOptions: ResourceOptions(accessToken: Bundle.main.object(forInfoDictionaryKey: "MBXAccessToken") as? String ?? ""))
|
|
16
15
|
let mapView = MapView(frame: .zero, mapInitOptions: mapInitOptions)
|
|
17
16
|
|
|
18
|
-
MapsIndoorsData.sharedInstance.mapView = mapView
|
|
17
|
+
MapsIndoorsData.sharedInstance.mapView = MapBoxView(mapboxView: mapView)
|
|
19
18
|
return mapView
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
// createMapFragment in java
|
|
23
21
|
@objc func create(_ node: NSNumber, nodeAgain: NSNumber) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
struct MapBoxView: RCMapView {
|
|
26
|
+
|
|
27
|
+
private let mapboxView: MapView
|
|
28
|
+
|
|
29
|
+
init(mapboxView: MapView) {
|
|
30
|
+
self.mapboxView = mapboxView
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private func makeCameraUpdate(cameraUpdate: CameraUpdate) throws -> CameraOptions {
|
|
34
|
+
var update: CameraOptions
|
|
35
|
+
|
|
36
|
+
switch cameraUpdate.mode {
|
|
37
|
+
case "fromPoint":
|
|
38
|
+
guard let point = cameraUpdate.point else {
|
|
39
|
+
throw CameraUpdateError.missingField("fromPoint", "point")
|
|
40
|
+
}
|
|
41
|
+
let camera = mapboxView.mapboxMap.cameraState
|
|
42
|
+
|
|
43
|
+
update = CameraOptions(cameraState: camera)
|
|
44
|
+
update.center = point.coordinate
|
|
45
|
+
case "fromBounds":
|
|
46
|
+
guard let bounds = cameraUpdate.bounds else {
|
|
47
|
+
throw CameraUpdateError.missingField("fromBounds", "bounds")
|
|
48
|
+
}
|
|
49
|
+
let camera = mapboxView.mapboxMap.cameraState
|
|
50
|
+
|
|
51
|
+
let camerabounds = CameraBoundsOptions(bounds: CoordinateBounds(southwest: bounds.southWest, northeast: bounds.northEast))
|
|
52
|
+
|
|
53
|
+
update = CameraOptions(cameraState: camera)
|
|
54
|
+
update.center = camerabounds.bounds?.center
|
|
55
|
+
case "zoomBy":
|
|
56
|
+
let camera = mapboxView.mapboxMap.cameraState
|
|
57
|
+
|
|
58
|
+
update = CameraOptions(cameraState: camera)
|
|
59
|
+
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
60
|
+
case "zoomTo":
|
|
61
|
+
let camera = mapboxView.mapboxMap.cameraState
|
|
62
|
+
|
|
63
|
+
update = CameraOptions(cameraState: camera)
|
|
64
|
+
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
65
|
+
case "fromCameraPosition":
|
|
66
|
+
guard let position = cameraUpdate.position else {
|
|
67
|
+
throw CameraUpdateError.missingField("fromCameraPosition", "position")
|
|
68
|
+
}
|
|
69
|
+
let camera = mapboxView.mapboxMap.cameraState
|
|
70
|
+
|
|
71
|
+
update = CameraOptions(cameraState: camera)
|
|
72
|
+
update.center = position.target.coordinate
|
|
73
|
+
update.bearing = CLLocationDirection(position.bearing)
|
|
74
|
+
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
75
|
+
default:
|
|
76
|
+
throw CameraUpdateError.unknownMode(cameraUpdate.mode)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return update
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
func animateCamera(cameraUpdate: CameraUpdate, duration: Int) throws {
|
|
83
|
+
let cameraOption: CameraOptions
|
|
84
|
+
|
|
85
|
+
cameraOption = try makeCameraUpdate(cameraUpdate: cameraUpdate)
|
|
86
|
+
|
|
87
|
+
DispatchQueue.main.async {
|
|
88
|
+
if (duration != 0) {
|
|
89
|
+
mapboxView.mapboxMap.setCamera(to: cameraOption)
|
|
90
|
+
} else {
|
|
91
|
+
mapboxView.mapboxMap.setCamera(to: cameraOption)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
func moveCamera(cameraUpdate: CameraUpdate) throws {
|
|
97
|
+
let cameraOption: CameraOptions
|
|
98
|
+
|
|
99
|
+
cameraOption = try makeCameraUpdate(cameraUpdate: cameraUpdate)
|
|
100
|
+
|
|
101
|
+
DispatchQueue.main.async {
|
|
102
|
+
mapboxView.mapboxMap.setCamera(to: cameraOption)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
func getConfig() -> MPMapConfig {
|
|
107
|
+
return MPMapConfig(mapBoxView: mapboxView, accessToken: Bundle.main.object(forInfoDictionaryKey: "MBXAccessToken") as? String ?? "")
|
|
29
108
|
}
|
|
30
109
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CameraPosition.swift
|
|
3
|
+
// react-native-maps-indoors-mapbox
|
|
4
|
+
//
|
|
5
|
+
// Created by Tim Mikkelsen on 14/06/2023.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import MapsIndoors
|
|
9
|
+
|
|
10
|
+
public struct CameraPosition: Codable {
|
|
11
|
+
let zoom: Float
|
|
12
|
+
let tilt: Float // TODO: this is called viewingAngle in MPCameraPosition(Codable)
|
|
13
|
+
let bearing: Float
|
|
14
|
+
let target: MPPoint
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CameraUpdate.swift
|
|
3
|
+
// react-native-maps-indoors-mapbox
|
|
4
|
+
//
|
|
5
|
+
// Created by Tim Mikkelsen on 14/06/2023.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import MapsIndoors
|
|
9
|
+
|
|
10
|
+
public struct CameraUpdate: Codable {
|
|
11
|
+
let position: CameraPosition?
|
|
12
|
+
let mode: String
|
|
13
|
+
let point: MPPoint?
|
|
14
|
+
let bounds: MPGeoBounds?
|
|
15
|
+
let padding: Int?
|
|
16
|
+
let width: Int?
|
|
17
|
+
let height: Int?
|
|
18
|
+
let zoom: Float?
|
|
19
|
+
}
|
|
@@ -7,14 +7,22 @@
|
|
|
7
7
|
|
|
8
8
|
import MapsIndoors
|
|
9
9
|
import MapsIndoorsCodable
|
|
10
|
+
import React
|
|
10
11
|
|
|
11
12
|
@objc(DirectionsRenderer)
|
|
12
|
-
public class DirectionsRendererModule:
|
|
13
|
+
public class DirectionsRendererModule: RCTEventEmitter {
|
|
13
14
|
private var directionsRenderer: MPDirectionsRenderer? = nil
|
|
14
15
|
private var isListeningForLegChanges: Bool = false
|
|
15
16
|
|
|
16
|
-
@objc static func requiresMainQueueSetup() -> Bool { return false }
|
|
17
|
+
@objc public override static func requiresMainQueueSetup() -> Bool { return false }
|
|
17
18
|
|
|
19
|
+
/// Base overide for RCTEventEmitter.
|
|
20
|
+
///
|
|
21
|
+
/// - Returns: all supported events
|
|
22
|
+
@objc open override func supportedEvents() -> [String] {
|
|
23
|
+
return MapsIndoorsData.sharedInstance.allEvents
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
@objc public func clear(_ resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
19
27
|
if (directionsRenderer == nil) {
|
|
20
28
|
directionsRenderer = MapsIndoorsData.sharedInstance.mapControl?.newDirectionsRenderer()
|
|
@@ -29,7 +37,7 @@ public class DirectionsRendererModule: NSObject {
|
|
|
29
37
|
return resolve(nil)
|
|
30
38
|
}
|
|
31
39
|
|
|
32
|
-
@objc public func
|
|
40
|
+
@objc public func getSelectedLegFloorIndex(_ resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
33
41
|
if (directionsRenderer == nil) {
|
|
34
42
|
directionsRenderer = MapsIndoorsData.sharedInstance.mapControl?.newDirectionsRenderer()
|
|
35
43
|
}
|
|
@@ -61,7 +69,7 @@ public class DirectionsRendererModule: NSObject {
|
|
|
61
69
|
if succes {
|
|
62
70
|
directionsRenderer.animate(duration: 5)
|
|
63
71
|
if (isListeningForLegChanges) {
|
|
64
|
-
|
|
72
|
+
sendEvent(withName: MapsIndoorsData.Event.onLegSelected.rawValue, body: ["leg": directionsRenderer.routeLegIndex])
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
}
|
|
@@ -83,7 +91,7 @@ public class DirectionsRendererModule: NSObject {
|
|
|
83
91
|
if succes {
|
|
84
92
|
directionsRenderer.animate(duration: 5)
|
|
85
93
|
if (isListeningForLegChanges) {
|
|
86
|
-
|
|
94
|
+
sendEvent(withName: MapsIndoorsData.Event.onLegSelected.rawValue, body: ["leg": directionsRenderer.routeLegIndex])
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
97
|
}
|
|
@@ -114,7 +122,7 @@ public class DirectionsRendererModule: NSObject {
|
|
|
114
122
|
directionsRenderer.animate(duration: 5)
|
|
115
123
|
|
|
116
124
|
if isListeningForLegChanges {
|
|
117
|
-
|
|
125
|
+
sendEvent(withName: MapsIndoorsData.Event.onLegSelected.rawValue, body: ["leg": directionsRenderer.routeLegIndex])
|
|
118
126
|
}
|
|
119
127
|
}
|
|
120
128
|
return resolve(nil)
|
|
@@ -155,6 +163,7 @@ public class DirectionsRendererModule: NSObject {
|
|
|
155
163
|
|
|
156
164
|
@objc public func setOnLegSelectedListener(_ resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
157
165
|
isListeningForLegChanges = true
|
|
166
|
+
return resolve(nil)
|
|
158
167
|
}
|
|
159
168
|
|
|
160
169
|
@objc public func setPolyLineColors(_ foregroundString: String, backgroundString: String, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
@@ -172,10 +181,11 @@ public class DirectionsRendererModule: NSObject {
|
|
|
172
181
|
return doReject(reject, message: "directions renderer null. MapControl needs to have been instantiated first")
|
|
173
182
|
}
|
|
174
183
|
|
|
184
|
+
|
|
175
185
|
guard let route = try? JSONDecoder().decode(MPRouteCodable.self, from: Data(routeString.utf8)) else {
|
|
176
186
|
return doReject(reject, message: "Route could not be parsed")
|
|
177
187
|
}
|
|
178
|
-
|
|
188
|
+
|
|
179
189
|
DispatchQueue.main.sync {
|
|
180
190
|
directionsRenderer.route = route
|
|
181
191
|
directionsRenderer.routeLegIndex = 0
|
|
@@ -3,13 +3,8 @@ import MapsIndoors
|
|
|
3
3
|
import MapsIndoorsCore
|
|
4
4
|
import MapsIndoorsCodable
|
|
5
5
|
|
|
6
|
-
import MapboxMaps
|
|
7
|
-
import MapsIndoorsMapbox
|
|
8
6
|
import React
|
|
9
7
|
|
|
10
|
-
//import MapboxMaps
|
|
11
|
-
//import MapsIndoorsMapbox
|
|
12
|
-
|
|
13
8
|
@objc(MapControlModule)
|
|
14
9
|
public class MapControlModule: RCTEventEmitter {
|
|
15
10
|
@objc override public static func requiresMainQueueSetup() -> Bool {return false}
|
|
@@ -23,79 +18,6 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
23
18
|
return MapsIndoorsData.sharedInstance.allEvents
|
|
24
19
|
}
|
|
25
20
|
|
|
26
|
-
//Internal structs (borrowed from flutter implementation) used to decode the camera json
|
|
27
|
-
struct CameraUpdate: Codable {
|
|
28
|
-
let position: CameraPosition? // TODO: Could this somehow use MPCameraPositionCodable?
|
|
29
|
-
let mode: String
|
|
30
|
-
let point: MPPoint?
|
|
31
|
-
let bounds: MPGeoBounds?
|
|
32
|
-
let padding: Int?
|
|
33
|
-
let width: Int?
|
|
34
|
-
let height: Int?
|
|
35
|
-
let zoom: Float?
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
struct CameraPosition: Codable {
|
|
39
|
-
let zoom: Float
|
|
40
|
-
let tilt: Float // TODO: this is called viewingAngle in MPCameraPosition(Codable)
|
|
41
|
-
let bearing: Float
|
|
42
|
-
let target: MPPoint
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
enum CameraUpdateError: Error {
|
|
46
|
-
case missingField(String, String)
|
|
47
|
-
case unknownMode(String)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
private func makeCameraUpdate(cameraUpdate: CameraUpdate) throws -> CameraOptions {
|
|
51
|
-
var update: CameraOptions
|
|
52
|
-
|
|
53
|
-
switch cameraUpdate.mode {
|
|
54
|
-
case "fromPoint":
|
|
55
|
-
guard let point = cameraUpdate.point else {
|
|
56
|
-
throw CameraUpdateError.missingField("fromPoint", "point")
|
|
57
|
-
}
|
|
58
|
-
let camera = MapsIndoorsData.sharedInstance.mapView?.mapboxMap.cameraState
|
|
59
|
-
|
|
60
|
-
update = CameraOptions(cameraState: camera!)
|
|
61
|
-
update.center = point.coordinate
|
|
62
|
-
case "fromBounds":
|
|
63
|
-
guard let bounds = cameraUpdate.bounds else {
|
|
64
|
-
throw CameraUpdateError.missingField("fromBounds", "bounds")
|
|
65
|
-
}
|
|
66
|
-
let camera = MapsIndoorsData.sharedInstance.mapView?.mapboxMap.cameraState
|
|
67
|
-
|
|
68
|
-
let camerabounds = CameraBoundsOptions(bounds: CoordinateBounds(southwest: bounds.southWest, northeast: bounds.northEast))
|
|
69
|
-
|
|
70
|
-
update = CameraOptions(cameraState: camera!)
|
|
71
|
-
update.center = camerabounds.bounds?.center
|
|
72
|
-
case "zoomBy":
|
|
73
|
-
let camera = MapsIndoorsData.sharedInstance.mapView?.mapboxMap.cameraState
|
|
74
|
-
|
|
75
|
-
update = CameraOptions(cameraState: camera!)
|
|
76
|
-
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
77
|
-
case "zoomTo":
|
|
78
|
-
let camera = MapsIndoorsData.sharedInstance.mapView?.mapboxMap.cameraState
|
|
79
|
-
|
|
80
|
-
update = CameraOptions(cameraState: camera!)
|
|
81
|
-
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
82
|
-
case "fromCameraPosition":
|
|
83
|
-
guard let position = cameraUpdate.position else {
|
|
84
|
-
throw CameraUpdateError.missingField("fromCameraPosition", "position")
|
|
85
|
-
}
|
|
86
|
-
let camera = MapsIndoorsData.sharedInstance.mapView?.mapboxMap.cameraState
|
|
87
|
-
|
|
88
|
-
update = CameraOptions(cameraState: camera!)
|
|
89
|
-
update.center = position.target.coordinate
|
|
90
|
-
update.bearing = CLLocationDirection(position.bearing)
|
|
91
|
-
update.zoom = CGFloat(cameraUpdate.zoom!)
|
|
92
|
-
default:
|
|
93
|
-
throw CameraUpdateError.unknownMode(cameraUpdate.mode)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return update
|
|
97
|
-
}
|
|
98
|
-
|
|
99
21
|
@objc public func initMapControl(_ config: NSDictionary,
|
|
100
22
|
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
101
23
|
rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
@@ -105,7 +27,7 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
105
27
|
return doReject(reject, message: "Mapview not available")
|
|
106
28
|
}
|
|
107
29
|
|
|
108
|
-
self.mapConfig =
|
|
30
|
+
self.mapConfig = mapView.getConfig()
|
|
109
31
|
|
|
110
32
|
guard let mapControl = MPMapsIndoors.createMapControl(mapConfig: self.mapConfig!) else {
|
|
111
33
|
return doReject(reject, message: "Unable to initialize Map Control")
|
|
@@ -309,28 +231,28 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
309
231
|
return resolve(nil)
|
|
310
232
|
}
|
|
311
233
|
|
|
312
|
-
@objc public func
|
|
234
|
+
@objc public func getMapViewPaddingStart(_ resolve: RCTPromiseResolveBlock,
|
|
313
235
|
rejecter reject: RCTPromiseRejectBlock) {
|
|
314
236
|
guard let mapControl = MapsIndoorsData.sharedInstance.mapControl else {
|
|
315
237
|
return doReject(reject, message: "mapcontrol not available")
|
|
316
238
|
}
|
|
317
239
|
return resolve(mapControl.mapPadding.left)
|
|
318
240
|
}
|
|
319
|
-
@objc public func
|
|
241
|
+
@objc public func getMapViewPaddingEnd(_ resolve: RCTPromiseResolveBlock,
|
|
320
242
|
rejecter reject: RCTPromiseRejectBlock) {
|
|
321
243
|
guard let mapControl = MapsIndoorsData.sharedInstance.mapControl else {
|
|
322
244
|
return doReject(reject, message: "mapcontrol not available")
|
|
323
245
|
}
|
|
324
246
|
return resolve(mapControl.mapPadding.right)
|
|
325
247
|
}
|
|
326
|
-
@objc public func
|
|
248
|
+
@objc public func getMapViewPaddingTop(_ resolve: RCTPromiseResolveBlock,
|
|
327
249
|
rejecter reject: RCTPromiseRejectBlock) {
|
|
328
250
|
guard let mapControl = MapsIndoorsData.sharedInstance.mapControl else {
|
|
329
251
|
return doReject(reject, message: "mapcontrol not available")
|
|
330
252
|
}
|
|
331
253
|
return resolve(mapControl.mapPadding.top)
|
|
332
254
|
}
|
|
333
|
-
@objc public func
|
|
255
|
+
@objc public func getMapViewPaddingBottom(_ resolve: RCTPromiseResolveBlock,
|
|
334
256
|
rejecter reject: RCTPromiseRejectBlock) {
|
|
335
257
|
guard let mapControl = MapsIndoorsData.sharedInstance.mapControl else {
|
|
336
258
|
return doReject(reject, message: "mapcontrol not available")
|
|
@@ -426,17 +348,8 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
426
348
|
// /*if*/ let duration = _duration.intValue // Only used if using _duration: NSNumber to match @Nullable in Java
|
|
427
349
|
do {
|
|
428
350
|
let cameraUpdate: CameraUpdate = try fromJSON(updateJSON)
|
|
429
|
-
let cameraOption: CameraOptions
|
|
430
|
-
|
|
431
|
-
cameraOption = try makeCameraUpdate(cameraUpdate: cameraUpdate)
|
|
432
351
|
|
|
433
|
-
|
|
434
|
-
if (duration != 0) {
|
|
435
|
-
mapView.mapboxMap.setCamera(to: cameraOption)
|
|
436
|
-
} else {
|
|
437
|
-
mapView.mapboxMap.setCamera(to: cameraOption)
|
|
438
|
-
}
|
|
439
|
-
}
|
|
352
|
+
try mapView.animateCamera(cameraUpdate: cameraUpdate, duration: duration)
|
|
440
353
|
|
|
441
354
|
return resolve(nil)
|
|
442
355
|
} catch let e /*as CameraUpdateError*/ {
|
|
@@ -453,14 +366,11 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
453
366
|
|
|
454
367
|
do {
|
|
455
368
|
let cameraUpdate: CameraUpdate = try fromJSON(updateJSON)
|
|
456
|
-
let cameraOption: CameraOptions
|
|
457
369
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
mapView.mapboxMap.setCamera(to: cameraOption)
|
|
461
|
-
}
|
|
370
|
+
try mapView.moveCamera(cameraUpdate: cameraUpdate)
|
|
371
|
+
|
|
462
372
|
return resolve(nil)
|
|
463
|
-
} catch let e
|
|
373
|
+
} catch let e {
|
|
464
374
|
return doReject(reject, error: e)
|
|
465
375
|
}
|
|
466
376
|
}
|
|
@@ -550,7 +460,7 @@ public class MapControlModule: RCTEventEmitter {
|
|
|
550
460
|
}
|
|
551
461
|
|
|
552
462
|
@objc public func setMPCameraEventListener(_ setup: Bool, resolver resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
|
|
553
|
-
|
|
463
|
+
|
|
554
464
|
return doReject(reject, message: "NOT IMPLEMENTED")
|
|
555
465
|
}
|
|
556
466
|
|
|
@@ -95,4 +95,22 @@ RCT_EXTERN_METHOD(requiresMainQueueSetup)
|
|
|
95
95
|
RCT_EXTERN_METHOD(isReady:(RCTPromiseResolveBlock) resolve
|
|
96
96
|
rejecter:(RCTPromiseRejectBlock) reject)
|
|
97
97
|
|
|
98
|
+
RCT_EXTERN_METHOD(getDefaultVenue:(RCTPromiseResolveBlock) resolve
|
|
99
|
+
rejecter:(RCTPromiseRejectBlock) reject)
|
|
100
|
+
|
|
101
|
+
RCT_EXTERN_METHOD(checkOfflineDataAvailability:(RCTPromiseResolveBlock) resolve
|
|
102
|
+
rejecter:(RCTPromiseRejectBlock) reject)
|
|
103
|
+
|
|
104
|
+
RCT_EXTERN_METHOD(destroy:(RCTPromiseResolveBlock) resolve
|
|
105
|
+
rejecter:(RCTPromiseRejectBlock) reject)
|
|
106
|
+
|
|
107
|
+
RCT_EXTERN_METHOD(isInitialized:(RCTPromiseResolveBlock) resolve
|
|
108
|
+
rejecter:(RCTPromiseRejectBlock) reject)
|
|
109
|
+
|
|
110
|
+
RCT_EXTERN_METHOD(synchronizeContent:(RCTPromiseResolveBlock) resolve
|
|
111
|
+
rejecter:(RCTPromiseRejectBlock) reject)
|
|
112
|
+
|
|
113
|
+
RCT_EXTERN_METHOD(setLanguage:(NSString) language
|
|
114
|
+
resolver:(RCTPromiseResolveBlock) resolve
|
|
115
|
+
rejecter:(RCTPromiseRejectBlock) reject)
|
|
98
116
|
@end
|