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.
- package/LICENSE +21 -21
- package/README.md +24 -24
- package/android/build.gradle +60 -59
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/reactnativemap4dservices/Map4dServicesModule.java +91 -34
- package/android/src/main/java/com/reactnativemap4dservices/Map4dServicesPackage.java +28 -28
- package/android/src/main/java/com/reactnativemap4dservices/SClient.java +50 -0
- package/android/src/main/java/com/reactnativemap4dservices/SConverter.java +166 -0
- package/android/src/main/java/com/reactnativemap4dservices/SJsonUtils.java +130 -0
- package/android/src/main/java/com/reactnativemap4dservices/SRequest.java +376 -0
- package/ios/Map4dServices.h +5 -5
- package/ios/Map4dServices.m +81 -81
- package/ios/SClient.h +23 -23
- package/ios/SClient.m +47 -47
- package/ios/SParamConvert.h +44 -0
- package/ios/SParamConvert.m +229 -0
- package/ios/SRequest.h +40 -40
- package/ios/SRequest.m +142 -143
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +111 -111
- package/package.json +150 -150
- package/react-native-map4d-services.podspec +20 -20
- package/src/index.tsx +174 -174
- package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.1.1/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.1.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/ios/.DS_Store +0 -0
- package/ios/Map4dServices.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
- package/ios/RCTConvert+Services.h +0 -33
- 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 "
|
|
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 = [
|
|
19
|
-
params.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.
|
|
37
|
-
params.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
request
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
params.
|
|
50
|
-
params.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
request
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
params.
|
|
62
|
-
params.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
request
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
params.acronym = [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
request
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
MFLocationComponent *
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
params.
|
|
88
|
-
params.
|
|
89
|
-
params.
|
|
90
|
-
params.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
request
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
params.
|
|
104
|
-
params.
|
|
105
|
-
params.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
request.
|
|
109
|
-
request
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
NSArray<MFLocationComponent *> *
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
params.
|
|
120
|
-
params.
|
|
121
|
-
params.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
request
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
params.
|
|
134
|
-
params.
|
|
135
|
-
params.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
request
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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","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,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUT,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;IAsBYU,Y;;;WAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;GAAAA,Y,4BAAAA,Y;;IAOAC,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAMAC,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAKAC,W;;;WAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;GAAAA,W,2BAAAA,W;;AAwFL,SAASC,eAAT,CAAyBC,MAAzB,
|
|
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,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUT,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;IAsBYU,Y;;;WAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;GAAAA,Y,4BAAAA,Y;;IAOAC,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAMAC,gB;;;WAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,gCAAAA,gB;;IAKAC,W;;;WAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;GAAAA,W,2BAAAA,W;;AAwFL,SAASC,eAAT,CAAyBC,MAAzB,EAAmE;AACxE,SAAOV,aAAa,CAACS,eAAd,CAA8BC,MAA9B,CAAP;AACD;;AAEM,SAASC,gBAAT,CAA0BC,OAA1B,EAAyD;AAC9D,SAAOZ,aAAa,CAACW,gBAAd,CAA+BC,OAA/B,CAAP;AACD;;AAEM,SAASC,eAAT,CAAyBH,MAAzB,EAAmE;AACxE,SAAOV,aAAa,CAACa,eAAd,CAA8BH,MAA9B,CAAP;AACD;;AAEM,SAASI,iBAAT,CAA2BJ,MAA3B,EAAuE;AAC5E,SAAOV,aAAa,CAACc,iBAAd,CAAgCJ,MAAhC,CAAP;AACD;;AAEM,SAASK,kBAAT,CAA4BL,MAA5B,EAAyE;AAC9E,SAAOV,aAAa,CAACe,kBAAd,CAAiCL,MAAjC,CAAP;AACD;;AAEM,SAASM,YAAT,CAAsBN,MAAtB,EAA6D;AAClE,SAAOV,aAAa,CAACgB,YAAd,CAA2BN,MAA3B,CAAP;AACD;;AAEM,SAASO,eAAT,CAAyBP,MAAzB,EAAmE;AACxE,SAAOV,aAAa,CAACiB,eAAd,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}"]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -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,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,KAAJ,CAAUP,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAsBA,WAAYQ,YAAZ;;WAAYA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;GAAAA,Y,KAAAA,Y;;AAOZ,WAAYC,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAMZ,WAAYC,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAKZ,WAAYC,WAAZ;;WAAYA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;GAAAA,W,KAAAA,W;;AAwFZ,OAAO,SAASC,eAAT,CAAyBC,MAAzB,
|
|
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,KAAJ,CAAUP,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAsBA,WAAYQ,YAAZ;;WAAYA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;AAAAA,EAAAA,Y;GAAAA,Y,KAAAA,Y;;AAOZ,WAAYC,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAMZ,WAAYC,gBAAZ;;WAAYA,gB;AAAAA,EAAAA,gB;AAAAA,EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAKZ,WAAYC,WAAZ;;WAAYA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;GAAAA,W,KAAAA,W;;AAwFZ,OAAO,SAASC,eAAT,CAAyBC,MAAzB,EAAmE;AACxE,SAAOT,aAAa,CAACQ,eAAd,CAA8BC,MAA9B,CAAP;AACD;AAED,OAAO,SAASC,gBAAT,CAA0BC,OAA1B,EAAyD;AAC9D,SAAOX,aAAa,CAACU,gBAAd,CAA+BC,OAA/B,CAAP;AACD;AAED,OAAO,SAASC,eAAT,CAAyBH,MAAzB,EAAmE;AACxE,SAAOT,aAAa,CAACY,eAAd,CAA8BH,MAA9B,CAAP;AACD;AAED,OAAO,SAASI,iBAAT,CAA2BJ,MAA3B,EAAuE;AAC5E,SAAOT,aAAa,CAACa,iBAAd,CAAgCJ,MAAhC,CAAP;AACD;AAED,OAAO,SAASK,kBAAT,CAA4BL,MAA5B,EAAyE;AAC9E,SAAOT,aAAa,CAACc,kBAAd,CAAiCL,MAAjC,CAAP;AACD;AAED,OAAO,SAASM,YAAT,CAAsBN,MAAtB,EAA6D;AAClE,SAAOT,aAAa,CAACe,YAAd,CAA2BN,MAA3B,CAAP;AACD;AAED,OAAO,SAASO,eAAT,CAAyBP,MAAzB,EAAmE;AACxE,SAAOT,aAAa,CAACgB,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?:
|
|
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?:
|
|
57
|
-
};
|
|
58
|
-
export declare type MFViewboxSearchParams = {
|
|
59
|
-
viewbox: MFViewboxComponent;
|
|
60
|
-
text?: string;
|
|
61
|
-
types?: string[];
|
|
62
|
-
tags?: string[];
|
|
63
|
-
datetime?:
|
|
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<
|
|
103
|
-
export declare function fetchPlaceDetail(placeId: string): Promise<
|
|
104
|
-
export declare function fetchTextSearch(params: MFTextSearchParams): Promise<
|
|
105
|
-
export declare function fetchNearbySearch(params: MFNearbySearchParams): Promise<
|
|
106
|
-
export declare function fetchViewboxSearch(params: MFViewboxSearchParams): Promise<
|
|
107
|
-
export declare function fetchGeocode(params: MFGeocodeParams): Promise<
|
|
108
|
-
export declare function fetchDirections(params: MFDirectionsParams): Promise<
|
|
109
|
-
export declare function fetchRouteETA(params: MFRouteETAParams): Promise<
|
|
110
|
-
export declare function fetchDistanceMatrix(params: MFDistanceMatrixParams): Promise<
|
|
111
|
-
export declare function fetchGraphRoute(params: MFGraphRouteParams): Promise<
|
|
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>;
|