@mapsindoors/react-native-maps-indoors-mapbox 2.6.1 → 2.6.2-rc.1

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.
Files changed (132) hide show
  1. package/android/src/main/java/com/mapsindoorsrn/core/DirectionsRendererModule.java +322 -0
  2. package/android/src/main/java/com/mapsindoorsrn/core/DirectionsServiceModule.java +166 -0
  3. package/android/src/main/java/com/mapsindoorsrn/core/MPDisplayRuleModule.java +1699 -0
  4. package/android/src/main/java/com/mapsindoorsrn/core/MapControlModule.java +761 -0
  5. package/android/src/main/java/com/mapsindoorsrn/core/MapsIndoorsModule.java +410 -0
  6. package/android/src/main/java/com/mapsindoorsrn/core/RCMapView.java +16 -0
  7. package/android/src/main/java/com/mapsindoorsrn/core/README.md +3 -0
  8. package/android/src/main/java/com/mapsindoorsrn/core/UtilsModule.java +227 -0
  9. package/android/src/main/java/com/mapsindoorsrn/core/models/BitmapStopIconConfig.java +22 -0
  10. package/android/src/main/java/com/mapsindoorsrn/core/models/Bounds.java +19 -0
  11. package/android/src/main/java/com/mapsindoorsrn/core/models/Filter.java +77 -0
  12. package/android/src/main/java/com/mapsindoorsrn/core/models/Location.java +17 -0
  13. package/android/src/main/java/com/mapsindoorsrn/core/models/MPCameraPosition.java +34 -0
  14. package/android/src/main/java/com/mapsindoorsrn/core/models/MPCameraUpdate.java +68 -0
  15. package/android/src/main/java/com/mapsindoorsrn/core/models/MPError.java +38 -0
  16. package/android/src/main/java/com/mapsindoorsrn/core/models/PositionProvider.java +46 -0
  17. package/android/src/main/java/com/mapsindoorsrn/core/models/PositionResult.java +117 -0
  18. package/android/src/main/java/com/mapsindoorsrn/core/models/Query.java +30 -0
  19. package/android/src/main/java/com/mapsindoorsrn/core/models/RouteStopIconConfigModel.java +35 -0
  20. package/ios/core/CameraPosition.swift +15 -0
  21. package/ios/core/CameraUpdate.swift +19 -0
  22. package/ios/core/CameraUpdateError.swift +11 -0
  23. package/ios/core/DirectionsRendererBridge.m +59 -0
  24. package/ios/core/DirectionsRendererModule.swift +359 -0
  25. package/ios/core/DirectionsServiceBridge.m +55 -0
  26. package/ios/core/DirectionsServiceModule.swift +186 -0
  27. package/ios/core/IconStopUrl.swift +17 -0
  28. package/ios/core/LabelGraphic.swift +15 -0
  29. package/ios/core/MPDisplayRuleBridge.m +696 -0
  30. package/ios/core/MPDisplayRuleModule.swift +1704 -0
  31. package/ios/core/MapControlBridge.m +213 -0
  32. package/ios/core/MapControlModule.swift +702 -0
  33. package/ios/core/MapsIndoorsBridge.m +128 -0
  34. package/ios/core/MapsIndoorsData.swift +288 -0
  35. package/ios/core/MapsIndoorsModule.swift +363 -0
  36. package/ios/core/RCMapView.swift +16 -0
  37. package/ios/core/README.md +3 -0
  38. package/ios/core/ReactPositionProvider.swift +27 -0
  39. package/ios/core/RouteIcon.swift +34 -0
  40. package/ios/core/UtilsBridge.m +73 -0
  41. package/ios/core/UtilsModule.swift +182 -0
  42. package/ios/core/helpers.swift +57 -0
  43. package/package.json +1 -1
  44. package/src/core/EventNames.ts +21 -0
  45. package/src/core/MPAdditionalDetail.ts +102 -0
  46. package/src/core/MPBadgePosition.ts +12 -0
  47. package/src/core/MPBounds.ts +155 -0
  48. package/src/core/MPBuilding.ts +333 -0
  49. package/src/core/MPBuildingCollection.ts +57 -0
  50. package/src/core/MPBuildingInfo.ts +63 -0
  51. package/src/core/MPCameraEvent.ts +17 -0
  52. package/src/core/MPCameraEventListener.ts +17 -0
  53. package/src/core/MPCameraPosition.ts +82 -0
  54. package/src/core/MPCameraUpdate.ts +174 -0
  55. package/src/core/MPCameraViewFitMode.ts +25 -0
  56. package/src/core/MPCategory.ts +85 -0
  57. package/src/core/MPCategoryCollection.ts +62 -0
  58. package/src/core/MPCollection.ts +59 -0
  59. package/src/core/MPCollisionHandling.ts +12 -0
  60. package/src/core/MPDailyOpeningHours.ts +67 -0
  61. package/src/core/MPDataField.ts +69 -0
  62. package/src/core/MPDetailType.ts +73 -0
  63. package/src/core/MPDirectionsRenderer.ts +238 -0
  64. package/src/core/MPDirectionsService.ts +152 -0
  65. package/src/core/MPDisplayRule.ts +1823 -0
  66. package/src/core/MPEntity.ts +60 -0
  67. package/src/core/MPEntityInfo.ts +28 -0
  68. package/src/core/MPError.ts +122 -0
  69. package/src/core/MPFeatureTypes.ts +8 -0
  70. package/src/core/MPFilter.ts +168 -0
  71. package/src/core/MPFilterBehavior.ts +115 -0
  72. package/src/core/MPFloor.ts +170 -0
  73. package/src/core/MPFloorSelectorInterface.ts +63 -0
  74. package/src/core/MPGeometry.ts +91 -0
  75. package/src/core/MPHighlightBehavior.ts +115 -0
  76. package/src/core/MPHighway.ts +14 -0
  77. package/src/core/MPIconPlacement.ts +13 -0
  78. package/src/core/MPIconSize.ts +39 -0
  79. package/src/core/MPLabelGraphic.ts +24 -0
  80. package/src/core/MPLabelPosition.ts +12 -0
  81. package/src/core/MPLabelType.ts +11 -0
  82. package/src/core/MPLocation.ts +440 -0
  83. package/src/core/MPLocationPropertyNames.ts +30 -0
  84. package/src/core/MPLocationSettings.ts +40 -0
  85. package/src/core/MPLocationType.ts +16 -0
  86. package/src/core/MPMapConfig.ts +280 -0
  87. package/src/core/MPMapStyle.ts +57 -0
  88. package/src/core/MPMultiPolygon.ts +218 -0
  89. package/src/core/MPOpeningHours.ts +48 -0
  90. package/src/core/MPPOIType.ts +43 -0
  91. package/src/core/MPPoint.ts +169 -0
  92. package/src/core/MPPolygon.ts +219 -0
  93. package/src/core/MPPositionProviderInterface.ts +45 -0
  94. package/src/core/MPPositionResultInterface.ts +42 -0
  95. package/src/core/MPPropertyData.ts +234 -0
  96. package/src/core/MPQuery.ts +69 -0
  97. package/src/core/MPRoute.ts +105 -0
  98. package/src/core/MPRouteCoordinate.ts +95 -0
  99. package/src/core/MPRouteLeg.ts +158 -0
  100. package/src/core/MPRouteProperty.ts +83 -0
  101. package/src/core/MPRouteStep.ts +186 -0
  102. package/src/core/MPRouteStopIconConfig.ts +82 -0
  103. package/src/core/MPSelectionBehavior.ts +114 -0
  104. package/src/core/MPSelectionMode.ts +4 -0
  105. package/src/core/MPSettings3D.ts +107 -0
  106. package/src/core/MPSize.ts +21 -0
  107. package/src/core/MPSolution.ts +189 -0
  108. package/src/core/MPSolutionConfig.ts +188 -0
  109. package/src/core/MPSolutionDisplayRule.ts +15 -0
  110. package/src/core/MPUserRole.ts +60 -0
  111. package/src/core/MPUserRoleCollection.ts +37 -0
  112. package/src/core/MPUtils.ts +178 -0
  113. package/src/core/MPVenue.ts +294 -0
  114. package/src/core/MPVenueCollection.ts +58 -0
  115. package/src/core/MPVenueInfo.ts +62 -0
  116. package/src/core/MPWeeklyOpeningHours.ts +129 -0
  117. package/src/core/MapControl.ts +961 -0
  118. package/src/core/MapView.tsx +34 -0
  119. package/src/core/MapsIndoors.ts +571 -0
  120. package/src/core/OnBuildingFoundAtCameraTargetListener.ts +17 -0
  121. package/src/core/OnFloorSelectionChangedListener.ts +17 -0
  122. package/src/core/OnFloorUpdateListener.ts +16 -0
  123. package/src/core/OnLegSelectedListener.ts +17 -0
  124. package/src/core/OnLiveLocationUpdateListener.ts +17 -0
  125. package/src/core/OnLocationSelectedListener.ts +17 -0
  126. package/src/core/OnMapClickListener.ts +20 -0
  127. package/src/core/OnMarkerClickListener.ts +17 -0
  128. package/src/core/OnMarkerInfoWindowClickListener.ts +17 -0
  129. package/src/core/OnPositionUpdateListener.ts +17 -0
  130. package/src/core/OnVenueFoundAtCameraTargetListener.ts +17 -0
  131. package/src/core/README.md +3 -0
  132. package/src/core/RouteStopIconConfig.ts +10 -0
@@ -0,0 +1,77 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import com.google.gson.annotations.SerializedName;
4
+ import com.mapsindoors.core.MPFilter;
5
+ import com.mapsindoors.core.MPMapExtend;
6
+ import com.mapsindoors.core.models.MPLatLngBounds;
7
+
8
+ import java.util.List;
9
+
10
+ public class Filter {
11
+ @SerializedName("take")
12
+ private Integer mTake;
13
+ @SerializedName("skip")
14
+ private Integer mSkip;
15
+ @SerializedName("depth")
16
+ private Integer mDepth;
17
+ @SerializedName("floorIndex")
18
+ private Integer mFloorIndex;
19
+ @SerializedName("categories")
20
+ private List<String> mCategories;
21
+ @SerializedName("locations")
22
+ private List<String> mLocations;
23
+ @SerializedName("types")
24
+ private List<String> mTypes;
25
+ @SerializedName("parents")
26
+ private List<String> mParents;
27
+ @SerializedName("mapExtend")
28
+ private Bounds mMapExtend;
29
+ @SerializedName("geometry")
30
+ private Bounds mGeometry;
31
+ @SerializedName("ignoreSearchableStatus")
32
+ private Boolean mIgnoreSearchableStatus;
33
+ @SerializedName("ignoreActiveStatus")
34
+ private Boolean mIgnoreActiveStatus;
35
+
36
+ public MPFilter toMPFilter() {
37
+ MPFilter.Builder builder = new MPFilter.Builder();
38
+ if (mTake != null) {
39
+ builder.setTake(mTake);
40
+ }
41
+ if (mSkip != null) {
42
+ builder.setSkip(mSkip);
43
+ }
44
+ if (mDepth != null) {
45
+ builder.setDepth(mDepth);
46
+ }
47
+ if (mFloorIndex != null) {
48
+ builder.setFloorIndex(mFloorIndex);
49
+ }
50
+ if (mCategories != null) {
51
+ builder.setCategories(mCategories);
52
+ }
53
+ if (mLocations != null) {
54
+ builder.setLocations(mLocations);
55
+ }
56
+ if (mTypes != null) {
57
+ builder.setTypes(mTypes);
58
+ }
59
+ if (mParents != null) {
60
+ builder.setParents(mParents);
61
+ }
62
+ if (mMapExtend != null) {
63
+ builder.setMapExtend(new MPMapExtend(mMapExtend.getSouthWest().getLatLng(), mMapExtend.getNorthEast().getLatLng()));
64
+ }
65
+ if (mGeometry != null) {
66
+ MPLatLngBounds bounds = new MPLatLngBounds(mGeometry.getSouthWest().getLatLng(), mGeometry.getNorthEast().getLatLng());
67
+ builder.setGeometry(new MPFilter.Geometry(bounds.getCenter().getLat(), bounds.getCenter().getLng(), new MPMapExtend(bounds)));
68
+ }
69
+ if (mIgnoreSearchableStatus != null) {
70
+ builder.setIgnoreLocationSearchableStatus(mIgnoreSearchableStatus);
71
+ }
72
+ if (mIgnoreActiveStatus != null) {
73
+ builder.setIgnoreLocationActiveStatus(mIgnoreActiveStatus);
74
+ }
75
+ return builder.build();
76
+ }
77
+ }
@@ -0,0 +1,17 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import androidx.annotation.Nullable;
4
+
5
+ import com.google.gson.annotations.SerializedName;
6
+ import com.mapsindoors.core.MPLocation;
7
+ import com.mapsindoors.core.MapsIndoors;
8
+
9
+ public class Location {
10
+ @SerializedName("id")
11
+ String id;
12
+
13
+ @Nullable
14
+ public MPLocation toMPLocation() {
15
+ return MapsIndoors.getLocationById(id);
16
+ }
17
+ }
@@ -0,0 +1,34 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import androidx.annotation.NonNull;
4
+ import com.google.gson.annotations.SerializedName;
5
+ import com.mapsindoors.core.MPPoint;
6
+
7
+ import javax.annotation.Nullable;
8
+
9
+ public class MPCameraPosition {
10
+ @SerializedName("zoom")
11
+ @Nullable
12
+ public
13
+ Float zoom;
14
+ @SerializedName("tilt")
15
+ @Nullable
16
+ public
17
+ Float tilt;
18
+ @SerializedName("bearing")
19
+ @Nullable
20
+ public
21
+ Float bearing;
22
+ @SerializedName("target")
23
+ @NonNull
24
+ public
25
+ MPPoint target;
26
+
27
+ public MPCameraPosition(float zoom, float tilt, float bearing, MPPoint target) {
28
+ this.zoom = zoom;
29
+ this.tilt = tilt;
30
+ this.bearing = bearing;
31
+ this.target = target;
32
+ }
33
+
34
+ }
@@ -0,0 +1,68 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import com.google.gson.annotations.SerializedName;
4
+ import com.mapsindoors.core.MPPoint;
5
+
6
+ public class MPCameraUpdate {
7
+ @SerializedName("mode")
8
+ String modeString;
9
+ @SerializedName("point")
10
+ public
11
+ MPPoint point;
12
+ @SerializedName("bounds")
13
+ public
14
+ Bounds bounds;
15
+ @SerializedName("padding")
16
+ public
17
+ Integer padding;
18
+ @SerializedName("width")
19
+ public
20
+ Integer width;
21
+ @SerializedName("height")
22
+ public
23
+ Integer height;
24
+ @SerializedName("zoom")
25
+ public
26
+ Float zoom;
27
+ @SerializedName("position")
28
+ public
29
+ MPCameraPosition position;
30
+
31
+
32
+ public CameraUpdateMode getMode() {
33
+ return CameraUpdateMode.fromString(modeString);
34
+ }
35
+
36
+ /*
37
+ */
38
+
39
+ public enum CameraUpdateMode {
40
+ FROM_POINT("fromPoint"),
41
+ FROM_BOUNDS("fromBounds"),
42
+ ZOOM_BY("zoomBy"),
43
+ ZOOM_TO("zoomTo"),
44
+ FROM_CAMERA_POSITION("fromCameraPosition");
45
+ final String mode;
46
+ CameraUpdateMode(String mode) {
47
+ this.mode = mode;
48
+ }
49
+
50
+ public static CameraUpdateMode fromString(String value) {
51
+ switch (value) {
52
+ case "fromPoint":
53
+ return FROM_POINT;
54
+ case "fromBounds":
55
+ return FROM_BOUNDS;
56
+ case "zoomBy":
57
+ return ZOOM_BY;
58
+ case "zoomTo":
59
+ return ZOOM_TO;
60
+ case "fromCameraPosition":
61
+ return FROM_CAMERA_POSITION;
62
+ default:
63
+ return null;
64
+ }
65
+ }
66
+
67
+ }
68
+ }
@@ -0,0 +1,38 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import androidx.annotation.NonNull;
4
+ import androidx.annotation.Nullable;
5
+
6
+ import com.google.gson.annotations.SerializedName;
7
+ import com.mapsindoors.core.errors.MIError;
8
+
9
+ public class MPError {
10
+ @NonNull
11
+ @SerializedName("code")
12
+ private final Integer mCode;
13
+ @NonNull
14
+ @SerializedName("message")
15
+ private final String mMessage;
16
+ @Nullable
17
+ @SerializedName("status")
18
+ private final Integer mStatus;
19
+ @Nullable
20
+ @SerializedName("tag")
21
+ private final Object mTag;
22
+
23
+ MPError(int code, @NonNull String message, @Nullable Integer status, @Nullable Object tag) {
24
+ mCode = code;
25
+ mMessage = message;
26
+ mStatus = status;
27
+ mTag = tag;
28
+ }
29
+
30
+ @Nullable
31
+ public static MPError fromMIError(@Nullable MIError miError) {
32
+ if (miError != null) {
33
+ return new MPError(miError.code, miError.message, miError.status, miError.tag);
34
+ } else {
35
+ return null;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,46 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import androidx.annotation.NonNull;
4
+ import androidx.annotation.Nullable;
5
+
6
+ import com.mapsindoors.core.MPPositionProvider;
7
+ import com.mapsindoors.core.MPPositionResultInterface;
8
+ import com.mapsindoors.core.OnPositionUpdateListener;
9
+
10
+ import java.util.ArrayList;
11
+ import java.util.List;
12
+
13
+ public class PositionProvider implements MPPositionProvider {
14
+ private String mName;
15
+ private List<OnPositionUpdateListener> onPositionUpdateListeners;
16
+ private MPPositionResultInterface latest;
17
+
18
+ public PositionProvider(String name) {
19
+ mName = name;
20
+ onPositionUpdateListeners = new ArrayList<>();
21
+ }
22
+
23
+
24
+ @Override
25
+ public void addOnPositionUpdateListener(@NonNull OnPositionUpdateListener onPositionUpdateListener) {
26
+ onPositionUpdateListeners.add(onPositionUpdateListener);
27
+ }
28
+
29
+ @Override
30
+ public void removeOnPositionUpdateListener(@NonNull OnPositionUpdateListener onPositionUpdateListener) {
31
+ onPositionUpdateListeners.remove(onPositionUpdateListener);
32
+ }
33
+
34
+ @Nullable
35
+ @Override
36
+ public MPPositionResultInterface getLatestPosition() {
37
+ return latest;
38
+ }
39
+
40
+ public void updatePosition(@Nullable MPPositionResultInterface position) {
41
+ latest = position;
42
+ for (OnPositionUpdateListener onPositionUpdateListener : onPositionUpdateListeners) {
43
+ onPositionUpdateListener.onPositionUpdate(position);
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,117 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import android.location.Location;
4
+
5
+ import androidx.annotation.Nullable;
6
+
7
+ import com.google.gson.annotations.SerializedName;
8
+ import com.mapsindoors.core.MPPoint;
9
+ import com.mapsindoors.core.MPPositionProvider;
10
+ import com.mapsindoors.core.MPPositionResultInterface;
11
+
12
+ public class PositionResult implements MPPositionResultInterface {
13
+ @SerializedName("point")
14
+ private MPPoint mPoint;
15
+ @SerializedName("floorIndex")
16
+ private Integer mFloorIndex;
17
+ @SerializedName("bearing")
18
+ private Float mBearing;
19
+ @SerializedName("accuracy")
20
+ private Float mAccuracy;
21
+ @SerializedName("providerName")
22
+ private String mProviderName;
23
+
24
+ @Nullable
25
+ @Override
26
+ public MPPoint getPoint() {
27
+ return mPoint;
28
+ }
29
+
30
+ @Override
31
+ public boolean hasFloor() {
32
+ return mFloorIndex != null;
33
+ }
34
+
35
+ @Override
36
+ public int getFloorIndex() {
37
+ if (hasFloor()) {
38
+ return mFloorIndex;
39
+ }else {
40
+ return 0;
41
+ }
42
+ }
43
+
44
+ @Override
45
+ public void setFloorIndex(int i) {
46
+ mFloorIndex = i;
47
+ }
48
+
49
+ @Override
50
+ public boolean hasBearing() {
51
+ return mBearing != null;
52
+ }
53
+
54
+ @Override
55
+ public float getBearing() {
56
+ if (mBearing != null) {
57
+ return mBearing;
58
+ }else {
59
+ return 0;
60
+ }
61
+ }
62
+
63
+ @Override
64
+ public void setBearing(float v) {
65
+ mBearing = v;
66
+ }
67
+
68
+ @Override
69
+ public boolean hasAccuracy() {
70
+ return mAccuracy != null;
71
+ }
72
+
73
+ @Override
74
+ public float getAccuracy() {
75
+ if (mAccuracy != null) {
76
+ return mAccuracy;
77
+ }else {
78
+ return 0;
79
+ }
80
+ }
81
+
82
+ @Override
83
+ public void setAccuracy(float v) {
84
+ mAccuracy = v;
85
+ }
86
+
87
+ @Nullable
88
+ @Override
89
+ public MPPositionProvider getProvider() {
90
+ return null;
91
+ }
92
+
93
+ @Override
94
+ public void setProvider(@Nullable MPPositionProvider mpPositionProvider) {
95
+ //Unimplemented
96
+ }
97
+
98
+ @Nullable
99
+ @Override
100
+ public Location getAndroidLocation() {
101
+ if (mPoint != null) {
102
+ Location location = new Location(mProviderName);
103
+ location.setBearing(mBearing);
104
+ location.setAccuracy(mAccuracy);
105
+ location.setLatitude(mPoint.getLat());
106
+ location.setLongitude(mPoint.getLng());
107
+ return location;
108
+ }else {
109
+ return null;
110
+ }
111
+ }
112
+
113
+ @Override
114
+ public void setAndroidLocation(@Nullable Location location) {
115
+ //unimplemented
116
+ }
117
+ }
@@ -0,0 +1,30 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import com.google.gson.annotations.SerializedName;
4
+ import com.mapsindoors.core.MPPoint;
5
+ import com.mapsindoors.core.MPQuery;
6
+
7
+ import java.util.List;
8
+
9
+ public class Query {
10
+ @SerializedName("query")
11
+ private String mQuery;
12
+ @SerializedName("near")
13
+ private MPPoint mNear;
14
+ @SerializedName("queryProperties")
15
+ private List<String> mQueryProperties;
16
+
17
+ public MPQuery toMPQuery() {
18
+ MPQuery.Builder builder = new MPQuery.Builder();
19
+ if (mQuery != null) {
20
+ builder.setQuery(mQuery);
21
+ }
22
+ if (mNear != null) {
23
+ builder.setNear(mNear);
24
+ }
25
+ if (mQueryProperties != null) {
26
+ builder.setQueryProperties(mQueryProperties);
27
+ }
28
+ return builder.build();
29
+ }
30
+ }
@@ -0,0 +1,35 @@
1
+ package com.mapsindoorsrn.core.models;
2
+
3
+ import android.content.Context;
4
+ import android.graphics.Color;
5
+
6
+ import androidx.annotation.Nullable;
7
+
8
+ import com.google.gson.annotations.SerializedName;
9
+ import com.mapsindoors.core.MPRouteStopIconConfig;
10
+
11
+ public class RouteStopIconConfigModel {
12
+ @Nullable
13
+ @SerializedName("numbered")
14
+ private Boolean numbered;
15
+ @Nullable
16
+ @SerializedName("color")
17
+ private String color;
18
+ @Nullable
19
+ @SerializedName("label")
20
+ private String label;
21
+
22
+ public MPRouteStopIconConfig toMPRouteStopIconConfig(Context context) {
23
+ MPRouteStopIconConfig.Builder builder = new MPRouteStopIconConfig.Builder(context);
24
+ if (numbered != null) {
25
+ builder.setNumbered(numbered);
26
+ }
27
+ if (color != null) {
28
+ builder.setColor(Color.parseColor(color));
29
+ }
30
+ if (label != null) {
31
+ builder.setLabel(label);
32
+ }
33
+ return builder.build();
34
+ }
35
+ }
@@ -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
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
+ }
@@ -0,0 +1,11 @@
1
+ //
2
+ // CameraUpdateError.swift
3
+ // react-native-maps-indoors-mapbox
4
+ //
5
+ // Created by Tim Mikkelsen on 14/06/2023.
6
+ //
7
+
8
+ public enum CameraUpdateError: Error {
9
+ case missingField(String, String)
10
+ case unknownMode(String)
11
+ }
@@ -0,0 +1,59 @@
1
+ //
2
+ // DirectionsRendererBridge.m
3
+ // react-native-maps-indoors
4
+ //
5
+ // Created by Tim Mikkelsen on 01/05/2023.
6
+ //
7
+
8
+ #import <React/RCTBridgeModule.h>
9
+ #import <React/RCTEventEmitter.h>
10
+
11
+ @interface RCT_EXTERN_MODULE(DirectionsRenderer, RCTEventEmitter)
12
+
13
+ RCT_EXTERN_METHOD(clear: (RCTPromiseResolveBlock) resolve
14
+ rejecter:(RCTPromiseRejectBlock) reject)
15
+
16
+ RCT_EXTERN_METHOD(getSelectedLegFloorIndex: (RCTPromiseResolveBlock) resolve
17
+ rejecter:(RCTPromiseRejectBlock) reject)
18
+
19
+ RCT_EXTERN_METHOD(nextLeg: (RCTPromiseResolveBlock) resolve
20
+ rejecter:(RCTPromiseRejectBlock) reject)
21
+
22
+ RCT_EXTERN_METHOD(previousLeg: (RCTPromiseResolveBlock) resolve
23
+ rejecter:(RCTPromiseRejectBlock) reject)
24
+
25
+ RCT_EXTERN_METHOD(selectLegIndex: (nonnull NSNumber *) legIndex
26
+ resolver:(RCTPromiseResolveBlock) resolve
27
+ rejecter:(RCTPromiseRejectBlock) reject)
28
+
29
+ RCT_EXTERN_METHOD(setCameraViewFitMode: (nonnull NSNumber *) cameraFitMode
30
+ resolver:(RCTPromiseResolveBlock) resolve
31
+ rejecter:(RCTPromiseRejectBlock) reject)
32
+
33
+ RCT_EXTERN_METHOD(setCameraAnimationDuration: (nonnull NSNumber *) duration
34
+ resolver:(RCTPromiseResolveBlock) resolve
35
+ rejecter:(RCTPromiseRejectBlock) reject)
36
+
37
+ RCT_EXTERN_METHOD(setOnLegSelectedListener: (RCTPromiseResolveBlock) resolve
38
+ rejecter:(RCTPromiseRejectBlock) reject)
39
+
40
+ RCT_EXTERN_METHOD(setRoute: (NSString *) routeString
41
+ stopIcons:(NSString *) stopIcons
42
+ legIndex: (nonnull NSNumber *) legIndex
43
+ resolver:(RCTPromiseResolveBlock) resolve
44
+ rejecter:(RCTPromiseRejectBlock) reject)
45
+
46
+ RCT_EXTERN_METHOD(setAnimatedPolyline: (BOOL) animated
47
+ repeated:(BOOL) repeated
48
+ duration:(nonnull NSNumber *) duration
49
+ resolver:(RCTPromiseResolveBlock) resolve
50
+ rejecter:(RCTPromiseRejectBlock) reject)
51
+
52
+ RCT_EXTERN_METHOD(showRouteLegButtons: (BOOL) value
53
+ resolver:(RCTPromiseResolveBlock) resolve
54
+ rejecter:(RCTPromiseRejectBlock) reject)
55
+
56
+ RCT_EXTERN_METHOD(setDefaultRouteStopIcon: (NSString *) iconString
57
+ resolver:(RCTPromiseResolveBlock) resolve
58
+ rejecter:(RCTPromiseRejectBlock) reject)
59
+ @end