react-native-map4d-services 0.1.0 → 1.0.2

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 (40) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +24 -24
  3. package/android/build.gradle +60 -59
  4. package/android/src/main/AndroidManifest.xml +4 -4
  5. package/android/src/main/java/com/reactnativemap4dservices/Map4dServicesModule.java +91 -34
  6. package/android/src/main/java/com/reactnativemap4dservices/Map4dServicesPackage.java +28 -28
  7. package/android/src/main/java/com/reactnativemap4dservices/SClient.java +50 -0
  8. package/android/src/main/java/com/reactnativemap4dservices/SConverter.java +166 -0
  9. package/android/src/main/java/com/reactnativemap4dservices/SJsonUtils.java +130 -0
  10. package/android/src/main/java/com/reactnativemap4dservices/SRequest.java +376 -0
  11. package/ios/Map4dServices.h +5 -5
  12. package/ios/Map4dServices.m +81 -81
  13. package/ios/SClient.h +23 -23
  14. package/ios/SClient.m +47 -47
  15. package/ios/SParamConvert.h +44 -0
  16. package/ios/SParamConvert.m +229 -0
  17. package/ios/SRequest.h +40 -40
  18. package/ios/SRequest.m +142 -143
  19. package/lib/commonjs/index.js.map +1 -1
  20. package/lib/module/index.js.map +1 -1
  21. package/lib/typescript/index.d.ts +111 -111
  22. package/package.json +150 -150
  23. package/react-native-map4d-services.podspec +20 -20
  24. package/src/index.tsx +174 -174
  25. package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  26. package/android/.gradle/7.1.1/dependencies-accessors/gc.properties +0 -0
  27. package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
  28. package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
  29. package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
  30. package/android/.gradle/7.1.1/gc.properties +0 -0
  31. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  32. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  33. package/android/.gradle/checksums/checksums.lock +0 -0
  34. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  35. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  36. package/android/.gradle/vcs-1/gc.properties +0 -0
  37. package/ios/.DS_Store +0 -0
  38. package/ios/Map4dServices.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  39. package/ios/RCTConvert+Services.h +0 -33
  40. package/ios/RCTConvert+Services.m +0 -146
package/ios/SRequest.m CHANGED
@@ -1,143 +1,142 @@
1
- //
2
- // SRequest.m
3
- // react-native-map4d-services
4
- //
5
- // Created by Huy Dang on 26/01/2022.
6
- //
7
-
8
- #import "SRequest.h"
9
- #import "RCTConvert+Services.h"
10
-
11
- @implementation SRequest
12
-
13
- #pragma mark - Geocode
14
-
15
- + (MFServiceRequest *)buildGeocodingRequestWithData:(NSDictionary *)data {
16
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/v2/geocode"];
17
- MFGeocodeParams *params = [[MFGeocodeParams alloc] initWithAddress:data[@"address"]];
18
- params.location = [RCTConvert MFLocationComponent:data[@"location"]];
19
- params.viewbox = [RCTConvert MFViewboxComponent:data[@"viewbox"]];
20
-
21
- request.params = params;
22
- return request;
23
- }
24
-
25
- #pragma mark - Place
26
-
27
- + (MFServiceRequest *)buildPlaceDetailRequestWithId:(NSString *)placeId {
28
- NSString *path = [@"/sdk/place/detail/" stringByAppendingString:placeId];
29
- return [[MFServiceRequest alloc] initWithPath:path];
30
- }
31
-
32
- + (MFServiceRequest *)buildTextSearchRequestWithData:(NSDictionary *)data {
33
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/place/text-search"];
34
- MFTextSearchParams *params = [[MFTextSearchParams alloc] initWithText:data[@"text"]];
35
-
36
- params.types = data[@"types"];
37
- params.location = [RCTConvert MFLocationComponent:data[@"location"]];
38
- params.datetime = [RCTConvert NSDate:data[@"datetime"]];
39
-
40
- request.params = params;
41
- return request;
42
- }
43
-
44
- + (MFServiceRequest *)buildNearbySearchRequestWithData:(NSDictionary *)data {
45
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/place/nearby-search"];
46
- MFNearbySearchParams *params = [[MFNearbySearchParams alloc] initWithLocation:[RCTConvert MFLocationComponent:data[@"location"]]
47
- radius:[RCTConvert NSUInteger:data[@"radius"]]
48
- text:data[@"text"]];
49
- params.types = data[@"types"];
50
- params.tags = data[@"tags"];
51
- params.datetime = [RCTConvert NSDate:data[@"datetime"]];
52
-
53
- request.params = params;
54
- return request;
55
- }
56
-
57
- + (MFServiceRequest *)buildViewboxSearchRequestWithData:(NSDictionary *)data {
58
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/place/viewbox-search"];
59
- MFViewboxSearchParams *params = [[MFViewboxSearchParams alloc] initWithViewbox:[RCTConvert MFViewboxComponent:data[@"viewbox"]]
60
- text:data[@"text"]];
61
- params.types = data[@"types"];
62
- params.tags = data[@"tags"];
63
- params.datetime = [RCTConvert NSDate:data[@"datetime"]];
64
-
65
- request.params = params;
66
- return request;
67
- }
68
-
69
- + (MFServiceRequest *)buildSuggestionsRequestWithData:(NSDictionary *)data {
70
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/autosuggest"];
71
- MFSuggestionParams *params = [[MFSuggestionParams alloc] initWithText:data[@"text"]];
72
- params.acronym = [RCTConvert BOOL:data[@"acronym"]];
73
- params.location = [RCTConvert MFLocationComponent:data[@"location"]];
74
-
75
- request.params = params;
76
- return request;
77
- }
78
-
79
- #pragma mark - Route
80
-
81
- + (MFServiceRequest *)buildDirectionsRequestWithData:(NSDictionary *)data {
82
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route"];
83
-
84
- MFLocationComponent *origin = [RCTConvert MFLocationComponent:data[@"origin"]];
85
- MFLocationComponent *destination = [RCTConvert MFLocationComponent:data[@"destination"]];
86
- MFDirectionsParams *params = [[MFDirectionsParams alloc] initWithOrigin:origin destination:destination];
87
- params.waypoints = [RCTConvert MFLocationComponentArray:data[@"points"]];
88
- params.mode = [RCTConvert MFTravelMode:data[@"mode"]];
89
- params.language = [RCTConvert MFLanguageResult:data[@"language"]];
90
- params.weighting = [RCTConvert MFRouteWeighting:data[@"weighting"]];
91
- params.avoid = [RCTConvert MFRouteRestriction:data[@"avoid"]];
92
-
93
- request.params = params;
94
- return request;
95
- }
96
-
97
- + (MFServiceRequest *)buildRouteETARequestWithData:(NSDictionary *)data {
98
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route/eta"];
99
-
100
- NSArray<MFLocationComponent *> *origins = [RCTConvert MFLocationComponentArray:data[@"origins"]];
101
- MFLocationComponent *destination = [RCTConvert MFLocationComponent:data[@"destination"]];
102
- MFRouteETAParams *params = [[MFRouteETAParams alloc] initWithOrigins:origins destination:destination];
103
- params.mode = [RCTConvert MFTravelMode:data[@"mode"]];
104
- params.language = [RCTConvert MFLanguageResult:data[@"language"]];
105
- params.weighting = [RCTConvert MFRouteWeighting:data[@"weighting"]];
106
- params.avoid = [RCTConvert MFRouteRestriction:data[@"avoid"]];
107
-
108
- request.params = params;
109
- request.method = MFRequestMethodPost;
110
- return request;
111
- }
112
-
113
- + (MFServiceRequest *)buildDistanceMatrixRequestWithData:(NSDictionary *)data {
114
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route/matrix"];
115
-
116
- NSArray<MFLocationComponent *> *origins = [RCTConvert MFLocationComponentArray:data[@"origins"]];
117
- NSArray<MFLocationComponent *> *destinations = [RCTConvert MFLocationComponentArray:data[@"destinations"]];
118
- MFDistanceMatrixParams *params = [[MFDistanceMatrixParams alloc] initWithOrigins:origins destinations:destinations];
119
- params.mode = [RCTConvert MFTravelMode:data[@"mode"]];
120
- params.language = [RCTConvert MFLanguageResult:data[@"language"]];
121
- params.weighting = [RCTConvert MFRouteWeighting:data[@"weighting"]];
122
- params.avoid = [RCTConvert MFRouteRestriction:data[@"avoid"]];
123
-
124
- request.params = params;
125
- return request;
126
- }
127
-
128
- + (MFServiceRequest *)buildGraphRouteRequestWithData:(NSDictionary *)data {
129
- MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route/graph"];
130
-
131
- NSArray<MFLocationComponent *> *points = [RCTConvert MFLocationComponentArray:data[@"locations"]];
132
- MFGraphRouteParams *params = [[MFGraphRouteParams alloc] initWithLocations:points];
133
- params.mode = [RCTConvert MFTravelMode:data[@"mode"]];
134
- params.language = [RCTConvert MFLanguageResult:data[@"language"]];
135
- params.weighting = [RCTConvert MFRouteWeighting:data[@"weighting"]];
136
- params.avoid = [RCTConvert MFRouteRestriction:data[@"avoid"]];
137
-
138
- request.params = params;
139
- return request;
140
- }
141
-
142
- @end
143
-
1
+ //
2
+ // SRequest.m
3
+ // react-native-map4d-services
4
+ //
5
+ // Created by Huy Dang on 26/01/2022.
6
+ //
7
+
8
+ #import "SRequest.h"
9
+ #import "SParamConvert.h"
10
+
11
+ @implementation SRequest
12
+
13
+ #pragma mark - Geocode
14
+
15
+ + (MFServiceRequest *)buildGeocodingRequestWithData:(NSDictionary *)data {
16
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/v2/geocode"];
17
+ MFGeocodeParams *params = [[MFGeocodeParams alloc] initWithAddress:data[@"address"]];
18
+ params.location = [SParamConvert MFLocationComponent:data[@"location"]];
19
+ params.viewbox = [SParamConvert MFViewboxComponent:data[@"viewbox"]];
20
+
21
+ request.params = params;
22
+ return request;
23
+ }
24
+
25
+ #pragma mark - Place
26
+
27
+ + (MFServiceRequest *)buildPlaceDetailRequestWithId:(NSString *)placeId {
28
+ NSString *path = [@"/sdk/place/detail/" stringByAppendingString:placeId];
29
+ return [[MFServiceRequest alloc] initWithPath:path];
30
+ }
31
+
32
+ + (MFServiceRequest *)buildTextSearchRequestWithData:(NSDictionary *)data {
33
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/place/text-search"];
34
+ MFTextSearchParams *params = [[MFTextSearchParams alloc] initWithText:data[@"text"]];
35
+ params.types = [SParamConvert NSStringArray:data[@"types"]];
36
+ params.location = [SParamConvert MFLocationComponent:data[@"location"]];
37
+ params.datetime = [SParamConvert NSDate:data[@"datetime"]];
38
+
39
+ request.params = params;
40
+ return request;
41
+ }
42
+
43
+ + (MFServiceRequest *)buildNearbySearchRequestWithData:(NSDictionary *)data {
44
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/place/nearby-search"];
45
+ MFNearbySearchParams *params = [[MFNearbySearchParams alloc] initWithLocation:[SParamConvert MFLocationComponent:data[@"location"]]
46
+ radius:[SParamConvert NSUInteger:data[@"radius"]]
47
+ text:[SParamConvert NSString:data[@"text"]]];
48
+ params.types = [SParamConvert NSStringArray:data[@"types"]];
49
+ params.tags = [SParamConvert NSStringArray:data[@"tags"]];
50
+ params.datetime = [SParamConvert NSDate:data[@"datetime"]];
51
+
52
+ request.params = params;
53
+ return request;
54
+ }
55
+
56
+ + (MFServiceRequest *)buildViewboxSearchRequestWithData:(NSDictionary *)data {
57
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/place/viewbox-search"];
58
+ MFViewboxSearchParams *params = [[MFViewboxSearchParams alloc] initWithViewbox:[SParamConvert MFViewboxComponent:data[@"viewbox"]]
59
+ text:[SParamConvert NSString:data[@"text"]]];
60
+ params.types = [SParamConvert NSStringArray:data[@"types"]];
61
+ params.tags = [SParamConvert NSStringArray:data[@"tags"]];
62
+ params.datetime = [SParamConvert NSDate:data[@"datetime"]];
63
+
64
+ request.params = params;
65
+ return request;
66
+ }
67
+
68
+ + (MFServiceRequest *)buildSuggestionsRequestWithData:(NSDictionary *)data {
69
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/autosuggest"];
70
+ MFSuggestionParams *params = [[MFSuggestionParams alloc] initWithText:[SParamConvert NSString:data[@"text"]]];
71
+ params.location = [SParamConvert MFLocationComponent:data[@"location"]];
72
+ params.acronym = [SParamConvert BOOL:data[@"acronym"] fallback:params.acronym];
73
+
74
+ request.params = params;
75
+ return request;
76
+ }
77
+
78
+ #pragma mark - Route
79
+
80
+ + (MFServiceRequest *)buildDirectionsRequestWithData:(NSDictionary *)data {
81
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route"];
82
+
83
+ MFLocationComponent *origin = [SParamConvert MFLocationComponent:data[@"origin"]];
84
+ MFLocationComponent *destination = [SParamConvert MFLocationComponent:data[@"destination"]];
85
+ MFDirectionsParams *params = [[MFDirectionsParams alloc] initWithOrigin:origin destination:destination];
86
+ params.waypoints = [SParamConvert MFLocationComponentArray:data[@"points"]];
87
+ params.mode = [SParamConvert MFTravelMode:data[@"mode"] fallback:params.mode];
88
+ params.language = [SParamConvert MFLanguageResult:data[@"language"] fallback:params.language];
89
+ params.weighting = [SParamConvert MFRouteWeighting:data[@"weighting"] fallback:params.weighting];
90
+ params.restriction = [SParamConvert MFRouteRestriction:data[@"restriction"]];
91
+
92
+ request.params = params;
93
+ return request;
94
+ }
95
+
96
+ + (MFServiceRequest *)buildRouteETARequestWithData:(NSDictionary *)data {
97
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route/eta"];
98
+
99
+ NSArray<MFLocationComponent *> *origins = [SParamConvert MFLocationComponentArray:data[@"origins"]];
100
+ MFLocationComponent *destination = [SParamConvert MFLocationComponent:data[@"destination"]];
101
+ MFRouteETAParams *params = [[MFRouteETAParams alloc] initWithOrigins:origins destination:destination];
102
+ params.mode = [SParamConvert MFTravelMode:data[@"mode"] fallback:params.mode];
103
+ params.language = [SParamConvert MFLanguageResult:data[@"language"] fallback:params.language];
104
+ params.weighting = [SParamConvert MFRouteWeighting:data[@"weighting"] fallback:params.weighting];
105
+ params.restriction = [SParamConvert MFRouteRestriction:data[@"restriction"]];
106
+
107
+ request.params = params;
108
+ request.method = MFRequestMethodPost;
109
+ return request;
110
+ }
111
+
112
+ + (MFServiceRequest *)buildDistanceMatrixRequestWithData:(NSDictionary *)data {
113
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route/matrix"];
114
+
115
+ NSArray<MFLocationComponent *> *origins = [SParamConvert MFLocationComponentArray:data[@"origins"]];
116
+ NSArray<MFLocationComponent *> *destinations = [SParamConvert MFLocationComponentArray:data[@"destinations"]];
117
+ MFDistanceMatrixParams *params = [[MFDistanceMatrixParams alloc] initWithOrigins:origins destinations:destinations];
118
+ params.mode = [SParamConvert MFTravelMode:data[@"mode"] fallback:params.mode];
119
+ params.language = [SParamConvert MFLanguageResult:data[@"language"] fallback:params.language];
120
+ params.weighting = [SParamConvert MFRouteWeighting:data[@"weighting"] fallback:params.weighting];
121
+ params.restriction = [SParamConvert MFRouteRestriction:data[@"restriction"]];
122
+
123
+ request.params = params;
124
+ return request;
125
+ }
126
+
127
+ + (MFServiceRequest *)buildGraphRouteRequestWithData:(NSDictionary *)data {
128
+ MFServiceRequest *request = [[MFServiceRequest alloc] initWithPath:@"/sdk/route/graph"];
129
+
130
+ NSArray<MFLocationComponent *> *points = [SParamConvert MFLocationComponentArray:data[@"locations"]];
131
+ MFGraphRouteParams *params = [[MFGraphRouteParams alloc] initWithLocations:points];
132
+ params.mode = [SParamConvert MFTravelMode:data[@"mode"] fallback:params.mode];
133
+ params.language = [SParamConvert MFLanguageResult:data[@"language"] fallback:params.language];
134
+ params.weighting = [SParamConvert MFRouteWeighting:data[@"weighting"] fallback:params.weighting];
135
+ params.restriction = [SParamConvert MFRouteRestriction:data[@"restriction"]];
136
+
137
+ request.params = params;
138
+ return request;
139
+ }
140
+
141
+ @end
142
+
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":["LINKING_ERROR","Platform","select","ios","default","Map4dServices","NativeModules","Proxy","get","Error","MFTravelMode","MFRouteWeighting","MFLanguageResult","MFRouteType","fetchSuggestion","params","fetchPlaceDetail","placeId","fetchTextSearch","fetchNearbySearch","fetchViewboxSearch","fetchGeocode","fetchDirections","fetchRou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CAACc,iBAAd,CAAgCJ,MAAhC,CAAP;AACD;;AAEM,SAASK,kBAAT,CAA4BL,MAA5B,EAA4E;AACjF,SAAOV,aAAa,CAACe,kBAAd,CAAiCL,MAAjC,CAAP;AACD;;AAEM,SAASM,YAAT,CAAsBN,MAAtB,EAAgE;AACrE,SAAOV,aAAa,CAACgB,YAAd,CAA2BN,MAA3B,CAAP;AACD;;AAEM,SAASO,eAAT,CAAyBP,MAAzB,EAAsE;AAC3E,SAAOV,aAAa,CAACiB,eAAd,CAA8BP,MAA9B,CAAP;AACD;;AAEM,SAASQ,aAAT,CAAuBR,MAAvB,EAAkE;AACvE,SAAOV,aAAa,CAACkB,aAAd,CAA4BR,MAA5B,CAAP;AACD;;AAEM,SAASS,mBAAT,CAA6BT,MAA7B,EAA8E;AACnF,SAAOV,aAAa,CAACmB,mBAAd,CAAkCT,MAAlC,CAAP;AACD;;AAEM,SAASU,eAAT,CAAyBV,MAAzB,EAAsE;AAC3E,SAAOV,aAAa,CAACoB,eAAd,CAA8BV,MAA9B,CAAP;AACD","sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'react-native-map4d-services' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst Map4dServices = NativeModules.Map4dServices\n ? NativeModules.Map4dServices\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport type MFLocationComponent = {\n latitude: number,\n longitude: number,\n alias?: string,\n}\n\nexport type MFViewboxComponent = {\n southwest: MFLocationComponent,\n northeast: MFLocationComponent,\n}\n\nexport enum MFTravelMode {\n car = 'car',\n bike = 'bike',\n foot = 'foot',\n motorcycle = 'motorcycle',\n}\n\nexport enum MFRouteWeighting {\n shortest = 'shortest',\n fastest = 'fastest',\n balance = 'balance',\n}\n\nexport enum MFLanguageResult {\n en = 'en',\n vi = 'vi',\n}\n\nexport enum MFRouteType {\n motorway = 'motorway',\n trunk = 'trunk',\n ferry = 'ferry',\n bridge = 'bridge',\n tunnel = 'tunnel',\n}\n\nexport type MFRouteRestriction = {\n location?: MFLocationComponent,\n radius?: number,\n viewbox?: MFViewboxComponent,\n path?: MFLocationComponent[],\n types?: MFRouteType[] | string[]\n}\n\nexport type MFSuggestionParams = {\n text: string,\n location?: MFLocationComponent,\n acronym?: boolean,\n}\n\nexport type MFTextSearchParams = {\n text: string,\n types?: string[],\n datetime?: Date,\n location?: MFLocationComponent,\n}\n\nexport type MFNearbySearchParams = {\n location: MFLocationComponent,\n radius: number,\n text?: string,\n types?: string[],\n tags?: string[],\n datetime?: Date,\n}\n\nexport type MFViewboxSearchParams = {\n viewbox: MFViewboxComponent,\n text?: string,\n types?: string[],\n tags?: string[],\n datetime?: Date,\n}\n\nexport type MFGeocodeParams = {\n location?: MFLocationComponent,\n address?: string,\n viewbox?: MFViewboxComponent,\n}\n\nexport type MFDirectionsParams = {\n origin: MFLocationComponent,\n destination: MFLocationComponent,\n waypoints?: MFLocationComponent[],\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport type MFRouteETAParams = {\n origins: MFLocationComponent[],\n destination: MFLocationComponent,\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport type MFDistanceMatrixParams = {\n origins: MFLocationComponent[],\n destinations: MFLocationComponent[],\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport type MFGraphRouteParams = {\n locations: MFLocationComponent[],\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport function fetchSuggestion(params: MFSuggestionParams): Promise<object> {\n return Map4dServices.fetchSuggestion(params);\n}\n\nexport function fetchPlaceDetail(placeId: string): Promise<object> {\n return Map4dServices.fetchPlaceDetail(placeId);\n}\n\nexport function fetchTextSearch(params: MFTextSearchParams): Promise<object> {\n return Map4dServices.fetchTextSearch(params);\n}\n\nexport function fetchNearbySearch(params: MFNearbySearchParams): Promise<object> {\n return Map4dServices.fetchNearbySearch(params);\n}\n\nexport function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<object> {\n return Map4dServices.fetchViewboxSearch(params);\n}\n\nexport function fetchGeocode(params: MFGeocodeParams): Promise<object> {\n return Map4dServices.fetchGeocode(params);\n}\n\nexport function fetchDirections(params: MFDirectionsParams): Promise<object> {\n return Map4dServices.fetchDirections(params);\n}\n\nexport function fetchRouteETA(params: MFRouteETAParams): Promise<object> {\n return Map4dServices.fetchRouteETA(params);\n}\n\nexport function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<object> {\n return Map4dServices.fetchDistanceMatrix(params);\n}\n\nexport function fetchGraphRoute(params: MFGraphRouteParams): Promise<object> {\n return Map4dServices.fetchGraphRoute(params);\n}"]}
1
+ {"version":3,"sources":["index.tsx"],"names":["LINKING_ERROR","Platform","select","ios","default","Map4dServices","NativeModules","Proxy","get","Error","MFTravelMode","MFRouteWeighting","MFLanguageResult","MFRouteType","fetchSuggestion","params","fetchPlaceDetail","placeId","fetchTextSearch","fetchNearbySearch","fetchViewboxSearch","fetchGeocode","fetchDirections","fetchRouteETA","fetchDistanceMatrix","fetchGraphRoute"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AAEA,MAAMA,aAAa,GAChB,sFAAD,GACAC,sBAASC,MAAT,CAAgB;AAAEC,EAAAA,GAAG,EAAE,gCAAP;AAAyCC,EAAAA,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,aAAa,GAAGC,2BAAcD,aAAd,GAClBC,2BAAcD,aADI,GAElB,IAAIE,KAAJ,C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Ad,CAA8BP,MAA9B,CAAP;AACD;;AAEM,SAASQ,aAAT,CAAuBR,MAAvB,EAA+D;AACpE,SAAOV,aAAa,CAACkB,aAAd,CAA4BR,MAA5B,CAAP;AACD;;AAEM,SAASS,mBAAT,CAA6BT,MAA7B,EAA2E;AAChF,SAAOV,aAAa,CAACmB,mBAAd,CAAkCT,MAAlC,CAAP;AACD;;AAEM,SAASU,eAAT,CAAyBV,MAAzB,EAAmE;AACxE,SAAOV,aAAa,CAACoB,eAAd,CAA8BV,MAA9B,CAAP;AACD","sourcesContent":["import { NativeModules, Platform } from 'react-native';\r\n\r\nconst LINKING_ERROR =\r\n `The package 'react-native-map4d-services' doesn't seem to be linked. Make sure: \\n\\n` +\r\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\r\n '- You rebuilt the app after installing the package\\n' +\r\n '- You are not using Expo managed workflow\\n';\r\n\r\nconst Map4dServices = NativeModules.Map4dServices\r\n ? NativeModules.Map4dServices\r\n : new Proxy(\r\n {},\r\n {\r\n get() {\r\n throw new Error(LINKING_ERROR);\r\n },\r\n }\r\n );\r\n\r\nexport type MFLocationComponent = {\r\n latitude: number,\r\n longitude: number,\r\n alias?: string,\r\n}\r\n\r\nexport type MFViewboxComponent = {\r\n southwest: MFLocationComponent,\r\n northeast: MFLocationComponent,\r\n}\r\n\r\nexport enum MFTravelMode {\r\n car = 'car',\r\n bike = 'bike',\r\n foot = 'foot',\r\n motorcycle = 'motorcycle',\r\n}\r\n\r\nexport enum MFRouteWeighting {\r\n shortest = 'shortest',\r\n fastest = 'fastest',\r\n balance = 'balance',\r\n}\r\n\r\nexport enum MFLanguageResult {\r\n en = 'en',\r\n vi = 'vi',\r\n}\r\n\r\nexport enum MFRouteType {\r\n motorway = 'motorway',\r\n trunk = 'trunk',\r\n ferry = 'ferry',\r\n bridge = 'bridge',\r\n tunnel = 'tunnel',\r\n}\r\n\r\nexport type MFRouteRestriction = {\r\n location?: MFLocationComponent,\r\n radius?: number,\r\n viewbox?: MFViewboxComponent,\r\n path?: MFLocationComponent[],\r\n types?: MFRouteType[] | string[]\r\n}\r\n\r\nexport type MFSuggestionParams = {\r\n text: string,\r\n location?: MFLocationComponent,\r\n acronym?: boolean,\r\n}\r\n\r\nexport type MFTextSearchParams = {\r\n text: string,\r\n types?: string[],\r\n datetime?: number,\r\n location?: MFLocationComponent,\r\n}\r\n\r\nexport type MFNearbySearchParams = {\r\n location: MFLocationComponent,\r\n radius: number,\r\n text?: string,\r\n types?: string[],\r\n tags?: string[],\r\n datetime?: number,\r\n}\r\n\r\nexport type MFViewboxSearchParams = {\r\n viewbox: MFViewboxComponent,\r\n text?: string,\r\n types?: string[],\r\n tags?: string[],\r\n datetime?: number,\r\n}\r\n\r\nexport type MFGeocodeParams = {\r\n location?: MFLocationComponent,\r\n address?: string,\r\n viewbox?: MFViewboxComponent,\r\n}\r\n\r\nexport type MFDirectionsParams = {\r\n origin: MFLocationComponent,\r\n destination: MFLocationComponent,\r\n waypoints?: MFLocationComponent[],\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport type MFRouteETAParams = {\r\n origins: MFLocationComponent[],\r\n destination: MFLocationComponent,\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport type MFDistanceMatrixParams = {\r\n origins: MFLocationComponent[],\r\n destinations: MFLocationComponent[],\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport type MFGraphRouteParams = {\r\n locations: MFLocationComponent[],\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport function fetchSuggestion(params: MFSuggestionParams): Promise<any> {\r\n return Map4dServices.fetchSuggestion(params);\r\n}\r\n\r\nexport function fetchPlaceDetail(placeId: string): Promise<any> {\r\n return Map4dServices.fetchPlaceDetail(placeId);\r\n}\r\n\r\nexport function fetchTextSearch(params: MFTextSearchParams): Promise<any> {\r\n return Map4dServices.fetchTextSearch(params);\r\n}\r\n\r\nexport function fetchNearbySearch(params: MFNearbySearchParams): Promise<any> {\r\n return Map4dServices.fetchNearbySearch(params);\r\n}\r\n\r\nexport function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<any> {\r\n return Map4dServices.fetchViewboxSearch(params);\r\n}\r\n\r\nexport function fetchGeocode(params: MFGeocodeParams): Promise<any> {\r\n return Map4dServices.fetchGeocode(params);\r\n}\r\n\r\nexport function fetchDirections(params: MFDirectionsParams): Promise<any> {\r\n return Map4dServices.fetchDirections(params);\r\n}\r\n\r\nexport function fetchRouteETA(params: MFRouteETAParams): Promise<any> {\r\n return Map4dServices.fetchRouteETA(params);\r\n}\r\n\r\nexport function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<any> {\r\n return Map4dServices.fetchDistanceMatrix(params);\r\n}\r\n\r\nexport function fetchGraphRoute(params: MFGraphRouteParams): Promise<any> {\r\n return Map4dServices.fetchGraphRoute(params);\r\n}"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","Map4dServices","Proxy","get","Error","MFTravelMode","MFRouteWeighting","MFLanguageResult","MFRouteType","fetchSuggestion","params","fetchPlaceDetail","placeId","fetchTextSearch","fetchNearbySearch","fetchViewboxSearch","fetchGeocode","fetchDirections","fetchRouteETA","fetchDistanceMatrix","fetchGraphRoute"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAEA,MAAMC,aAAa,GAChB,sFAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;AAAEC,EAAAA,GAAG,EAAE,gCAAP;AAAyCC,EAAAA,OA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BAAd,CAAiCL,MAAjC,CAAP;AACD;AAED,OAAO,SAASM,YAAT,CAAsBN,MAAtB,EAAgE;AACrE,SAAOT,aAAa,CAACe,YAAd,CAA2BN,MAA3B,CAAP;AACD;AAED,OAAO,SAASO,eAAT,CAAyBP,MAAzB,EAAsE;AAC3E,SAAOT,aAAa,CAACgB,eAAd,CAA8BP,MAA9B,CAAP;AACD;AAED,OAAO,SAASQ,aAAT,CAAuBR,MAAvB,EAAkE;AACvE,SAAOT,aAAa,CAACiB,aAAd,CAA4BR,MAA5B,CAAP;AACD;AAED,OAAO,SAASS,mBAAT,CAA6BT,MAA7B,EAA8E;AACnF,SAAOT,aAAa,CAACkB,mBAAd,CAAkCT,MAAlC,CAAP;AACD;AAED,OAAO,SAASU,eAAT,CAAyBV,MAAzB,EAAsE;AAC3E,SAAOT,aAAa,CAACmB,eAAd,CAA8BV,MAA9B,CAAP;AACD","sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'react-native-map4d-services' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst Map4dServices = NativeModules.Map4dServices\n ? NativeModules.Map4dServices\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport type MFLocationComponent = {\n latitude: number,\n longitude: number,\n alias?: string,\n}\n\nexport type MFViewboxComponent = {\n southwest: MFLocationComponent,\n northeast: MFLocationComponent,\n}\n\nexport enum MFTravelMode {\n car = 'car',\n bike = 'bike',\n foot = 'foot',\n motorcycle = 'motorcycle',\n}\n\nexport enum MFRouteWeighting {\n shortest = 'shortest',\n fastest = 'fastest',\n balance = 'balance',\n}\n\nexport enum MFLanguageResult {\n en = 'en',\n vi = 'vi',\n}\n\nexport enum MFRouteType {\n motorway = 'motorway',\n trunk = 'trunk',\n ferry = 'ferry',\n bridge = 'bridge',\n tunnel = 'tunnel',\n}\n\nexport type MFRouteRestriction = {\n location?: MFLocationComponent,\n radius?: number,\n viewbox?: MFViewboxComponent,\n path?: MFLocationComponent[],\n types?: MFRouteType[] | string[]\n}\n\nexport type MFSuggestionParams = {\n text: string,\n location?: MFLocationComponent,\n acronym?: boolean,\n}\n\nexport type MFTextSearchParams = {\n text: string,\n types?: string[],\n datetime?: Date,\n location?: MFLocationComponent,\n}\n\nexport type MFNearbySearchParams = {\n location: MFLocationComponent,\n radius: number,\n text?: string,\n types?: string[],\n tags?: string[],\n datetime?: Date,\n}\n\nexport type MFViewboxSearchParams = {\n viewbox: MFViewboxComponent,\n text?: string,\n types?: string[],\n tags?: string[],\n datetime?: Date,\n}\n\nexport type MFGeocodeParams = {\n location?: MFLocationComponent,\n address?: string,\n viewbox?: MFViewboxComponent,\n}\n\nexport type MFDirectionsParams = {\n origin: MFLocationComponent,\n destination: MFLocationComponent,\n waypoints?: MFLocationComponent[],\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport type MFRouteETAParams = {\n origins: MFLocationComponent[],\n destination: MFLocationComponent,\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport type MFDistanceMatrixParams = {\n origins: MFLocationComponent[],\n destinations: MFLocationComponent[],\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport type MFGraphRouteParams = {\n locations: MFLocationComponent[],\n mode?: MFTravelMode | string,\n weighting?: MFRouteWeighting | string,\n language?: MFLanguageResult | string,\n restriction?: MFRouteRestriction,\n}\n\nexport function fetchSuggestion(params: MFSuggestionParams): Promise<object> {\n return Map4dServices.fetchSuggestion(params);\n}\n\nexport function fetchPlaceDetail(placeId: string): Promise<object> {\n return Map4dServices.fetchPlaceDetail(placeId);\n}\n\nexport function fetchTextSearch(params: MFTextSearchParams): Promise<object> {\n return Map4dServices.fetchTextSearch(params);\n}\n\nexport function fetchNearbySearch(params: MFNearbySearchParams): Promise<object> {\n return Map4dServices.fetchNearbySearch(params);\n}\n\nexport function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<object> {\n return Map4dServices.fetchViewboxSearch(params);\n}\n\nexport function fetchGeocode(params: MFGeocodeParams): Promise<object> {\n return Map4dServices.fetchGeocode(params);\n}\n\nexport function fetchDirections(params: MFDirectionsParams): Promise<object> {\n return Map4dServices.fetchDirections(params);\n}\n\nexport function fetchRouteETA(params: MFRouteETAParams): Promise<object> {\n return Map4dServices.fetchRouteETA(params);\n}\n\nexport function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<object> {\n return Map4dServices.fetchDistanceMatrix(params);\n}\n\nexport function fetchGraphRoute(params: MFGraphRouteParams): Promise<object> {\n return Map4dServices.fetchGraphRoute(params);\n}"]}
1
+ {"version":3,"sources":["index.tsx"],"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","Map4dServices","Proxy","get","Error","MFTravelMode","MFRouteWeighting","MFLanguageResult","MFRouteType","fetchSuggestion","params","fetchPlaceDetail","placeId","fetchTextSearch","fetchNearbySearch","fetchViewboxSearch","fetchGeocode","fetchDirections","fetchRouteETA","fetchDistanceMatrix","fetchGraphRoute"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAEA,MAAMC,aAAa,GAChB,sFAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;AAAEC,EAAAA,GAAG,EAAE,gCAAP;AAAyCC,EAAAA,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,aAAa,GAAGN,aAAa,CAACM,aAAd,GAClBN,aAAa,CAACM,aADI,GAElB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,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gB,eAAd,CAA8BP,MAA9B,CAAP;AACD;AAED,OAAO,SAASQ,aAAT,CAAuBR,MAAvB,EAA+D;AACpE,SAAOT,aAAa,CAACiB,aAAd,CAA4BR,MAA5B,CAAP;AACD;AAED,OAAO,SAASS,mBAAT,CAA6BT,MAA7B,EAA2E;AAChF,SAAOT,aAAa,CAACkB,mBAAd,CAAkCT,MAAlC,CAAP;AACD;AAED,OAAO,SAASU,eAAT,CAAyBV,MAAzB,EAAmE;AACxE,SAAOT,aAAa,CAACmB,eAAd,CAA8BV,MAA9B,CAAP;AACD","sourcesContent":["import { NativeModules, Platform } from 'react-native';\r\n\r\nconst LINKING_ERROR =\r\n `The package 'react-native-map4d-services' doesn't seem to be linked. Make sure: \\n\\n` +\r\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\r\n '- You rebuilt the app after installing the package\\n' +\r\n '- You are not using Expo managed workflow\\n';\r\n\r\nconst Map4dServices = NativeModules.Map4dServices\r\n ? NativeModules.Map4dServices\r\n : new Proxy(\r\n {},\r\n {\r\n get() {\r\n throw new Error(LINKING_ERROR);\r\n },\r\n }\r\n );\r\n\r\nexport type MFLocationComponent = {\r\n latitude: number,\r\n longitude: number,\r\n alias?: string,\r\n}\r\n\r\nexport type MFViewboxComponent = {\r\n southwest: MFLocationComponent,\r\n northeast: MFLocationComponent,\r\n}\r\n\r\nexport enum MFTravelMode {\r\n car = 'car',\r\n bike = 'bike',\r\n foot = 'foot',\r\n motorcycle = 'motorcycle',\r\n}\r\n\r\nexport enum MFRouteWeighting {\r\n shortest = 'shortest',\r\n fastest = 'fastest',\r\n balance = 'balance',\r\n}\r\n\r\nexport enum MFLanguageResult {\r\n en = 'en',\r\n vi = 'vi',\r\n}\r\n\r\nexport enum MFRouteType {\r\n motorway = 'motorway',\r\n trunk = 'trunk',\r\n ferry = 'ferry',\r\n bridge = 'bridge',\r\n tunnel = 'tunnel',\r\n}\r\n\r\nexport type MFRouteRestriction = {\r\n location?: MFLocationComponent,\r\n radius?: number,\r\n viewbox?: MFViewboxComponent,\r\n path?: MFLocationComponent[],\r\n types?: MFRouteType[] | string[]\r\n}\r\n\r\nexport type MFSuggestionParams = {\r\n text: string,\r\n location?: MFLocationComponent,\r\n acronym?: boolean,\r\n}\r\n\r\nexport type MFTextSearchParams = {\r\n text: string,\r\n types?: string[],\r\n datetime?: number,\r\n location?: MFLocationComponent,\r\n}\r\n\r\nexport type MFNearbySearchParams = {\r\n location: MFLocationComponent,\r\n radius: number,\r\n text?: string,\r\n types?: string[],\r\n tags?: string[],\r\n datetime?: number,\r\n}\r\n\r\nexport type MFViewboxSearchParams = {\r\n viewbox: MFViewboxComponent,\r\n text?: string,\r\n types?: string[],\r\n tags?: string[],\r\n datetime?: number,\r\n}\r\n\r\nexport type MFGeocodeParams = {\r\n location?: MFLocationComponent,\r\n address?: string,\r\n viewbox?: MFViewboxComponent,\r\n}\r\n\r\nexport type MFDirectionsParams = {\r\n origin: MFLocationComponent,\r\n destination: MFLocationComponent,\r\n waypoints?: MFLocationComponent[],\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport type MFRouteETAParams = {\r\n origins: MFLocationComponent[],\r\n destination: MFLocationComponent,\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport type MFDistanceMatrixParams = {\r\n origins: MFLocationComponent[],\r\n destinations: MFLocationComponent[],\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport type MFGraphRouteParams = {\r\n locations: MFLocationComponent[],\r\n mode?: MFTravelMode | string,\r\n weighting?: MFRouteWeighting | string,\r\n language?: MFLanguageResult | string,\r\n restriction?: MFRouteRestriction,\r\n}\r\n\r\nexport function fetchSuggestion(params: MFSuggestionParams): Promise<any> {\r\n return Map4dServices.fetchSuggestion(params);\r\n}\r\n\r\nexport function fetchPlaceDetail(placeId: string): Promise<any> {\r\n return Map4dServices.fetchPlaceDetail(placeId);\r\n}\r\n\r\nexport function fetchTextSearch(params: MFTextSearchParams): Promise<any> {\r\n return Map4dServices.fetchTextSearch(params);\r\n}\r\n\r\nexport function fetchNearbySearch(params: MFNearbySearchParams): Promise<any> {\r\n return Map4dServices.fetchNearbySearch(params);\r\n}\r\n\r\nexport function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<any> {\r\n return Map4dServices.fetchViewboxSearch(params);\r\n}\r\n\r\nexport function fetchGeocode(params: MFGeocodeParams): Promise<any> {\r\n return Map4dServices.fetchGeocode(params);\r\n}\r\n\r\nexport function fetchDirections(params: MFDirectionsParams): Promise<any> {\r\n return Map4dServices.fetchDirections(params);\r\n}\r\n\r\nexport function fetchRouteETA(params: MFRouteETAParams): Promise<any> {\r\n return Map4dServices.fetchRouteETA(params);\r\n}\r\n\r\nexport function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<any> {\r\n return Map4dServices.fetchDistanceMatrix(params);\r\n}\r\n\r\nexport function fetchGraphRoute(params: MFGraphRouteParams): Promise<any> {\r\n return Map4dServices.fetchGraphRoute(params);\r\n}"]}
@@ -1,111 +1,111 @@
1
- export declare type MFLocationComponent = {
2
- latitude: number;
3
- longitude: number;
4
- alias?: string;
5
- };
6
- export declare type MFViewboxComponent = {
7
- southwest: MFLocationComponent;
8
- northeast: MFLocationComponent;
9
- };
10
- export declare enum MFTravelMode {
11
- car = "car",
12
- bike = "bike",
13
- foot = "foot",
14
- motorcycle = "motorcycle"
15
- }
16
- export declare enum MFRouteWeighting {
17
- shortest = "shortest",
18
- fastest = "fastest",
19
- balance = "balance"
20
- }
21
- export declare enum MFLanguageResult {
22
- en = "en",
23
- vi = "vi"
24
- }
25
- export declare enum MFRouteType {
26
- motorway = "motorway",
27
- trunk = "trunk",
28
- ferry = "ferry",
29
- bridge = "bridge",
30
- tunnel = "tunnel"
31
- }
32
- export declare type MFRouteRestriction = {
33
- location?: MFLocationComponent;
34
- radius?: number;
35
- viewbox?: MFViewboxComponent;
36
- path?: MFLocationComponent[];
37
- types?: MFRouteType[] | string[];
38
- };
39
- export declare type MFSuggestionParams = {
40
- text: string;
41
- location?: MFLocationComponent;
42
- acronym?: boolean;
43
- };
44
- export declare type MFTextSearchParams = {
45
- text: string;
46
- types?: string[];
47
- datetime?: Date;
48
- location?: MFLocationComponent;
49
- };
50
- export declare type MFNearbySearchParams = {
51
- location: MFLocationComponent;
52
- radius: number;
53
- text?: string;
54
- types?: string[];
55
- tags?: string[];
56
- datetime?: Date;
57
- };
58
- export declare type MFViewboxSearchParams = {
59
- viewbox: MFViewboxComponent;
60
- text?: string;
61
- types?: string[];
62
- tags?: string[];
63
- datetime?: Date;
64
- };
65
- export declare type MFGeocodeParams = {
66
- location?: MFLocationComponent;
67
- address?: string;
68
- viewbox?: MFViewboxComponent;
69
- };
70
- export declare type MFDirectionsParams = {
71
- origin: MFLocationComponent;
72
- destination: MFLocationComponent;
73
- waypoints?: MFLocationComponent[];
74
- mode?: MFTravelMode | string;
75
- weighting?: MFRouteWeighting | string;
76
- language?: MFLanguageResult | string;
77
- restriction?: MFRouteRestriction;
78
- };
79
- export declare type MFRouteETAParams = {
80
- origins: MFLocationComponent[];
81
- destination: MFLocationComponent;
82
- mode?: MFTravelMode | string;
83
- weighting?: MFRouteWeighting | string;
84
- language?: MFLanguageResult | string;
85
- restriction?: MFRouteRestriction;
86
- };
87
- export declare type MFDistanceMatrixParams = {
88
- origins: MFLocationComponent[];
89
- destinations: MFLocationComponent[];
90
- mode?: MFTravelMode | string;
91
- weighting?: MFRouteWeighting | string;
92
- language?: MFLanguageResult | string;
93
- restriction?: MFRouteRestriction;
94
- };
95
- export declare type MFGraphRouteParams = {
96
- locations: MFLocationComponent[];
97
- mode?: MFTravelMode | string;
98
- weighting?: MFRouteWeighting | string;
99
- language?: MFLanguageResult | string;
100
- restriction?: MFRouteRestriction;
101
- };
102
- export declare function fetchSuggestion(params: MFSuggestionParams): Promise<object>;
103
- export declare function fetchPlaceDetail(placeId: string): Promise<object>;
104
- export declare function fetchTextSearch(params: MFTextSearchParams): Promise<object>;
105
- export declare function fetchNearbySearch(params: MFNearbySearchParams): Promise<object>;
106
- export declare function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<object>;
107
- export declare function fetchGeocode(params: MFGeocodeParams): Promise<object>;
108
- export declare function fetchDirections(params: MFDirectionsParams): Promise<object>;
109
- export declare function fetchRouteETA(params: MFRouteETAParams): Promise<object>;
110
- export declare function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<object>;
111
- export declare function fetchGraphRoute(params: MFGraphRouteParams): Promise<object>;
1
+ export declare type MFLocationComponent = {
2
+ latitude: number;
3
+ longitude: number;
4
+ alias?: string;
5
+ };
6
+ export declare type MFViewboxComponent = {
7
+ southwest: MFLocationComponent;
8
+ northeast: MFLocationComponent;
9
+ };
10
+ export declare enum MFTravelMode {
11
+ car = "car",
12
+ bike = "bike",
13
+ foot = "foot",
14
+ motorcycle = "motorcycle"
15
+ }
16
+ export declare enum MFRouteWeighting {
17
+ shortest = "shortest",
18
+ fastest = "fastest",
19
+ balance = "balance"
20
+ }
21
+ export declare enum MFLanguageResult {
22
+ en = "en",
23
+ vi = "vi"
24
+ }
25
+ export declare enum MFRouteType {
26
+ motorway = "motorway",
27
+ trunk = "trunk",
28
+ ferry = "ferry",
29
+ bridge = "bridge",
30
+ tunnel = "tunnel"
31
+ }
32
+ export declare type MFRouteRestriction = {
33
+ location?: MFLocationComponent;
34
+ radius?: number;
35
+ viewbox?: MFViewboxComponent;
36
+ path?: MFLocationComponent[];
37
+ types?: MFRouteType[] | string[];
38
+ };
39
+ export declare type MFSuggestionParams = {
40
+ text: string;
41
+ location?: MFLocationComponent;
42
+ acronym?: boolean;
43
+ };
44
+ export declare type MFTextSearchParams = {
45
+ text: string;
46
+ types?: string[];
47
+ datetime?: number;
48
+ location?: MFLocationComponent;
49
+ };
50
+ export declare type MFNearbySearchParams = {
51
+ location: MFLocationComponent;
52
+ radius: number;
53
+ text?: string;
54
+ types?: string[];
55
+ tags?: string[];
56
+ datetime?: number;
57
+ };
58
+ export declare type MFViewboxSearchParams = {
59
+ viewbox: MFViewboxComponent;
60
+ text?: string;
61
+ types?: string[];
62
+ tags?: string[];
63
+ datetime?: number;
64
+ };
65
+ export declare type MFGeocodeParams = {
66
+ location?: MFLocationComponent;
67
+ address?: string;
68
+ viewbox?: MFViewboxComponent;
69
+ };
70
+ export declare type MFDirectionsParams = {
71
+ origin: MFLocationComponent;
72
+ destination: MFLocationComponent;
73
+ waypoints?: MFLocationComponent[];
74
+ mode?: MFTravelMode | string;
75
+ weighting?: MFRouteWeighting | string;
76
+ language?: MFLanguageResult | string;
77
+ restriction?: MFRouteRestriction;
78
+ };
79
+ export declare type MFRouteETAParams = {
80
+ origins: MFLocationComponent[];
81
+ destination: MFLocationComponent;
82
+ mode?: MFTravelMode | string;
83
+ weighting?: MFRouteWeighting | string;
84
+ language?: MFLanguageResult | string;
85
+ restriction?: MFRouteRestriction;
86
+ };
87
+ export declare type MFDistanceMatrixParams = {
88
+ origins: MFLocationComponent[];
89
+ destinations: MFLocationComponent[];
90
+ mode?: MFTravelMode | string;
91
+ weighting?: MFRouteWeighting | string;
92
+ language?: MFLanguageResult | string;
93
+ restriction?: MFRouteRestriction;
94
+ };
95
+ export declare type MFGraphRouteParams = {
96
+ locations: MFLocationComponent[];
97
+ mode?: MFTravelMode | string;
98
+ weighting?: MFRouteWeighting | string;
99
+ language?: MFLanguageResult | string;
100
+ restriction?: MFRouteRestriction;
101
+ };
102
+ export declare function fetchSuggestion(params: MFSuggestionParams): Promise<any>;
103
+ export declare function fetchPlaceDetail(placeId: string): Promise<any>;
104
+ export declare function fetchTextSearch(params: MFTextSearchParams): Promise<any>;
105
+ export declare function fetchNearbySearch(params: MFNearbySearchParams): Promise<any>;
106
+ export declare function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<any>;
107
+ export declare function fetchGeocode(params: MFGeocodeParams): Promise<any>;
108
+ export declare function fetchDirections(params: MFDirectionsParams): Promise<any>;
109
+ export declare function fetchRouteETA(params: MFRouteETAParams): Promise<any>;
110
+ export declare function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<any>;
111
+ export declare function fetchGraphRoute(params: MFGraphRouteParams): Promise<any>;