@maplibre/maplibre-react-native 10.0.0-beta.17 → 10.0.0-beta.18
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/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java +24 -2
- package/ios/MLRN/MLRNModule.m +8 -0
- package/lib/commonjs/MLRNModule.js.map +1 -1
- package/lib/module/MLRNModule.js.map +1 -1
- package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
- package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/MLRNModule.ts +8 -0
|
@@ -44,6 +44,11 @@ public class MLRNModule extends ReactContextBaseJavaModule {
|
|
|
44
44
|
mReactContext = reactApplicationContext;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
@Override
|
|
48
|
+
public void initialize() {
|
|
49
|
+
initializeMapLibreInstance();
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
@Override
|
|
48
53
|
public String getName() {
|
|
49
54
|
return REACT_CLASS;
|
|
@@ -127,7 +132,11 @@ public class MLRNModule extends ReactContextBaseJavaModule {
|
|
|
127
132
|
.build();
|
|
128
133
|
}
|
|
129
134
|
|
|
130
|
-
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated This will be removed in the next major version.
|
|
137
|
+
* @see https://github.com/maplibre/maplibre-react-native/issues/25#issuecomment-1382382044
|
|
138
|
+
*/
|
|
139
|
+
@Deprecated
|
|
131
140
|
@ReactMethod
|
|
132
141
|
public void setAccessToken(final String accessToken) {
|
|
133
142
|
mReactContext.runOnUiQueueThread(new Runnable() {
|
|
@@ -170,7 +179,11 @@ public class MLRNModule extends ReactContextBaseJavaModule {
|
|
|
170
179
|
});
|
|
171
180
|
}
|
|
172
181
|
|
|
173
|
-
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated This will be removed in the next major version.
|
|
184
|
+
* @see https://github.com/maplibre/maplibre-react-native/issues/25#issuecomment-1382382044
|
|
185
|
+
*/
|
|
186
|
+
@Deprecated
|
|
174
187
|
@ReactMethod
|
|
175
188
|
public void getAccessToken(Promise promise) {
|
|
176
189
|
String token = MapLibre.getApiKey();
|
|
@@ -198,4 +211,13 @@ public class MLRNModule extends ReactContextBaseJavaModule {
|
|
|
198
211
|
dispatcher.setMaxRequestsPerHost(20);
|
|
199
212
|
return dispatcher;
|
|
200
213
|
}
|
|
214
|
+
|
|
215
|
+
private void initializeMapLibreInstance() {
|
|
216
|
+
mReactContext.runOnUiQueueThread(new Runnable() {
|
|
217
|
+
@Override
|
|
218
|
+
public void run() {
|
|
219
|
+
MapLibre.getInstance(getReactApplicationContext());
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
201
223
|
}
|
package/ios/MLRN/MLRNModule.m
CHANGED
|
@@ -90,6 +90,10 @@ RCT_EXPORT_MODULE();
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated This will be removed in the next major version.
|
|
95
|
+
* @see https://github.com/maplibre/maplibre-react-native/issues/25#issuecomment-1382382044
|
|
96
|
+
*/
|
|
93
97
|
RCT_EXPORT_METHOD(setAccessToken:(NSString *)accessToken)
|
|
94
98
|
{
|
|
95
99
|
if (accessToken.length > 0) {
|
|
@@ -107,6 +111,10 @@ RCT_EXPORT_METHOD(removeCustomHeader:(NSString *)headerName)
|
|
|
107
111
|
[MLRNCustomHeaders.sharedInstance removeHeader:headerName];
|
|
108
112
|
}
|
|
109
113
|
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated This will be removed in the next major version.
|
|
116
|
+
* @see https://github.com/maplibre/maplibre-react-native/issues/25#issuecomment-1382382044
|
|
117
|
+
*/
|
|
110
118
|
RCT_EXPORT_METHOD(getAccessToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
111
119
|
{
|
|
112
120
|
NSString* accessToken = MLNSettings.apiKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","MLRNModule","Object","create","NativeModules","CameraModes","OfflinePackDownloadState","StyleSource","StyleURL","setAccessToken","getAccessToken","addCustomHeader","removeCustomHeader","setConnected","exports"],"sourceRoot":"../../src","sources":["MLRNModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","MLRNModule","Object","create","NativeModules","CameraModes","OfflinePackDownloadState","StyleSource","StyleURL","setAccessToken","getAccessToken","addCustomHeader","removeCustomHeader","setConnected","exports"],"sourceRoot":"../../src","sources":["MLRNModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AA4CA,MAAMC,UAAuB,GAAGC,MAAM,CAACC,MAAM,CAACC,0BAAa,CAACH,UAAU,CAAC;AAEhE,MAAM;EACXI,WAAW;EACXC,wBAAwB;EACxBC,WAAW;EACXC,QAAQ;EAERC,cAAc;EACdC,cAAc;EAEdC,eAAe;EACfC,kBAAkB;EAElBC;AACF,CAAC,GAAGZ,UAAU;AAACa,OAAA,CAAAD,YAAA,GAAAA,YAAA;AAAAC,OAAA,CAAAF,kBAAA,GAAAA,kBAAA;AAAAE,OAAA,CAAAH,eAAA,GAAAA,eAAA;AAAAG,OAAA,CAAAJ,cAAA,GAAAA,cAAA;AAAAI,OAAA,CAAAL,cAAA,GAAAA,cAAA;AAAAK,OAAA,CAAAN,QAAA,GAAAA,QAAA;AAAAM,OAAA,CAAAP,WAAA,GAAAA,WAAA;AAAAO,OAAA,CAAAR,wBAAA,GAAAA,wBAAA;AAAAQ,OAAA,CAAAT,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","MLRNModule","Object","create","CameraModes","OfflinePackDownloadState","StyleSource","StyleURL","setAccessToken","getAccessToken","addCustomHeader","removeCustomHeader","setConnected"],"sourceRoot":"../../src","sources":["MLRNModule.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["NativeModules","MLRNModule","Object","create","CameraModes","OfflinePackDownloadState","StyleSource","StyleURL","setAccessToken","getAccessToken","addCustomHeader","removeCustomHeader","setConnected"],"sourceRoot":"../../src","sources":["MLRNModule.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AA4C5C,MAAMC,UAAuB,GAAGC,MAAM,CAACC,MAAM,CAACH,aAAa,CAACC,UAAU,CAAC;AAEvE,OAAO,MAAM;EACXG,WAAW;EACXC,wBAAwB;EACxBC,WAAW;EACXC,QAAQ;EAERC,cAAc;EACdC,cAAc;EAEdC,eAAe;EACfC,kBAAkB;EAElBC;AACF,CAAC,GAAGX,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLRNModule.d.ts","sourceRoot":"","sources":["../../../../src/MLRNModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"MLRNModule.d.ts","sourceRoot":"","sources":["../../../../src/MLRNModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA4ChD,eAAO,MACL,WAAW;YAzCD,UAAU,CAAC,MAAM;UACnB,UAAU,CAAC,IAAI;YACb,UAAU,CAAC,MAAM;UACnB,UAAU,CAAC,IAAI;GAuCvB,wBAAwB;cAnCZ,MAAM,GAAG,MAAM;YACjB,MAAM,GAAG,MAAM;cACb,MAAM,GAAG,MAAM;cACf,MAAM,GAAG,MAAM;GAiC3B,WAAW;qBA7BQ,MAAM;GA8BzB,QAAQ;aA1BG,MAAM;GA4BjB,cAAc,gBArBc,MAAM,GAAG,IAAI,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAsBlE,cAAc,QAjBI,OAAO,CAAC,MAAM,CAAC,EAmBjC,eAAe,eAjBa,MAAM,eAAe,MAAM,KAAG,IAAI,EAkB9D,kBAAkB,eAjBa,MAAM,KAAG,IAAI,EAmB5C,YAAY,cAjBY,OAAO,KAAG,IAkBtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLRNModule.d.ts","sourceRoot":"","sources":["../../../../src/MLRNModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"MLRNModule.d.ts","sourceRoot":"","sources":["../../../../src/MLRNModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA4ChD,eAAO,MACL,WAAW;YAzCD,UAAU,CAAC,MAAM;UACnB,UAAU,CAAC,IAAI;YACb,UAAU,CAAC,MAAM;UACnB,UAAU,CAAC,IAAI;GAuCvB,wBAAwB;cAnCZ,MAAM,GAAG,MAAM;YACjB,MAAM,GAAG,MAAM;cACb,MAAM,GAAG,MAAM;cACf,MAAM,GAAG,MAAM;GAiC3B,WAAW;qBA7BQ,MAAM;GA8BzB,QAAQ;aA1BG,MAAM;GA4BjB,cAAc,gBArBc,MAAM,GAAG,IAAI,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAsBlE,cAAc,QAjBI,OAAO,CAAC,MAAM,CAAC,EAmBjC,eAAe,eAjBa,MAAM,eAAe,MAAM,KAAG,IAAI,EAkB9D,kBAAkB,eAjBa,MAAM,KAAG,IAAI,EAmB5C,YAAY,cAjBY,OAAO,KAAG,IAkBtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplibre/maplibre-react-native",
|
|
3
3
|
"description": "React Native library for creating maps with MapLibre Native for Android & iOS",
|
|
4
|
-
"version": "10.0.0-beta.
|
|
4
|
+
"version": "10.0.0-beta.18",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": true
|
package/src/MLRNModule.ts
CHANGED
|
@@ -25,7 +25,15 @@ interface IMLRNModule {
|
|
|
25
25
|
Default: string;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated This will be removed in the next major version.
|
|
30
|
+
* @see https://github.com/maplibre/maplibre-react-native/issues/25#issuecomment-1382382044
|
|
31
|
+
*/
|
|
28
32
|
setAccessToken(accessToken: string | null): Promise<string | null>;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated This will be removed in the next major version.
|
|
35
|
+
* @see https://github.com/maplibre/maplibre-react-native/issues/25#issuecomment-1382382044
|
|
36
|
+
*/
|
|
29
37
|
getAccessToken(): Promise<string>;
|
|
30
38
|
|
|
31
39
|
addCustomHeader(headerName: string, headerValue: string): void;
|