react-native-map4d-map-dtqg 0.1.3 → 0.1.4
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/LICENSE +21 -21
- package/README.md +133 -133
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +60 -60
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -87
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -298
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -35
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -167
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -121
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -105
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +121 -121
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -502
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -143
- package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +17 -17
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -1172
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +231 -231
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -412
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +211 -211
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -222
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -119
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +172 -172
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +147 -147
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -146
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +137 -137
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -95
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +64 -64
- package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -70
- package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -9
- package/ios/Map4dMap.h +7 -7
- package/ios/Map4dMap.m +14 -14
- package/ios/Map4dMapViewManager.m +34 -34
- package/ios/RCTConvert+Map4dMap.h +33 -33
- package/ios/RCTConvert+Map4dMap.m +112 -112
- package/ios/RMFCircle.h +37 -37
- package/ios/RMFCircle.m +100 -100
- package/ios/RMFCircleManager.h +18 -18
- package/ios/RMFCircleManager.m +155 -155
- package/ios/RMFCircleMap4d.h +23 -23
- package/ios/RMFCircleMap4d.m +13 -13
- package/ios/RMFCoordinate.h +22 -22
- package/ios/RMFCoordinate.m +13 -13
- package/ios/RMFDirectionsMarkerOptions.h +24 -24
- package/ios/RMFDirectionsMarkerOptions.m +23 -23
- package/ios/RMFDirectionsRenderer.h +47 -47
- package/ios/RMFDirectionsRenderer.m +182 -182
- package/ios/RMFDirectionsRendererManager.h +17 -17
- package/ios/RMFDirectionsRendererManager.m +84 -84
- package/ios/RMFDirectionsRendererMap4d.h +21 -21
- package/ios/RMFDirectionsRendererMap4d.m +12 -12
- package/ios/RMFDummyView.h +6 -6
- package/ios/RMFDummyView.m +12 -12
- package/ios/RMFEventResponse.h +39 -39
- package/ios/RMFEventResponse.m +98 -98
- package/ios/RMFIcon.h +24 -24
- package/ios/RMFIcon.m +35 -35
- package/ios/RMFMapView.h +84 -84
- package/ios/RMFMapView.m +376 -376
- package/ios/RMFMapViewManager.h +17 -17
- package/ios/RMFMapViewManager.m +509 -509
- package/ios/RMFMarker.h +57 -57
- package/ios/RMFMarker.m +267 -267
- package/ios/RMFMarkerManager.h +17 -17
- package/ios/RMFMarkerManager.m +156 -156
- package/ios/RMFMarkerMap4d.h +19 -19
- package/ios/RMFMarkerMap4d.m +13 -13
- package/ios/RMFPOI.h +38 -38
- package/ios/RMFPOI.m +123 -123
- package/ios/RMFPOIManager.h +18 -18
- package/ios/RMFPOIManager.m +168 -168
- package/ios/RMFPOIMap4d.h +22 -22
- package/ios/RMFPOIMap4d.m +12 -12
- package/ios/RMFPolygon.h +41 -41
- package/ios/RMFPolygon.m +106 -106
- package/ios/RMFPolygonManager.h +18 -18
- package/ios/RMFPolygonManager.m +141 -141
- package/ios/RMFPolygonMap4d.h +23 -23
- package/ios/RMFPolygonMap4d.m +15 -15
- package/ios/RMFPolyline.h +38 -38
- package/ios/RMFPolyline.m +101 -101
- package/ios/RMFPolylineManager.h +18 -18
- package/ios/RMFPolylineManager.m +139 -139
- package/ios/RMFPolylineMap4d.h +22 -22
- package/ios/RMFPolylineMap4d.m +15 -15
- package/ios/building/RMFBuilding.h +41 -41
- package/ios/building/RMFBuilding.m +104 -104
- package/ios/building/RMFBuildingManager.h +19 -19
- package/ios/building/RMFBuildingManager.m +133 -133
- package/ios/building/RMFBuildingMap4d.h +23 -23
- package/ios/building/RMFBuildingMap4d.m +15 -15
- package/ios/overlays/RMFTileOverlay.h +36 -36
- package/ios/overlays/RMFTileOverlay.m +64 -64
- package/ios/overlays/RMFTileOverlayManager.h +17 -17
- package/ios/overlays/RMFTileOverlayManager.m +27 -27
- package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
- package/lib/commonjs/components/MFBuilding.js +50 -32
- package/lib/commonjs/components/MFBuilding.js.map +1 -1
- package/lib/commonjs/components/MFCircle.js +44 -26
- package/lib/commonjs/components/MFCircle.js.map +1 -1
- package/lib/commonjs/components/MFDirectionsRenderer.js +56 -38
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/commonjs/components/MFMapView.js +91 -74
- package/lib/commonjs/components/MFMapView.js.map +1 -1
- package/lib/commonjs/components/MFMarker.js +59 -41
- package/lib/commonjs/components/MFMarker.js.map +1 -1
- package/lib/commonjs/components/MFPOI.js +44 -26
- package/lib/commonjs/components/MFPOI.js.map +1 -1
- package/lib/commonjs/components/MFPolygon.js +46 -28
- package/lib/commonjs/components/MFPolygon.js.map +1 -1
- package/lib/commonjs/components/MFPolyline.js +42 -24
- package/lib/commonjs/components/MFPolyline.js.map +1 -1
- package/lib/commonjs/components/MFTileOverlay.js +9 -9
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
- package/lib/commonjs/components/Map4dMapView.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocusManager.js +16 -16
- package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocuser.js +2 -2
- package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
- package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js +18 -18
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/MFBanDoSo.js.map +1 -1
- package/lib/module/components/MFBuilding.js +51 -33
- package/lib/module/components/MFBuilding.js.map +1 -1
- package/lib/module/components/MFCircle.js +45 -27
- package/lib/module/components/MFCircle.js.map +1 -1
- package/lib/module/components/MFDirectionsRenderer.js +57 -39
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/module/components/MFMapView.js +92 -75
- package/lib/module/components/MFMapView.js.map +1 -1
- package/lib/module/components/MFMarker.js +60 -42
- package/lib/module/components/MFMarker.js.map +1 -1
- package/lib/module/components/MFPOI.js +45 -27
- package/lib/module/components/MFPOI.js.map +1 -1
- package/lib/module/components/MFPolygon.js +47 -29
- package/lib/module/components/MFPolygon.js.map +1 -1
- package/lib/module/components/MFPolyline.js +43 -25
- package/lib/module/components/MFPolyline.js.map +1 -1
- package/lib/module/components/MFTileOverlay.js +9 -9
- package/lib/module/components/MFTileOverlay.js.map +1 -1
- package/lib/module/components/Map4dMapView.js.map +1 -1
- package/lib/module/components/extends/AreaFocusManager.js +16 -16
- package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/module/components/extends/AreaFocuser.js +2 -2
- package/lib/module/components/extends/AreaFocuser.js.map +1 -1
- package/lib/module/components/extends/BoundHelper.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusTypes.js +18 -18
- package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/components/Map4dMapView.d.ts +7 -7
- package/package.json +152 -152
- package/react-native-map4d-map.podspec +20 -20
- package/src/components/MFBanDoSo.js +124 -124
- package/src/components/MFBuilding.js +200 -187
- package/src/components/MFCircle.js +186 -173
- package/src/components/MFDirectionsRenderer.js +250 -237
- package/src/components/MFMapView.js +480 -464
- package/src/components/MFMarker.js +259 -246
- package/src/components/MFPOI.js +197 -184
- package/src/components/MFPolygon.js +199 -186
- package/src/components/MFPolyline.js +185 -172
- package/src/components/MFTileOverlay.js +45 -45
- package/src/components/Map4dMapView.tsx +26 -26
- package/src/components/extends/AreaFocusManager.js +196 -196
- package/src/components/extends/AreaFocuser.js +61 -61
- package/src/components/extends/BoundHelper.js +31 -31
- package/src/components/extends/area/AreaFocusAreas.js +164 -164
- package/src/components/extends/area/AreaFocusGeometryUtils.js +164 -164
- package/src/components/extends/area/AreaFocusSession.js +100 -100
- package/src/components/extends/area/AreaFocusTypes.js +36 -36
- package/src/components/internal/DefaultRoadmapStyle.js +3365 -3365
- package/src/components/internal/GeojsonStyleUtils.js +143 -143
- package/src/index.js +25 -25
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFDirectionsRenderer.m
|
|
3
|
-
// Map4dMap React Native
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 11/15/21.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import "RMFDirectionsRenderer.h"
|
|
9
|
-
#import "RMFEventResponse.h"
|
|
10
|
-
|
|
11
|
-
@implementation RMFDirectionsRenderer
|
|
12
|
-
|
|
13
|
-
- (instancetype)init {
|
|
14
|
-
if (self = [super init]) {
|
|
15
|
-
_map4dDirectionsRenderer = [[RMFDirectionsRendererMap4d alloc] init];
|
|
16
|
-
_map4dDirectionsRenderer.reactRenderer = self;
|
|
17
|
-
|
|
18
|
-
_routes = nil;
|
|
19
|
-
_directions = nil;
|
|
20
|
-
|
|
21
|
-
_activedIndex = _map4dDirectionsRenderer.activedIndex;
|
|
22
|
-
|
|
23
|
-
_activeStrokeColor = _map4dDirectionsRenderer.activeStrokeColor;
|
|
24
|
-
_activeStrokeWidth = _map4dDirectionsRenderer.activeStrokeWidth;
|
|
25
|
-
_activeOutlineColor = _map4dDirectionsRenderer.activeOutlineColor;
|
|
26
|
-
_activeOutlineWidth = _map4dDirectionsRenderer.activeOutlineWidth;
|
|
27
|
-
|
|
28
|
-
_inactiveStrokeColor = _map4dDirectionsRenderer.inactiveStrokeColor;
|
|
29
|
-
_inactiveStrokeWidth = _map4dDirectionsRenderer.inactiveStrokeWidth;
|
|
30
|
-
_inactiveOutlineColor = _map4dDirectionsRenderer.inactiveOutlineColor;
|
|
31
|
-
_inactiveOutlineWidth = _map4dDirectionsRenderer.inactiveOutlineWidth;
|
|
32
|
-
|
|
33
|
-
_originPOIOptions = nil;
|
|
34
|
-
_destinationPOIOptions = nil;
|
|
35
|
-
}
|
|
36
|
-
return self;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
- (void)setMapView:(RMFMapView *)mapView {
|
|
40
|
-
_map4dDirectionsRenderer.activedIndex = _activedIndex;
|
|
41
|
-
_map4dDirectionsRenderer.map = (MFMapView*)mapView;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
- (void)didTapAtPixel:(CGPoint)pixel withRouteIndex:(NSInteger)routeIndex {
|
|
45
|
-
if (!self.onPress) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
CLLocationCoordinate2D tapLocation = [_map4dDirectionsRenderer.map.projection coordinateForPoint:pixel];
|
|
50
|
-
NSMutableDictionary* response = [NSMutableDictionary dictionaryWithDictionary:[RMFEventResponse fromCoordinate:tapLocation
|
|
51
|
-
pixel:pixel]];
|
|
52
|
-
response[@"routeIndex"] = @(routeIndex);
|
|
53
|
-
response[@"action"] = @"directions-press";
|
|
54
|
-
self.onPress(response);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
- (void)setRoutes:(NSArray<NSArray<RMFCoordinate *> *> *)routes {
|
|
58
|
-
_routes = routes;
|
|
59
|
-
NSMutableArray<MFPath*>* paths = [NSMutableArray arrayWithCapacity:routes.count];
|
|
60
|
-
for (int i = 0; i < routes.count; i++) {
|
|
61
|
-
NSArray<RMFCoordinate*>* route = [routes objectAtIndex:i];
|
|
62
|
-
MFMutablePath* path = [[MFMutablePath alloc] init];
|
|
63
|
-
for (int j = 0; j < route.count; j++) {
|
|
64
|
-
[path addCoordinate:route[j].coordinate];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
[paths addObject:path];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (paths.count > 0) {
|
|
71
|
-
_map4dDirectionsRenderer.routes = paths;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
_map4dDirectionsRenderer.routes = nil;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
- (void)setDirections:(NSString *)json {
|
|
79
|
-
_directions = json;
|
|
80
|
-
[_map4dDirectionsRenderer setRoutesWithJson:json];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
- (void)setActivedIndex:(NSUInteger)activedIndex {
|
|
84
|
-
_activedIndex = activedIndex;
|
|
85
|
-
_map4dDirectionsRenderer.activedIndex = activedIndex;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
- (void)setActiveStrokeColor:(UIColor *)color {
|
|
89
|
-
_activeStrokeColor = color;
|
|
90
|
-
_map4dDirectionsRenderer.activeStrokeColor = color;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
- (void)setActiveStrokeWidth:(CGFloat)width {
|
|
94
|
-
_activeStrokeWidth = width;
|
|
95
|
-
_map4dDirectionsRenderer.activeStrokeWidth = width;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
- (void)setActiveOutlineColor:(UIColor *)color {
|
|
99
|
-
_activeOutlineColor = color;
|
|
100
|
-
_map4dDirectionsRenderer.activeOutlineColor = color;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
- (void)setActiveOutlineWidth:(CGFloat)width {
|
|
104
|
-
_activeOutlineWidth = width;
|
|
105
|
-
_map4dDirectionsRenderer.activeOutlineWidth = width;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
- (void)setInactiveStrokeColor:(UIColor *)color {
|
|
109
|
-
_inactiveStrokeColor = color;
|
|
110
|
-
_map4dDirectionsRenderer.inactiveStrokeColor = color;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
- (void)setInactiveStrokeWidth:(CGFloat)width {
|
|
114
|
-
_inactiveStrokeWidth = width;
|
|
115
|
-
_map4dDirectionsRenderer.inactiveStrokeWidth = width;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
- (void)setInactiveOutlineColor:(UIColor *)color {
|
|
119
|
-
_inactiveOutlineColor = color;
|
|
120
|
-
_map4dDirectionsRenderer.inactiveOutlineColor = color;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
- (void)setInactiveOutlineWidth:(CGFloat)width {
|
|
124
|
-
_inactiveOutlineWidth = width;
|
|
125
|
-
_map4dDirectionsRenderer.inactiveOutlineWidth = width;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
- (void)setOriginPOIOptions:(RMFDirectionsMarkerOptions *)options {
|
|
129
|
-
_originPOIOptions = options;
|
|
130
|
-
|
|
131
|
-
_map4dDirectionsRenderer.hideOriginPOI = !options.visible;
|
|
132
|
-
_map4dDirectionsRenderer.originPosition = options.coordinate;
|
|
133
|
-
_map4dDirectionsRenderer.originTitle = options.title;
|
|
134
|
-
_map4dDirectionsRenderer.originTitleColor = options.titleColor;
|
|
135
|
-
|
|
136
|
-
if (options.icon == nil || options.icon.uri == nil) {
|
|
137
|
-
_map4dDirectionsRenderer.originIcon = nil;
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
dispatch_async(dispatch_get_global_queue(0,0), ^{
|
|
141
|
-
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: options.icon.uri]];
|
|
142
|
-
if (imageData != nil) {
|
|
143
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
144
|
-
UIImage* icon = [UIImage imageWithData:imageData];
|
|
145
|
-
UIImage* scaleIcon = [UIImage imageWithCGImage:[icon CGImage]
|
|
146
|
-
scale:[UIScreen mainScreen].scale
|
|
147
|
-
orientation:icon.imageOrientation];
|
|
148
|
-
self->_map4dDirectionsRenderer.originIcon = scaleIcon;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
- (void)setDestinationPOIOptions:(RMFDirectionsMarkerOptions *)options {
|
|
156
|
-
_destinationPOIOptions = options;
|
|
157
|
-
|
|
158
|
-
_map4dDirectionsRenderer.hideDestinationPOI = !options.visible;
|
|
159
|
-
_map4dDirectionsRenderer.destinationPosition = options.coordinate;
|
|
160
|
-
_map4dDirectionsRenderer.destinationTitle = options.title;
|
|
161
|
-
_map4dDirectionsRenderer.destinationTitleColor = options.titleColor;
|
|
162
|
-
|
|
163
|
-
if (options.icon == nil || options.icon.uri == nil) {
|
|
164
|
-
_map4dDirectionsRenderer.destinationIcon = nil;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
dispatch_async(dispatch_get_global_queue(0,0), ^{
|
|
168
|
-
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: options.icon.uri]];
|
|
169
|
-
if (imageData != nil) {
|
|
170
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
171
|
-
UIImage* icon = [UIImage imageWithData:imageData];
|
|
172
|
-
UIImage* scaleImage = [UIImage imageWithCGImage:[icon CGImage]
|
|
173
|
-
scale:[UIScreen mainScreen].scale
|
|
174
|
-
orientation:icon.imageOrientation];
|
|
175
|
-
self->_map4dDirectionsRenderer.destinationIcon = scaleImage;
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
@end
|
|
1
|
+
//
|
|
2
|
+
// RMFDirectionsRenderer.m
|
|
3
|
+
// Map4dMap React Native
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 11/15/21.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "RMFDirectionsRenderer.h"
|
|
9
|
+
#import "RMFEventResponse.h"
|
|
10
|
+
|
|
11
|
+
@implementation RMFDirectionsRenderer
|
|
12
|
+
|
|
13
|
+
- (instancetype)init {
|
|
14
|
+
if (self = [super init]) {
|
|
15
|
+
_map4dDirectionsRenderer = [[RMFDirectionsRendererMap4d alloc] init];
|
|
16
|
+
_map4dDirectionsRenderer.reactRenderer = self;
|
|
17
|
+
|
|
18
|
+
_routes = nil;
|
|
19
|
+
_directions = nil;
|
|
20
|
+
|
|
21
|
+
_activedIndex = _map4dDirectionsRenderer.activedIndex;
|
|
22
|
+
|
|
23
|
+
_activeStrokeColor = _map4dDirectionsRenderer.activeStrokeColor;
|
|
24
|
+
_activeStrokeWidth = _map4dDirectionsRenderer.activeStrokeWidth;
|
|
25
|
+
_activeOutlineColor = _map4dDirectionsRenderer.activeOutlineColor;
|
|
26
|
+
_activeOutlineWidth = _map4dDirectionsRenderer.activeOutlineWidth;
|
|
27
|
+
|
|
28
|
+
_inactiveStrokeColor = _map4dDirectionsRenderer.inactiveStrokeColor;
|
|
29
|
+
_inactiveStrokeWidth = _map4dDirectionsRenderer.inactiveStrokeWidth;
|
|
30
|
+
_inactiveOutlineColor = _map4dDirectionsRenderer.inactiveOutlineColor;
|
|
31
|
+
_inactiveOutlineWidth = _map4dDirectionsRenderer.inactiveOutlineWidth;
|
|
32
|
+
|
|
33
|
+
_originPOIOptions = nil;
|
|
34
|
+
_destinationPOIOptions = nil;
|
|
35
|
+
}
|
|
36
|
+
return self;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
- (void)setMapView:(RMFMapView *)mapView {
|
|
40
|
+
_map4dDirectionsRenderer.activedIndex = _activedIndex;
|
|
41
|
+
_map4dDirectionsRenderer.map = (MFMapView*)mapView;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
- (void)didTapAtPixel:(CGPoint)pixel withRouteIndex:(NSInteger)routeIndex {
|
|
45
|
+
if (!self.onPress) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
CLLocationCoordinate2D tapLocation = [_map4dDirectionsRenderer.map.projection coordinateForPoint:pixel];
|
|
50
|
+
NSMutableDictionary* response = [NSMutableDictionary dictionaryWithDictionary:[RMFEventResponse fromCoordinate:tapLocation
|
|
51
|
+
pixel:pixel]];
|
|
52
|
+
response[@"routeIndex"] = @(routeIndex);
|
|
53
|
+
response[@"action"] = @"directions-press";
|
|
54
|
+
self.onPress(response);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
- (void)setRoutes:(NSArray<NSArray<RMFCoordinate *> *> *)routes {
|
|
58
|
+
_routes = routes;
|
|
59
|
+
NSMutableArray<MFPath*>* paths = [NSMutableArray arrayWithCapacity:routes.count];
|
|
60
|
+
for (int i = 0; i < routes.count; i++) {
|
|
61
|
+
NSArray<RMFCoordinate*>* route = [routes objectAtIndex:i];
|
|
62
|
+
MFMutablePath* path = [[MFMutablePath alloc] init];
|
|
63
|
+
for (int j = 0; j < route.count; j++) {
|
|
64
|
+
[path addCoordinate:route[j].coordinate];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[paths addObject:path];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (paths.count > 0) {
|
|
71
|
+
_map4dDirectionsRenderer.routes = paths;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
_map4dDirectionsRenderer.routes = nil;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
- (void)setDirections:(NSString *)json {
|
|
79
|
+
_directions = json;
|
|
80
|
+
[_map4dDirectionsRenderer setRoutesWithJson:json];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
- (void)setActivedIndex:(NSUInteger)activedIndex {
|
|
84
|
+
_activedIndex = activedIndex;
|
|
85
|
+
_map4dDirectionsRenderer.activedIndex = activedIndex;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
- (void)setActiveStrokeColor:(UIColor *)color {
|
|
89
|
+
_activeStrokeColor = color;
|
|
90
|
+
_map4dDirectionsRenderer.activeStrokeColor = color;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
- (void)setActiveStrokeWidth:(CGFloat)width {
|
|
94
|
+
_activeStrokeWidth = width;
|
|
95
|
+
_map4dDirectionsRenderer.activeStrokeWidth = width;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
- (void)setActiveOutlineColor:(UIColor *)color {
|
|
99
|
+
_activeOutlineColor = color;
|
|
100
|
+
_map4dDirectionsRenderer.activeOutlineColor = color;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
- (void)setActiveOutlineWidth:(CGFloat)width {
|
|
104
|
+
_activeOutlineWidth = width;
|
|
105
|
+
_map4dDirectionsRenderer.activeOutlineWidth = width;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
- (void)setInactiveStrokeColor:(UIColor *)color {
|
|
109
|
+
_inactiveStrokeColor = color;
|
|
110
|
+
_map4dDirectionsRenderer.inactiveStrokeColor = color;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
- (void)setInactiveStrokeWidth:(CGFloat)width {
|
|
114
|
+
_inactiveStrokeWidth = width;
|
|
115
|
+
_map4dDirectionsRenderer.inactiveStrokeWidth = width;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
- (void)setInactiveOutlineColor:(UIColor *)color {
|
|
119
|
+
_inactiveOutlineColor = color;
|
|
120
|
+
_map4dDirectionsRenderer.inactiveOutlineColor = color;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
- (void)setInactiveOutlineWidth:(CGFloat)width {
|
|
124
|
+
_inactiveOutlineWidth = width;
|
|
125
|
+
_map4dDirectionsRenderer.inactiveOutlineWidth = width;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
- (void)setOriginPOIOptions:(RMFDirectionsMarkerOptions *)options {
|
|
129
|
+
_originPOIOptions = options;
|
|
130
|
+
|
|
131
|
+
_map4dDirectionsRenderer.hideOriginPOI = !options.visible;
|
|
132
|
+
_map4dDirectionsRenderer.originPosition = options.coordinate;
|
|
133
|
+
_map4dDirectionsRenderer.originTitle = options.title;
|
|
134
|
+
_map4dDirectionsRenderer.originTitleColor = options.titleColor;
|
|
135
|
+
|
|
136
|
+
if (options.icon == nil || options.icon.uri == nil) {
|
|
137
|
+
_map4dDirectionsRenderer.originIcon = nil;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
dispatch_async(dispatch_get_global_queue(0,0), ^{
|
|
141
|
+
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: options.icon.uri]];
|
|
142
|
+
if (imageData != nil) {
|
|
143
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
144
|
+
UIImage* icon = [UIImage imageWithData:imageData];
|
|
145
|
+
UIImage* scaleIcon = [UIImage imageWithCGImage:[icon CGImage]
|
|
146
|
+
scale:[UIScreen mainScreen].scale
|
|
147
|
+
orientation:icon.imageOrientation];
|
|
148
|
+
self->_map4dDirectionsRenderer.originIcon = scaleIcon;
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
- (void)setDestinationPOIOptions:(RMFDirectionsMarkerOptions *)options {
|
|
156
|
+
_destinationPOIOptions = options;
|
|
157
|
+
|
|
158
|
+
_map4dDirectionsRenderer.hideDestinationPOI = !options.visible;
|
|
159
|
+
_map4dDirectionsRenderer.destinationPosition = options.coordinate;
|
|
160
|
+
_map4dDirectionsRenderer.destinationTitle = options.title;
|
|
161
|
+
_map4dDirectionsRenderer.destinationTitleColor = options.titleColor;
|
|
162
|
+
|
|
163
|
+
if (options.icon == nil || options.icon.uri == nil) {
|
|
164
|
+
_map4dDirectionsRenderer.destinationIcon = nil;
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
dispatch_async(dispatch_get_global_queue(0,0), ^{
|
|
168
|
+
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: options.icon.uri]];
|
|
169
|
+
if (imageData != nil) {
|
|
170
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
171
|
+
UIImage* icon = [UIImage imageWithData:imageData];
|
|
172
|
+
UIImage* scaleImage = [UIImage imageWithCGImage:[icon CGImage]
|
|
173
|
+
scale:[UIScreen mainScreen].scale
|
|
174
|
+
orientation:icon.imageOrientation];
|
|
175
|
+
self->_map4dDirectionsRenderer.destinationIcon = scaleImage;
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@end
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFDirectionsRendererManager.h
|
|
3
|
-
// Map4dMap React Native
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 11/15/21.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#ifndef RMFDirectionsRendererManager_h
|
|
9
|
-
#define RMFDirectionsRendererManager_h
|
|
10
|
-
|
|
11
|
-
#import <React/RCTViewManager.h>
|
|
12
|
-
|
|
13
|
-
@interface RMFDirectionsRendererManager : RCTViewManager
|
|
14
|
-
|
|
15
|
-
@end
|
|
16
|
-
|
|
17
|
-
#endif /* RMFDirectionsRendererManager_h */
|
|
1
|
+
//
|
|
2
|
+
// RMFDirectionsRendererManager.h
|
|
3
|
+
// Map4dMap React Native
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 11/15/21.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef RMFDirectionsRendererManager_h
|
|
9
|
+
#define RMFDirectionsRendererManager_h
|
|
10
|
+
|
|
11
|
+
#import <React/RCTViewManager.h>
|
|
12
|
+
|
|
13
|
+
@interface RMFDirectionsRendererManager : RCTViewManager
|
|
14
|
+
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
#endif /* RMFDirectionsRendererManager_h */
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFDirectionsRendererManager.m
|
|
3
|
-
// Map4dMap React Native
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 11/15/21.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import "RMFDirectionsRendererManager.h"
|
|
9
|
-
#import "RMFDirectionsRenderer.h"
|
|
10
|
-
#import "RCTConvert+Map4dMap.h"
|
|
11
|
-
#import <React/RCTBridge.h>
|
|
12
|
-
#import <React/RCTUIManager.h>
|
|
13
|
-
|
|
14
|
-
@implementation RMFDirectionsRendererManager
|
|
15
|
-
|
|
16
|
-
RCT_EXPORT_MODULE(RMFDirectionsRenderer)
|
|
17
|
-
|
|
18
|
-
- (UIView*)view {
|
|
19
|
-
RMFDirectionsRenderer* renderer = [[RMFDirectionsRenderer alloc] init];
|
|
20
|
-
return renderer;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
RCT_EXPORT_VIEW_PROPERTY(routes, RMFCoordinateArrayArray)
|
|
24
|
-
RCT_EXPORT_VIEW_PROPERTY(directions, NSString)
|
|
25
|
-
RCT_EXPORT_VIEW_PROPERTY(activedIndex, NSUInteger)
|
|
26
|
-
|
|
27
|
-
RCT_EXPORT_VIEW_PROPERTY(activeStrokeWidth, CGFloat)
|
|
28
|
-
RCT_EXPORT_VIEW_PROPERTY(activeStrokeColor, UIColor)
|
|
29
|
-
RCT_EXPORT_VIEW_PROPERTY(activeOutlineWidth, CGFloat)
|
|
30
|
-
RCT_EXPORT_VIEW_PROPERTY(activeOutlineColor, UIColor)
|
|
31
|
-
|
|
32
|
-
RCT_EXPORT_VIEW_PROPERTY(inactiveStrokeWidth, CGFloat)
|
|
33
|
-
RCT_EXPORT_VIEW_PROPERTY(inactiveStrokeColor, UIColor)
|
|
34
|
-
RCT_EXPORT_VIEW_PROPERTY(inactiveOutlineWidth, CGFloat)
|
|
35
|
-
RCT_EXPORT_VIEW_PROPERTY(inactiveOutlineColor, UIColor)
|
|
36
|
-
|
|
37
|
-
RCT_EXPORT_VIEW_PROPERTY(originPOIOptions, RMFDirectionsMarkerOptions)
|
|
38
|
-
RCT_EXPORT_VIEW_PROPERTY(destinationPOIOptions, RMFDirectionsMarkerOptions)
|
|
39
|
-
|
|
40
|
-
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
41
|
-
|
|
42
|
-
RCT_EXPORT_METHOD(setActivedIndex:(nonnull NSNumber *)reactTag
|
|
43
|
-
withRouteIndex:(NSUInteger)routeIndex)
|
|
44
|
-
{
|
|
45
|
-
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
46
|
-
id view = viewRegistry[reactTag];
|
|
47
|
-
if (![view isKindOfClass:[RMFDirectionsRenderer class]]) {
|
|
48
|
-
RCTLogError(@"Invalid view returned from registry, expecting RMFCircle, got: %@", view);
|
|
49
|
-
} else {
|
|
50
|
-
RMFDirectionsRenderer* renderer = (RMFDirectionsRenderer*)view;
|
|
51
|
-
renderer.activedIndex = routeIndex;
|
|
52
|
-
}
|
|
53
|
-
}];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
RCT_EXPORT_METHOD(setRoutes:(nonnull NSNumber *)reactTag
|
|
57
|
-
withRoutes:(id)routes)
|
|
58
|
-
{
|
|
59
|
-
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
60
|
-
id view = viewRegistry[reactTag];
|
|
61
|
-
if (![view isKindOfClass:[RMFDirectionsRenderer class]]) {
|
|
62
|
-
RCTLogError(@"Invalid view returned from registry, expecting RMFPolygon, got: %@", view);
|
|
63
|
-
} else {
|
|
64
|
-
RMFDirectionsRenderer* renderer = (RMFDirectionsRenderer*)view;
|
|
65
|
-
[renderer setRoutes:[RCTConvert RMFCoordinateArrayArray:routes]];
|
|
66
|
-
}
|
|
67
|
-
}];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
RCT_EXPORT_METHOD(setDirections:(nonnull NSNumber *)reactTag
|
|
71
|
-
withDirections:(NSString*)directions)
|
|
72
|
-
{
|
|
73
|
-
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
74
|
-
id view = viewRegistry[reactTag];
|
|
75
|
-
if (![view isKindOfClass:[RMFDirectionsRenderer class]]) {
|
|
76
|
-
RCTLogError(@"Invalid view returned from registry, expecting RMFMarker, got: %@", view);
|
|
77
|
-
} else {
|
|
78
|
-
RMFDirectionsRenderer* renderer = (RMFDirectionsRenderer*)view;
|
|
79
|
-
[renderer.map4dDirectionsRenderer setRoutesWithJson:directions];
|
|
80
|
-
}
|
|
81
|
-
}];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@end
|
|
1
|
+
//
|
|
2
|
+
// RMFDirectionsRendererManager.m
|
|
3
|
+
// Map4dMap React Native
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 11/15/21.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "RMFDirectionsRendererManager.h"
|
|
9
|
+
#import "RMFDirectionsRenderer.h"
|
|
10
|
+
#import "RCTConvert+Map4dMap.h"
|
|
11
|
+
#import <React/RCTBridge.h>
|
|
12
|
+
#import <React/RCTUIManager.h>
|
|
13
|
+
|
|
14
|
+
@implementation RMFDirectionsRendererManager
|
|
15
|
+
|
|
16
|
+
RCT_EXPORT_MODULE(RMFDirectionsRenderer)
|
|
17
|
+
|
|
18
|
+
- (UIView*)view {
|
|
19
|
+
RMFDirectionsRenderer* renderer = [[RMFDirectionsRenderer alloc] init];
|
|
20
|
+
return renderer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
RCT_EXPORT_VIEW_PROPERTY(routes, RMFCoordinateArrayArray)
|
|
24
|
+
RCT_EXPORT_VIEW_PROPERTY(directions, NSString)
|
|
25
|
+
RCT_EXPORT_VIEW_PROPERTY(activedIndex, NSUInteger)
|
|
26
|
+
|
|
27
|
+
RCT_EXPORT_VIEW_PROPERTY(activeStrokeWidth, CGFloat)
|
|
28
|
+
RCT_EXPORT_VIEW_PROPERTY(activeStrokeColor, UIColor)
|
|
29
|
+
RCT_EXPORT_VIEW_PROPERTY(activeOutlineWidth, CGFloat)
|
|
30
|
+
RCT_EXPORT_VIEW_PROPERTY(activeOutlineColor, UIColor)
|
|
31
|
+
|
|
32
|
+
RCT_EXPORT_VIEW_PROPERTY(inactiveStrokeWidth, CGFloat)
|
|
33
|
+
RCT_EXPORT_VIEW_PROPERTY(inactiveStrokeColor, UIColor)
|
|
34
|
+
RCT_EXPORT_VIEW_PROPERTY(inactiveOutlineWidth, CGFloat)
|
|
35
|
+
RCT_EXPORT_VIEW_PROPERTY(inactiveOutlineColor, UIColor)
|
|
36
|
+
|
|
37
|
+
RCT_EXPORT_VIEW_PROPERTY(originPOIOptions, RMFDirectionsMarkerOptions)
|
|
38
|
+
RCT_EXPORT_VIEW_PROPERTY(destinationPOIOptions, RMFDirectionsMarkerOptions)
|
|
39
|
+
|
|
40
|
+
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
41
|
+
|
|
42
|
+
RCT_EXPORT_METHOD(setActivedIndex:(nonnull NSNumber *)reactTag
|
|
43
|
+
withRouteIndex:(NSUInteger)routeIndex)
|
|
44
|
+
{
|
|
45
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
46
|
+
id view = viewRegistry[reactTag];
|
|
47
|
+
if (![view isKindOfClass:[RMFDirectionsRenderer class]]) {
|
|
48
|
+
RCTLogError(@"Invalid view returned from registry, expecting RMFCircle, got: %@", view);
|
|
49
|
+
} else {
|
|
50
|
+
RMFDirectionsRenderer* renderer = (RMFDirectionsRenderer*)view;
|
|
51
|
+
renderer.activedIndex = routeIndex;
|
|
52
|
+
}
|
|
53
|
+
}];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
RCT_EXPORT_METHOD(setRoutes:(nonnull NSNumber *)reactTag
|
|
57
|
+
withRoutes:(id)routes)
|
|
58
|
+
{
|
|
59
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
60
|
+
id view = viewRegistry[reactTag];
|
|
61
|
+
if (![view isKindOfClass:[RMFDirectionsRenderer class]]) {
|
|
62
|
+
RCTLogError(@"Invalid view returned from registry, expecting RMFPolygon, got: %@", view);
|
|
63
|
+
} else {
|
|
64
|
+
RMFDirectionsRenderer* renderer = (RMFDirectionsRenderer*)view;
|
|
65
|
+
[renderer setRoutes:[RCTConvert RMFCoordinateArrayArray:routes]];
|
|
66
|
+
}
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
RCT_EXPORT_METHOD(setDirections:(nonnull NSNumber *)reactTag
|
|
71
|
+
withDirections:(NSString*)directions)
|
|
72
|
+
{
|
|
73
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
74
|
+
id view = viewRegistry[reactTag];
|
|
75
|
+
if (![view isKindOfClass:[RMFDirectionsRenderer class]]) {
|
|
76
|
+
RCTLogError(@"Invalid view returned from registry, expecting RMFMarker, got: %@", view);
|
|
77
|
+
} else {
|
|
78
|
+
RMFDirectionsRenderer* renderer = (RMFDirectionsRenderer*)view;
|
|
79
|
+
[renderer.map4dDirectionsRenderer setRoutesWithJson:directions];
|
|
80
|
+
}
|
|
81
|
+
}];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@end
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFDirectionsRendererMap4d.h
|
|
3
|
-
// Map4dMap React Native
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 11/15/21.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#ifndef RMFDirectionsRendererMap4d_h
|
|
9
|
-
#define RMFDirectionsRendererMap4d_h
|
|
10
|
-
|
|
11
|
-
#import <Map4dMap/Map4dMap.h>
|
|
12
|
-
|
|
13
|
-
@class RMFDirectionsRenderer;
|
|
14
|
-
|
|
15
|
-
@interface RMFDirectionsRendererMap4d : MFDirectionsRenderer
|
|
16
|
-
|
|
17
|
-
@property (nonatomic, weak) RMFDirectionsRenderer* reactRenderer;
|
|
18
|
-
|
|
19
|
-
@end
|
|
20
|
-
|
|
21
|
-
#endif /* RMFDirectionsRendererMap4d_h */
|
|
1
|
+
//
|
|
2
|
+
// RMFDirectionsRendererMap4d.h
|
|
3
|
+
// Map4dMap React Native
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 11/15/21.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef RMFDirectionsRendererMap4d_h
|
|
9
|
+
#define RMFDirectionsRendererMap4d_h
|
|
10
|
+
|
|
11
|
+
#import <Map4dMap/Map4dMap.h>
|
|
12
|
+
|
|
13
|
+
@class RMFDirectionsRenderer;
|
|
14
|
+
|
|
15
|
+
@interface RMFDirectionsRendererMap4d : MFDirectionsRenderer
|
|
16
|
+
|
|
17
|
+
@property (nonatomic, weak) RMFDirectionsRenderer* reactRenderer;
|
|
18
|
+
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
#endif /* RMFDirectionsRendererMap4d_h */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFDirectionsRendererMap4d.m
|
|
3
|
-
// Map4dMap React Native
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 11/15/21.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import "RMFDirectionsRendererMap4d.h"
|
|
9
|
-
|
|
10
|
-
@implementation RMFDirectionsRendererMap4d
|
|
11
|
-
|
|
12
|
-
@end
|
|
1
|
+
//
|
|
2
|
+
// RMFDirectionsRendererMap4d.m
|
|
3
|
+
// Map4dMap React Native
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 11/15/21.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "RMFDirectionsRendererMap4d.h"
|
|
9
|
+
|
|
10
|
+
@implementation RMFDirectionsRendererMap4d
|
|
11
|
+
|
|
12
|
+
@end
|
package/ios/RMFDummyView.h
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@interface RMFDummyView : UIView
|
|
5
|
-
@property (nonatomic, weak) UIView *view;
|
|
6
|
-
- (instancetype)initWithView:(UIView*)view;
|
|
1
|
+
#import <UIKit/UIKit.h>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@interface RMFDummyView : UIView
|
|
5
|
+
@property (nonatomic, weak) UIView *view;
|
|
6
|
+
- (instancetype)initWithView:(UIView*)view;
|
|
7
7
|
@end
|