@maplibre/maplibre-react-native 10.0.0-beta.1 → 10.0.0-beta.11

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 (259) hide show
  1. package/README.md +36 -35
  2. package/android/build.gradle +98 -51
  3. package/android/gradle.properties +7 -0
  4. package/android/src/main/AndroidManifest.xml +4 -2
  5. package/android/src/main/AndroidManifestNew.xml +5 -0
  6. package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java +0 -5
  7. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java +11 -13
  8. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java +4 -11
  9. package/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java +1 -4
  10. package/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java +10 -11
  11. package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java +0 -66
  12. package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java +0 -28
  13. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java +3 -146
  14. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java +1 -3
  15. package/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java +80 -0
  16. package/ios/MLRN/MLRNBackgroundLayer.h +0 -1
  17. package/ios/MLRN/MLRNFillExtrusionLayer.h +0 -1
  18. package/ios/MLRN/MLRNFillLayer.h +0 -1
  19. package/ios/MLRN/MLRNFillLayer.m +1 -0
  20. package/ios/MLRN/MLRNLineLayer.h +0 -1
  21. package/ios/MLRN/MLRNMapView.h +1 -1
  22. package/ios/MLRN/MLRNMapView.m +7 -7
  23. package/ios/MLRN/MLRNMapViewManager.m +1 -1
  24. package/ios/MLRN/MLRNModule.m +0 -139
  25. package/ios/MLRN/MLRNRasterLayer.h +0 -1
  26. package/ios/MLRN/MLRNShapeSource.h +0 -11
  27. package/ios/MLRN/MLRNShapeSource.m +0 -38
  28. package/ios/MLRN/MLRNShapeSourceManager.m +0 -68
  29. package/ios/MLRN/MLRNSymbolLayer.h +1 -7
  30. package/ios/MLRN/MLRNSymbolLayer.m +1 -89
  31. package/ios/MLRN/MLRNSymbolLayerManager.m +0 -1
  32. package/lib/commonjs/MLRNModule.js +7 -5
  33. package/lib/commonjs/MLRNModule.js.map +1 -1
  34. package/lib/commonjs/MapLibreRN.js +3 -15
  35. package/lib/commonjs/MapLibreRN.js.map +1 -1
  36. package/lib/commonjs/components/Annotation.js.map +1 -1
  37. package/lib/commonjs/components/Images.js +1 -5
  38. package/lib/commonjs/components/Images.js.map +1 -1
  39. package/lib/commonjs/components/MapView.js +15 -28
  40. package/lib/commonjs/components/MapView.js.map +1 -1
  41. package/lib/commonjs/components/ShapeSource.js +6 -38
  42. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  43. package/lib/commonjs/components/SymbolLayer.js +2 -17
  44. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  45. package/lib/commonjs/components/UserLocation.js.map +1 -1
  46. package/lib/commonjs/components/VectorSource.js +1 -11
  47. package/lib/commonjs/components/VectorSource.js.map +1 -1
  48. package/lib/commonjs/modules/offline/offlineManager.js +1 -1
  49. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
  50. package/lib/commonjs/types/MapLibreRNStyles.js +6 -0
  51. package/lib/commonjs/types/MapLibreRNStyles.js.map +1 -0
  52. package/lib/commonjs/utils/StyleValue.js +2 -2
  53. package/lib/commonjs/utils/StyleValue.js.map +1 -1
  54. package/lib/commonjs/utils/getStylePropertyType.js +252 -0
  55. package/lib/commonjs/utils/getStylePropertyType.js.map +1 -0
  56. package/lib/module/MLRNModule.js +3 -2
  57. package/lib/module/MLRNModule.js.map +1 -1
  58. package/lib/module/MapLibreRN.js +1 -5
  59. package/lib/module/MapLibreRN.js.map +1 -1
  60. package/lib/module/components/Annotation.js.map +1 -1
  61. package/lib/module/components/Images.js +1 -5
  62. package/lib/module/components/Images.js.map +1 -1
  63. package/lib/module/components/MapView.js +15 -28
  64. package/lib/module/components/MapView.js.map +1 -1
  65. package/lib/module/components/ShapeSource.js +5 -37
  66. package/lib/module/components/ShapeSource.js.map +1 -1
  67. package/lib/module/components/SymbolLayer.js +3 -18
  68. package/lib/module/components/SymbolLayer.js.map +1 -1
  69. package/lib/module/components/UserLocation.js.map +1 -1
  70. package/lib/module/components/VectorSource.js +1 -11
  71. package/lib/module/components/VectorSource.js.map +1 -1
  72. package/lib/module/modules/offline/offlineManager.js +1 -1
  73. package/lib/module/modules/offline/offlineManager.js.map +1 -1
  74. package/lib/module/types/MapLibreRNStyles.js +4 -0
  75. package/lib/module/types/MapLibreRNStyles.js.map +1 -0
  76. package/lib/module/utils/StyleValue.js +2 -2
  77. package/lib/module/utils/StyleValue.js.map +1 -1
  78. package/lib/module/utils/getStylePropertyType.js +248 -0
  79. package/lib/module/utils/getStylePropertyType.js.map +1 -0
  80. package/lib/typescript/commonjs/jest.config.d.ts +2 -0
  81. package/lib/typescript/commonjs/jest.config.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/src/MLRNModule.d.ts +3 -7
  83. package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/src/MapLibreRN.d.ts +5 -8
  85. package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/src/components/Annotation.d.ts +2 -2
  87. package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +2 -2
  89. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/components/Camera.d.ts +1 -1
  91. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +2 -2
  92. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +2 -2
  94. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/src/components/FillLayer.d.ts +2 -2
  96. package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +2 -2
  98. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/src/components/Light.d.ts +2 -2
  101. package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/src/components/LineLayer.d.ts +2 -2
  103. package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/src/components/MapView.d.ts +7 -11
  105. package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +2 -2
  107. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +1 -2
  109. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +2 -8
  111. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +2 -2
  114. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +1 -1
  116. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts +4 -14
  118. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts +960 -0
  120. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts +2 -2
  122. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +1 -0
  124. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -0
  126. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +1 -0
  128. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +1 -0
  130. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts +1 -1
  132. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts +35 -0
  134. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts.map +1 -0
  135. package/lib/typescript/module/jest.config.d.ts +2 -0
  136. package/lib/typescript/module/jest.config.d.ts.map +1 -0
  137. package/lib/typescript/module/src/MLRNModule.d.ts +3 -7
  138. package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
  139. package/lib/typescript/module/src/MapLibreRN.d.ts +5 -8
  140. package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
  141. package/lib/typescript/module/src/components/Annotation.d.ts +2 -2
  142. package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -1
  143. package/lib/typescript/module/src/components/BackgroundLayer.d.ts +2 -2
  144. package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -1
  145. package/lib/typescript/module/src/components/Camera.d.ts +1 -1
  146. package/lib/typescript/module/src/components/CircleLayer.d.ts +2 -2
  147. package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -1
  148. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +2 -2
  149. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -1
  150. package/lib/typescript/module/src/components/FillLayer.d.ts +2 -2
  151. package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -1
  152. package/lib/typescript/module/src/components/HeatmapLayer.d.ts +2 -2
  153. package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -1
  154. package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
  155. package/lib/typescript/module/src/components/Light.d.ts +2 -2
  156. package/lib/typescript/module/src/components/Light.d.ts.map +1 -1
  157. package/lib/typescript/module/src/components/LineLayer.d.ts +2 -2
  158. package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -1
  159. package/lib/typescript/module/src/components/MapView.d.ts +7 -11
  160. package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
  161. package/lib/typescript/module/src/components/RasterLayer.d.ts +2 -2
  162. package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -1
  163. package/lib/typescript/module/src/components/ShapeSource.d.ts +1 -2
  164. package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
  165. package/lib/typescript/module/src/components/SymbolLayer.d.ts +2 -8
  166. package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -1
  167. package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
  168. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +2 -2
  169. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -1
  170. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +1 -1
  171. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -1
  172. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts +4 -14
  173. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +1 -1
  174. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts +960 -0
  175. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +1 -0
  176. package/lib/typescript/module/src/utils/StyleValue.d.ts +2 -2
  177. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -1
  178. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +1 -0
  179. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  180. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -0
  181. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  182. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +1 -0
  183. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  184. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +1 -0
  185. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  186. package/lib/typescript/module/src/utils/filterUtils.d.ts +1 -1
  187. package/lib/typescript/module/src/utils/filterUtils.d.ts.map +1 -1
  188. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts +35 -0
  189. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts.map +1 -0
  190. package/package.json +31 -38
  191. package/plugin/build/withMapLibre.js +6 -6
  192. package/src/MLRNModule.ts +16 -10
  193. package/src/MapLibreRN.ts +22 -23
  194. package/src/components/Annotation.tsx +3 -3
  195. package/src/components/BackgroundLayer.tsx +2 -2
  196. package/src/components/Camera.tsx +1 -1
  197. package/src/components/CircleLayer.tsx +2 -2
  198. package/src/components/FillExtrusionLayer.tsx +2 -2
  199. package/src/components/FillLayer.tsx +2 -2
  200. package/src/components/HeatmapLayer.tsx +2 -2
  201. package/src/components/Images.tsx +1 -10
  202. package/src/components/Light.tsx +2 -2
  203. package/src/components/LineLayer.tsx +2 -2
  204. package/src/components/MapView.tsx +20 -44
  205. package/src/components/RasterLayer.tsx +2 -2
  206. package/src/components/ShapeSource.tsx +9 -77
  207. package/src/components/SymbolLayer.tsx +7 -35
  208. package/src/components/UserLocation.tsx +2 -2
  209. package/src/components/VectorSource.tsx +5 -21
  210. package/src/hooks/useAbstractLayer.ts +3 -3
  211. package/src/modules/offline/OfflinePack.ts +1 -1
  212. package/src/modules/offline/offlineManager.ts +4 -18
  213. package/src/{utils/MapLibreRNStyles.d.ts → types/MapLibreRNStyles.ts} +85 -405
  214. package/src/utils/StyleValue.ts +4 -4
  215. package/src/utils/filterUtils.ts +1 -1
  216. package/src/utils/getStylePropertyType.ts +265 -0
  217. package/android/install.md +0 -32
  218. package/android/src/main/res/values/strings.xml +0 -3
  219. package/ios/install.md +0 -49
  220. package/lib/commonjs/components/Style.js +0 -266
  221. package/lib/commonjs/components/Style.js.map +0 -1
  222. package/lib/commonjs/types/StyleURL.js +0 -11
  223. package/lib/commonjs/types/StyleURL.js.map +0 -1
  224. package/lib/commonjs/utils/MapLibreRNStyles.d.js +0 -181
  225. package/lib/commonjs/utils/MapLibreRNStyles.d.js.map +0 -1
  226. package/lib/commonjs/utils/deprecation.js +0 -31
  227. package/lib/commonjs/utils/deprecation.js.map +0 -1
  228. package/lib/commonjs/utils/styleMap.js +0 -255
  229. package/lib/commonjs/utils/styleMap.js.map +0 -1
  230. package/lib/module/components/Style.js +0 -261
  231. package/lib/module/components/Style.js.map +0 -1
  232. package/lib/module/types/StyleURL.js +0 -7
  233. package/lib/module/types/StyleURL.js.map +0 -1
  234. package/lib/module/utils/MapLibreRNStyles.d.js +0 -180
  235. package/lib/module/utils/MapLibreRNStyles.d.js.map +0 -1
  236. package/lib/module/utils/deprecation.js +0 -27
  237. package/lib/module/utils/deprecation.js.map +0 -1
  238. package/lib/module/utils/styleMap.js +0 -249
  239. package/lib/module/utils/styleMap.js.map +0 -1
  240. package/lib/typescript/commonjs/src/components/Style.d.ts +0 -81
  241. package/lib/typescript/commonjs/src/components/Style.d.ts.map +0 -1
  242. package/lib/typescript/commonjs/src/types/StyleURL.d.ts +0 -4
  243. package/lib/typescript/commonjs/src/types/StyleURL.d.ts.map +0 -1
  244. package/lib/typescript/commonjs/src/utils/deprecation.d.ts +0 -6
  245. package/lib/typescript/commonjs/src/utils/deprecation.d.ts.map +0 -1
  246. package/lib/typescript/commonjs/src/utils/styleMap.d.ts +0 -231
  247. package/lib/typescript/commonjs/src/utils/styleMap.d.ts.map +0 -1
  248. package/lib/typescript/module/src/components/Style.d.ts +0 -81
  249. package/lib/typescript/module/src/components/Style.d.ts.map +0 -1
  250. package/lib/typescript/module/src/types/StyleURL.d.ts +0 -4
  251. package/lib/typescript/module/src/types/StyleURL.d.ts.map +0 -1
  252. package/lib/typescript/module/src/utils/deprecation.d.ts +0 -6
  253. package/lib/typescript/module/src/utils/deprecation.d.ts.map +0 -1
  254. package/lib/typescript/module/src/utils/styleMap.d.ts +0 -231
  255. package/lib/typescript/module/src/utils/styleMap.d.ts.map +0 -1
  256. package/src/components/Style.tsx +0 -371
  257. package/src/types/StyleURL.ts +0 -3
  258. package/src/utils/deprecation.ts +0 -31
  259. package/src/utils/styleMap.ts +0 -265
@@ -179,11 +179,6 @@ public class MLRNShapeSourceManager extends AbstractEventEmitter<MLRNShapeSource
179
179
  public static final int METHOD_GET_CLUSTER_LEAVES = 105;
180
180
  public static final int METHOD_GET_CLUSTER_CHILDREN = 106;
181
181
 
182
- // Deprecated. Will be removed in 9+ ver.
183
- public static final int METHOD_GET_CLUSTER_EXPANSION_ZOOM_BY_ID = 107;
184
- public static final int METHOD_GET_CLUSTER_LEAVES_BY_ID = 108;
185
- public static final int METHOD_GET_CLUSTER_CHILDREN_BY_ID = 109;
186
-
187
182
  @Nullable
188
183
  @Override
189
184
  public Map<String, Integer> getCommandsMap() {
@@ -192,12 +187,6 @@ public class MLRNShapeSourceManager extends AbstractEventEmitter<MLRNShapeSource
192
187
  .put("getClusterExpansionZoom", METHOD_GET_CLUSTER_EXPANSION_ZOOM)
193
188
  .put("getClusterLeaves", METHOD_GET_CLUSTER_LEAVES)
194
189
  .put("getClusterChildren", METHOD_GET_CLUSTER_CHILDREN)
195
-
196
- // Deprecated. Will be removed in 9+ ver.
197
- .put("getClusterExpansionZoomById", METHOD_GET_CLUSTER_EXPANSION_ZOOM_BY_ID)
198
- .put("getClusterLeavesById", METHOD_GET_CLUSTER_LEAVES_BY_ID)
199
- .put("getClusterChildrenById", METHOD_GET_CLUSTER_CHILDREN_BY_ID)
200
-
201
190
  .build();
202
191
  }
203
192
 
@@ -227,23 +216,6 @@ public class MLRNShapeSourceManager extends AbstractEventEmitter<MLRNShapeSource
227
216
  args.getString(1)
228
217
  );
229
218
  break;
230
- case METHOD_GET_CLUSTER_EXPANSION_ZOOM_BY_ID:
231
- source.getClusterExpansionZoomById(args.getString(0), args.getInt(1));
232
- break;
233
- case METHOD_GET_CLUSTER_LEAVES_BY_ID:
234
- source.getClusterLeavesById(
235
- args.getString(0),
236
- args.getInt(1),
237
- args.getInt(2),
238
- args.getInt((3))
239
- );
240
- break;
241
- case METHOD_GET_CLUSTER_CHILDREN_BY_ID:
242
- source.getClusterChildrenById(
243
- args.getString(0),
244
- args.getInt(1)
245
- );
246
- break;
247
219
  }
248
220
  }
249
221
  }
@@ -11,9 +11,7 @@ import com.facebook.react.common.MapBuilder;
11
11
  import com.facebook.react.module.annotations.ReactModule;
12
12
  import org.maplibre.android.MapLibre;
13
13
  import org.maplibre.android.WellKnownTileServer;
14
- import org.maplibre.android.style.layers.Property;
15
14
  import org.maplibre.reactnative.components.camera.constants.CameraMode;
16
- import org.maplibre.reactnative.components.styles.MLRNStyleValue;
17
15
  import org.maplibre.reactnative.components.styles.sources.MLRNSource;
18
16
  import org.maplibre.reactnative.events.constants.EventTypes;
19
17
  import org.maplibre.reactnative.http.CustomHeadersInterceptor;
@@ -34,6 +32,8 @@ import javax.annotation.Nullable;
34
32
  public class MLRNModule extends ReactContextBaseJavaModule {
35
33
  public static final String REACT_CLASS = "MLRNModule";
36
34
 
35
+ public static final String DEFAULT_STYLE_URL = "https://demotiles.maplibre.org/style.json";
36
+
37
37
  private static boolean customHeaderInterceptorAdded = false;
38
38
 
39
39
  private Handler mUiThreadHandler;
@@ -54,7 +54,7 @@ public class MLRNModule extends ReactContextBaseJavaModule {
54
54
  public Map<String, Object> getConstants() {
55
55
  // map style urls
56
56
  Map<String, String> styleURLS = new HashMap<>();
57
- styleURLS.put("Default", "https://demotiles.maplibre.org/style.json");
57
+ styleURLS.put("Default", DEFAULT_STYLE_URL);
58
58
 
59
59
  // events
60
60
  Map<String, String> eventTypes = new HashMap<>();
@@ -99,127 +99,6 @@ public class MLRNModule extends ReactContextBaseJavaModule {
99
99
  Map<String, String> styleSourceConsts = new HashMap<>();
100
100
  styleSourceConsts.put("DefaultSourceID", MLRNSource.DEFAULT_ID);
101
101
 
102
- // interpolation modes
103
- Map<String, Integer> interpolationModes = new HashMap<>();
104
- interpolationModes.put("Exponential", MLRNStyleValue.InterpolationModeExponential);
105
- interpolationModes.put("Categorical", MLRNStyleValue.InterpolationModeCategorical);
106
- interpolationModes.put("Interval", MLRNStyleValue.InterpolationModeInterval);
107
- interpolationModes.put("Identity", MLRNStyleValue.InterpolationModeIdentity);
108
-
109
- // line layer constants
110
- Map<String, String> lineJoin = new HashMap<>();
111
- lineJoin.put("Bevel", Property.LINE_JOIN_BEVEL);
112
- lineJoin.put("Round", Property.LINE_JOIN_ROUND);
113
- lineJoin.put("Miter", Property.LINE_JOIN_MITER);
114
-
115
- Map<String, String> lineCap = new HashMap<>();
116
- lineCap.put("Butt", Property.LINE_CAP_BUTT);
117
- lineCap.put("Round", Property.LINE_CAP_ROUND);
118
- lineCap.put("Square", Property.LINE_CAP_SQUARE);
119
-
120
- Map<String, String> lineTranslateAnchor = new HashMap<>();
121
- lineTranslateAnchor.put("Map", Property.LINE_TRANSLATE_ANCHOR_MAP);
122
- lineTranslateAnchor.put("Viewport", Property.LINE_TRANSLATE_ANCHOR_VIEWPORT);
123
-
124
- // circle layer constants
125
- Map<String, String> circlePitchScale = new HashMap<>();
126
- circlePitchScale.put("Map", Property.CIRCLE_PITCH_SCALE_MAP);
127
- circlePitchScale.put("Viewport", Property.CIRCLE_PITCH_SCALE_VIEWPORT);
128
-
129
- Map<String, String> circleTranslateAnchor = new HashMap<>();
130
- circleTranslateAnchor.put("Map", Property.CIRCLE_TRANSLATE_ANCHOR_MAP);
131
- circleTranslateAnchor.put("Viewport", Property.CIRCLE_TRANSLATE_ANCHOR_VIEWPORT);
132
-
133
- Map<String, String> circlePitchAlignment = new HashMap<>();
134
- circlePitchAlignment.put("Map", Property.CIRCLE_PITCH_ALIGNMENT_MAP);
135
- circlePitchAlignment.put("Viewport", Property.CIRCLE_PITCH_ALIGNMENT_VIEWPORT);
136
-
137
- // fill extrusion layer constants
138
- Map<String, String> fillExtrusionTranslateAnchor = new HashMap<>();
139
- fillExtrusionTranslateAnchor.put("Map", Property.FILL_EXTRUSION_TRANSLATE_ANCHOR_MAP);
140
- fillExtrusionTranslateAnchor.put("Viewport", Property.FILL_EXTRUSION_TRANSLATE_ANCHOR_VIEWPORT);
141
-
142
- // fill layer constants
143
- Map<String, String> fillTranslateAnchor = new HashMap<>();
144
- fillTranslateAnchor.put("Map", Property.FILL_TRANSLATE_ANCHOR_MAP);
145
- fillTranslateAnchor.put("Viewport", Property.FILL_TRANSLATE_ANCHOR_VIEWPORT);
146
-
147
- // symbol layer constants
148
- Map<String, String> iconRotationAlignment = new HashMap<>();
149
- iconRotationAlignment.put("Auto", Property.ICON_ROTATION_ALIGNMENT_AUTO);
150
- iconRotationAlignment.put("Map", Property.ICON_ROTATION_ALIGNMENT_MAP);
151
- iconRotationAlignment.put("Viewport", Property.ICON_ROTATION_ALIGNMENT_VIEWPORT);
152
-
153
- Map<String, String> iconTextFit = new HashMap<>();
154
- iconTextFit.put("None", Property.ICON_TEXT_FIT_NONE);
155
- iconTextFit.put("Width", Property.ICON_TEXT_FIT_WIDTH);
156
- iconTextFit.put("Height", Property.ICON_TEXT_FIT_HEIGHT);
157
- iconTextFit.put("Both", Property.ICON_TEXT_FIT_BOTH);
158
-
159
- Map<String, String> iconAnchor = new HashMap<>();
160
- iconAnchor.put("Center", Property.ICON_ANCHOR_CENTER);
161
- iconAnchor.put("Left", Property.ICON_ANCHOR_LEFT);
162
- iconAnchor.put("Right", Property.ICON_ANCHOR_RIGHT);
163
- iconAnchor.put("Top", Property.ICON_ANCHOR_TOP);
164
- iconAnchor.put("Bottom", Property.ICON_ANCHOR_BOTTOM);
165
- iconAnchor.put("TopLeft", Property.ICON_ANCHOR_TOP_LEFT);
166
- iconAnchor.put("TopRight", Property.ICON_ANCHOR_TOP_RIGHT);
167
- iconAnchor.put("BottomLeft", Property.ICON_ANCHOR_BOTTOM_LEFT);
168
- iconAnchor.put("BottomRight", Property.ICON_ANCHOR_BOTTOM_RIGHT);
169
-
170
- Map<String, String> iconPitchAlignment = new HashMap<>();
171
- iconPitchAlignment.put("Auto", Property.ICON_PITCH_ALIGNMENT_AUTO);
172
- iconPitchAlignment.put("Map", Property.ICON_PITCH_ALIGNMENT_MAP);
173
- iconPitchAlignment.put("Viewport", Property.ICON_PITCH_ALIGNMENT_VIEWPORT);
174
-
175
- Map<String, String> iconTranslateAnchor = new HashMap<>();
176
- iconTranslateAnchor.put("Map", Property.ICON_TRANSLATE_ANCHOR_MAP);
177
- iconTranslateAnchor.put("Viewport", Property.ICON_TRANSLATE_ANCHOR_VIEWPORT);
178
-
179
- Map<String, String> symbolPlacement = new HashMap<>();
180
- symbolPlacement.put("Line", Property.SYMBOL_PLACEMENT_LINE);
181
- symbolPlacement.put("Point", Property.SYMBOL_PLACEMENT_POINT);
182
-
183
- Map<String, String> textAnchor = new HashMap<>();
184
- textAnchor.put("Center", Property.TEXT_ANCHOR_CENTER);
185
- textAnchor.put("Left", Property.TEXT_ANCHOR_LEFT);
186
- textAnchor.put("Right", Property.TEXT_ANCHOR_RIGHT);
187
- textAnchor.put("Top", Property.TEXT_ANCHOR_TOP);
188
- textAnchor.put("Bottom", Property.TEXT_ANCHOR_BOTTOM);
189
- textAnchor.put("TopLeft", Property.TEXT_ANCHOR_TOP_LEFT);
190
- textAnchor.put("TopRight", Property.TEXT_ANCHOR_TOP_RIGHT);
191
- textAnchor.put("BottomLeft", Property.TEXT_ANCHOR_BOTTOM_LEFT);
192
- textAnchor.put("BottomRight", Property.TEXT_ANCHOR_BOTTOM_RIGHT);
193
-
194
- Map<String, String> textJustify = new HashMap<>();
195
- textJustify.put("Center", Property.TEXT_JUSTIFY_CENTER);
196
- textJustify.put("Left", Property.TEXT_JUSTIFY_LEFT);
197
- textJustify.put("Right", Property.TEXT_JUSTIFY_RIGHT);
198
-
199
- Map<String, String> textPitchAlignment = new HashMap<>();
200
- textPitchAlignment.put("Auto", Property.TEXT_PITCH_ALIGNMENT_AUTO);
201
- textPitchAlignment.put("Map", Property.TEXT_PITCH_ALIGNMENT_MAP);
202
- textPitchAlignment.put("Viewport", Property.TEXT_PITCH_ALIGNMENT_VIEWPORT);
203
-
204
- Map<String, String> textRotationAlignment = new HashMap<>();
205
- textRotationAlignment.put("Auto", Property.TEXT_ROTATION_ALIGNMENT_AUTO);
206
- textRotationAlignment.put("Map", Property.TEXT_ROTATION_ALIGNMENT_MAP);
207
- textRotationAlignment.put("Viewport", Property.TEXT_ROTATION_ALIGNMENT_VIEWPORT);
208
-
209
- Map<String, String> textTransform = new HashMap<>();
210
- textTransform.put("None", Property.TEXT_TRANSFORM_NONE);
211
- textTransform.put("Lowercase", Property.TEXT_TRANSFORM_LOWERCASE);
212
- textTransform.put("Uppercase", Property.TEXT_TRANSFORM_UPPERCASE);
213
-
214
- Map<String, String> textTranslateAnchor = new HashMap<>();
215
- textTranslateAnchor.put("Map", Property.TEXT_TRANSLATE_ANCHOR_MAP);
216
- textTranslateAnchor.put("Viewport", Property.TEXT_TRANSLATE_ANCHOR_VIEWPORT);
217
-
218
- // light constants
219
- Map<String, String> lightAnchor = new HashMap<>();
220
- lightAnchor.put("Map", Property.ANCHOR_MAP);
221
- lightAnchor.put("Viewport", Property.ANCHOR_VIEWPORT);
222
-
223
102
  // offline region download states
224
103
  Map<String, Integer> offlinePackDownloadStates = new HashMap<>();
225
104
  offlinePackDownloadStates.put("Inactive", MLRNOfflineModule.INACTIVE_REGION_DOWNLOAD_STATE);
@@ -242,28 +121,6 @@ public class MLRNModule extends ReactContextBaseJavaModule {
242
121
  .put("UserLocationVerticalAlignment", userLocationVerticalAlignment)
243
122
  .put("CameraModes", cameraModes)
244
123
  .put("StyleSource", styleSourceConsts)
245
- .put("InterpolationMode", interpolationModes)
246
- .put("LineJoin", lineJoin)
247
- .put("LineCap", lineCap)
248
- .put("LineTranslateAnchor", lineTranslateAnchor)
249
- .put("CirclePitchScale", circlePitchScale)
250
- .put("CircleTranslateAnchor", circleTranslateAnchor)
251
- .put("CirclePitchAlignment", circlePitchAlignment)
252
- .put("FillExtrusionTranslateAnchor", fillExtrusionTranslateAnchor)
253
- .put("FillTranslateAnchor", fillTranslateAnchor)
254
- .put("IconRotationAlignment", iconRotationAlignment)
255
- .put("IconTextFit", iconTextFit)
256
- .put("IconTranslateAnchor", iconTranslateAnchor)
257
- .put("SymbolPlacement", symbolPlacement)
258
- .put("IconAnchor", iconAnchor)
259
- .put("TextAnchor", textAnchor)
260
- .put("TextJustify", textJustify)
261
- .put("IconPitchAlignment", iconPitchAlignment)
262
- .put("TextPitchAlignment", textPitchAlignment)
263
- .put("TextRotationAlignment", textRotationAlignment)
264
- .put("TextTransform", textTransform)
265
- .put("TextTranslateAnchor", textTranslateAnchor)
266
- .put("LightAnchor", lightAnchor)
267
124
  .put("OfflinePackDownloadState", offlinePackDownloadStates)
268
125
  .put("OfflineCallbackName", offlineModuleCallbackNames)
269
126
  .put("LocationCallbackName", locationModuleCallbackNames)
@@ -9,7 +9,6 @@ import com.facebook.react.bridge.*;
9
9
  import com.facebook.react.module.annotations.ReactModule;
10
10
  import com.facebook.react.modules.core.RCTNativeAppEventEmitter;
11
11
  import org.maplibre.geojson.FeatureCollection;
12
- // import org.maplibre.android.constants.Style;
13
12
  import org.maplibre.android.geometry.LatLngBounds;
14
13
  import org.maplibre.android.offline.OfflineManager;
15
14
  import org.maplibre.android.offline.OfflineRegion;
@@ -43,7 +42,6 @@ public class MLRNOfflineModule extends ReactContextBaseJavaModule {
43
42
  public static final String OFFLINE_ERROR = "MapboxOfflineRegionError";
44
43
  public static final String OFFLINE_PROGRESS = "MapboxOfflineRegionProgress";
45
44
 
46
- public static final String DEFAULT_STYLE_URL = "https://demotiles.maplibre.org/style.json";
47
45
  public static final Double DEFAULT_MIN_ZOOM_LEVEL = 10.0;
48
46
  public static final Double DEFAULT_MAX_ZOOM_LEVEL = 20.0;
49
47
 
@@ -426,7 +424,7 @@ public class MLRNOfflineModule extends ReactContextBaseJavaModule {
426
424
 
427
425
  private OfflineRegionDefinition makeDefinition(LatLngBounds latLngBounds, ReadableMap options) {
428
426
  return new OfflineTilePyramidRegionDefinition(
429
- ConvertUtils.getString("styleURL", options, DEFAULT_STYLE_URL),
427
+ ConvertUtils.getString("styleURL", options, MLRNModule.DEFAULT_STYLE_URL),
430
428
  latLngBounds,
431
429
  ConvertUtils.getDouble("minZoom", options, DEFAULT_MIN_ZOOM_LEVEL),
432
430
  ConvertUtils.getDouble("maxZoom", options, DEFAULT_MAX_ZOOM_LEVEL),
@@ -10,9 +10,11 @@ import org.maplibre.geojson.Feature;
10
10
  import org.maplibre.geojson.FeatureCollection;
11
11
  import org.maplibre.geojson.Geometry;
12
12
  import org.maplibre.geojson.GeometryCollection;
13
+ import org.maplibre.geojson.MultiLineString;
13
14
  import org.maplibre.geojson.LineString;
14
15
  import org.maplibre.geojson.MultiPoint;
15
16
  import org.maplibre.geojson.Point;
17
+ import org.maplibre.geojson.MultiPolygon;
16
18
  import org.maplibre.geojson.Polygon;
17
19
  import org.maplibre.android.geometry.LatLng;
18
20
  import org.maplibre.android.geometry.LatLngBounds;
@@ -48,6 +50,12 @@ public class GeoJSONUtils {
48
50
  return fromLineString((LineString) geometry);
49
51
  case "Polygon":
50
52
  return fromPolygon((Polygon) geometry);
53
+ case "MultiPoint":
54
+ return fromMultiPoint((MultiPoint) geometry);
55
+ case "MultiLineString":
56
+ return fromMultiLineString((MultiLineString) geometry);
57
+ case "MultiPolygon":
58
+ return fromMultiPolygon((MultiPolygon) geometry);
51
59
  default:
52
60
  return null;
53
61
  }
@@ -74,6 +82,27 @@ public class GeoJSONUtils {
74
82
  return map;
75
83
  }
76
84
 
85
+ public static WritableMap fromMultiPoint(MultiPoint multiPoint) {
86
+ WritableMap map = Arguments.createMap();
87
+ map.putString("type", "MultiPoint");
88
+ map.putArray("coordinates", getCoordinates(multiPoint));
89
+ return map;
90
+ }
91
+
92
+ public static WritableMap fromMultiLineString(MultiLineString multiLineString) {
93
+ WritableMap map = Arguments.createMap();
94
+ map.putString("type", "MultiLineString");
95
+ map.putArray("coordinates", getCoordinates(multiLineString));
96
+ return map;
97
+ }
98
+
99
+ public static WritableMap fromMultiPolygon(MultiPolygon multiPolygon) {
100
+ WritableMap map = Arguments.createMap();
101
+ map.putString("type", "MultiPolygon");
102
+ map.putArray("coordinates", getCoordinates(multiPolygon));
103
+ return map;
104
+ }
105
+
77
106
  public static WritableArray getCoordinates(Point point) {
78
107
  return Arguments.fromArray(pointToDoubleArray(point));
79
108
  }
@@ -110,6 +139,57 @@ public class GeoJSONUtils {
110
139
  return array;
111
140
  }
112
141
 
142
+ public static WritableArray getCoordinates(MultiPoint multiPoint) {
143
+ WritableArray array = Arguments.createArray();
144
+
145
+ List<Point> points = multiPoint.coordinates();
146
+ for (Point point : points) {
147
+ array.pushArray(Arguments.fromArray(pointToDoubleArray(point)));
148
+ }
149
+
150
+ return array;
151
+ }
152
+
153
+ public static WritableArray getCoordinates(MultiLineString multiLineString) {
154
+ WritableArray array = Arguments.createArray();
155
+
156
+ List<List<Point>> lines = multiLineString.coordinates();
157
+ for (List<Point> line : lines) {
158
+ WritableArray lineArray = Arguments.createArray();
159
+
160
+ for (Point point : line) {
161
+ lineArray.pushArray(Arguments.fromArray(pointToDoubleArray(point)));
162
+ }
163
+
164
+ array.pushArray(lineArray);
165
+ }
166
+
167
+ return array;
168
+ }
169
+
170
+ public static WritableArray getCoordinates(MultiPolygon multiPolygon) {
171
+ WritableArray array = Arguments.createArray();
172
+
173
+ List<List<List<Point>>> polygons = multiPolygon.coordinates();
174
+ for (List<List<Point>> polygon : polygons) {
175
+ WritableArray polygonArray = Arguments.createArray();
176
+
177
+ for (List<Point> ring : polygon) {
178
+ WritableArray ringArray = Arguments.createArray();
179
+
180
+ for (Point point : ring) {
181
+ ringArray.pushArray(Arguments.fromArray(pointToDoubleArray(point)));
182
+ }
183
+
184
+ polygonArray.pushArray(ringArray);
185
+ }
186
+
187
+ array.pushArray(polygonArray);
188
+ }
189
+
190
+ return array;
191
+ }
192
+
113
193
  public static WritableMap toPointFeature(LatLng latLng, WritableMap properties) {
114
194
  WritableMap map = new WritableNativeMap();
115
195
  map.putString("type", "Feature");
@@ -1,5 +1,4 @@
1
1
  #import "MLRNLayer.h"
2
- @import MapLibre;
3
2
 
4
3
  @interface MLRNBackgroundLayer : MLRNLayer
5
4
 
@@ -1,5 +1,4 @@
1
1
  #import "MLRNVectorLayer.h"
2
- @import MapLibre;
3
2
 
4
3
  @interface MLRNFillExtrusionLayer : MLRNVectorLayer
5
4
 
@@ -1,5 +1,4 @@
1
1
  #import "MLRNVectorLayer.h"
2
- @import MapLibre;
3
2
 
4
3
  @interface MLRNFillLayer : MLRNVectorLayer
5
4
 
@@ -1,5 +1,6 @@
1
1
  #import "MLRNFillLayer.h"
2
2
  #import "MLRNStyle.h"
3
+
3
4
  #import <React/RCTLog.h>
4
5
 
5
6
  @implementation MLRNFillLayer
@@ -1,5 +1,4 @@
1
1
  #import "MLRNVectorLayer.h"
2
- @import MapLibre;
3
2
 
4
3
  @interface MLRNLineLayer : MLRNVectorLayer
5
4
 
@@ -47,7 +47,7 @@ typedef void (^StyleLoadedBlock) (MLNStyle* __nonnull style);
47
47
  @property (nonatomic, assign) NSInteger *reactCompassViewPosition;
48
48
  @property (nonatomic, assign) CGPoint reactCompassViewMargins;
49
49
 
50
- @property (nonatomic, copy) NSString *reactStyleURL;
50
+ @property (nonatomic, copy) NSString *reactMapStyle;
51
51
  @property (nonatomic, assign) NSInteger reactPreferredFramesPerSecond;
52
52
 
53
53
  @property (nonatomic, assign) MLNCoordinateBounds maxBounds;
@@ -374,11 +374,11 @@ static double const M2PI = M_PI * 2;
374
374
  self.contentInset = UIEdgeInsetsMake(top, left, bottom, right);
375
375
  }
376
376
 
377
- - (void)setReactStyleURL:(NSString *)reactStyleURL
377
+ - (void)setReactMapStyle:(NSString *)reactMapStyle
378
378
  {
379
- _reactStyleURL = reactStyleURL;
379
+ _reactMapStyle = reactMapStyle;
380
380
  [self _removeAllSourcesFromMap];
381
- self.styleURL = [self _getStyleURLFromKey:_reactStyleURL];
381
+ self.styleURL = [self _getStyleURLFromKey:_reactMapStyle];
382
382
  }
383
383
 
384
384
  - (void)setReactPreferredFramesPerSecond:(NSInteger)reactPreferredFramesPerSecond
@@ -500,13 +500,13 @@ static double const M2PI = M_PI * 2;
500
500
  return nil;
501
501
  }
502
502
 
503
- - (NSURL*)_getStyleURLFromKey:(NSString *)styleURL
503
+ - (NSURL*)_getStyleURLFromKey:(NSString *)mapStyle
504
504
  {
505
- NSURL *url = [NSURL URLWithString:styleURL];
505
+ NSURL *url = [NSURL URLWithString:mapStyle];
506
506
  if (url) {
507
507
  return url;
508
- } else if (RCTJSONParse(styleURL, nil)) {
509
- return [MLRNUtils styleURLFromStyleJSON:styleURL];
508
+ } else if (RCTJSONParse(mapStyle, nil)) {
509
+ return [MLRNUtils styleURLFromStyleJSON:mapStyle];
510
510
  }
511
511
  return url;
512
512
  }
@@ -80,7 +80,7 @@ RCT_REMAP_VIEW_PROPERTY(compassViewPosition, reactCompassViewPosition, NSInteger
80
80
  RCT_REMAP_VIEW_PROPERTY(compassViewMargins, reactCompassViewMargins, CGPoint)
81
81
 
82
82
  RCT_REMAP_VIEW_PROPERTY(contentInset, reactContentInset, NSArray)
83
- RCT_REMAP_VIEW_PROPERTY(styleURL, reactStyleURL, NSString)
83
+ RCT_REMAP_VIEW_PROPERTY(mapStyle, reactMapStyle, NSString)
84
84
  RCT_REMAP_VIEW_PROPERTY(preferredFramesPerSecond, reactPreferredFramesPerSecond, NSInteger)
85
85
 
86
86
  RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
@@ -19,10 +19,6 @@ RCT_EXPORT_MODULE();
19
19
  {
20
20
  // style urls
21
21
  NSMutableDictionary *styleURLS = [[NSMutableDictionary alloc] init];
22
-
23
- for (MLNDefaultStyle* style in [MLNStyle predefinedStyles]) {
24
- [styleURLS setObject:[style.url absoluteString] forKey:style.name];
25
- }
26
22
  [styleURLS setObject:[[MLNStyle defaultStyleURL] absoluteString] forKey:@"Default"];
27
23
 
28
24
  // event types
@@ -71,120 +67,6 @@ RCT_EXPORT_MODULE();
71
67
  NSMutableDictionary *styleSourceConsts = [[NSMutableDictionary alloc] init];
72
68
  [styleSourceConsts setObject:DEFAULT_SOURCE_ID forKey:@"DefaultSourceID"];
73
69
 
74
- // line layer constants
75
- NSMutableDictionary *lineJoin = [[NSMutableDictionary alloc] init];
76
- [lineJoin setObject:@(MLNLineJoinBevel) forKey:@"Bevel"];
77
- [lineJoin setObject:@(MLNLineJoinRound) forKey:@"Round"];
78
- [lineJoin setObject:@(MLNLineJoinMiter) forKey:@"Miter"];
79
-
80
- NSMutableDictionary *lineCap = [[NSMutableDictionary alloc] init];
81
- [lineCap setObject:@(MLNLineCapButt) forKey:@"Butt"];
82
- [lineCap setObject:@(MLNLineCapRound) forKey:@"Round"];
83
- [lineCap setObject:@(MLNLineCapSquare) forKey:@"Square"];
84
-
85
- NSMutableDictionary *lineTranslateAnchor = [[NSMutableDictionary alloc] init];
86
- [lineTranslateAnchor setObject:@(MLNLineTranslationAnchorMap) forKey:@"Map"];
87
- [lineTranslateAnchor setObject:@(MLNLineTranslationAnchorViewport) forKey:@"Viewport"];
88
-
89
- // circle layer constants
90
- NSMutableDictionary *circlePitchScale = [[NSMutableDictionary alloc] init];
91
- [circlePitchScale setObject:@(MLNCircleScaleAlignmentMap) forKey:@"Map"];
92
- [circlePitchScale setObject:@(MLNCircleScaleAlignmentViewport) forKey:@"Viewport"];
93
-
94
- NSMutableDictionary *circlePitchAlignment = [[NSMutableDictionary alloc] init];
95
- [circlePitchAlignment setObject:@(MLNCirclePitchAlignmentMap) forKey:@"Map"];
96
- [circlePitchAlignment setObject:@(MLNCirclePitchAlignmentViewport) forKey:@"Viewport"];
97
-
98
- NSMutableDictionary *circleTranslateAnchor = [[NSMutableDictionary alloc] init];
99
- [circleTranslateAnchor setObject:@(MLNCircleTranslationAnchorMap) forKey:@"Map"];
100
- [circleTranslateAnchor setObject:@(MLNCircleTranslationAnchorViewport) forKey:@"Viewport"];
101
-
102
- // fill extrusion layer constants
103
- NSMutableDictionary *fillExtrusionTranslateAnchor = [[NSMutableDictionary alloc] init];
104
- [fillExtrusionTranslateAnchor setObject:@(MLNFillExtrusionTranslationAnchorMap) forKey:@"Map"];
105
- [fillExtrusionTranslateAnchor setObject:@(MLNFillExtrusionTranslationAnchorViewport) forKey:@"Viewport"];
106
-
107
- // fill layer constants
108
- NSMutableDictionary *fillTranslateAnchor = [[NSMutableDictionary alloc] init];
109
- [fillTranslateAnchor setObject:@(MLNFillTranslationAnchorMap) forKey:@"Map"];
110
- [fillTranslateAnchor setObject:@(MLNFillTranslationAnchorViewport) forKey:@"Viewport"];
111
-
112
- // symbol layer constants
113
- NSMutableDictionary *iconRotationAlignment = [[NSMutableDictionary alloc] init];
114
- [iconRotationAlignment setObject:@(MLNIconRotationAlignmentAuto) forKey:@"Auto"];
115
- [iconRotationAlignment setObject:@(MLNIconRotationAlignmentMap) forKey:@"Map"];
116
- [iconRotationAlignment setObject:@(MLNIconRotationAlignmentViewport) forKey:@"Viewport"];
117
-
118
- NSMutableDictionary *iconTextFit = [[NSMutableDictionary alloc] init];
119
- [iconTextFit setObject:@(MLNIconTextFitNone) forKey:@"None"];
120
- [iconTextFit setObject:@(MLNIconTextFitWidth) forKey:@"Width"];
121
- [iconTextFit setObject:@(MLNIconTextFitHeight) forKey:@"Height"];
122
- [iconTextFit setObject:@(MLNIconTextFitBoth) forKey:@"Both"];
123
-
124
- NSMutableDictionary *iconAnchor = [[NSMutableDictionary alloc] init];
125
- [iconAnchor setObject:@(MLNIconAnchorCenter) forKey:@"Center"];
126
- [iconAnchor setObject:@(MLNIconAnchorTop) forKey:@"Top"];
127
- [iconAnchor setObject:@(MLNIconAnchorBottom) forKey:@"Bottom"];
128
- [iconAnchor setObject:@(MLNIconAnchorLeft) forKey:@"Left"];
129
- [iconAnchor setObject:@(MLNIconAnchorRight) forKey:@"Right"];
130
- [iconAnchor setObject:@(MLNIconAnchorTopLeft) forKey:@"TopLeft"];
131
- [iconAnchor setObject:@(MLNIconAnchorTopRight) forKey:@"TopRight"];
132
- [iconAnchor setObject:@(MLNIconAnchorBottomLeft) forKey:@"BottomLeft"];
133
- [iconAnchor setObject:@(MLNIconAnchorBottomRight) forKey:@"BottomRight"];
134
-
135
- NSMutableDictionary *iconTranslateAnchor = [[NSMutableDictionary alloc] init];
136
- [iconTranslateAnchor setObject:@(MLNIconTranslationAnchorMap) forKey:@"Map"];
137
- [iconTranslateAnchor setObject:@(MLNIconTranslationAnchorViewport) forKey:@"Viewport"];
138
-
139
- NSMutableDictionary *iconPitchAlignment = [[NSMutableDictionary alloc] init];
140
- [iconPitchAlignment setObject:@(MLNIconPitchAlignmentAuto) forKey:@"Auto"];
141
- [iconPitchAlignment setObject:@(MLNIconPitchAlignmentMap) forKey:@"Map"];
142
- [iconPitchAlignment setObject:@(MLNIconPitchAlignmentViewport) forKey:@"Viewport"];
143
-
144
- NSMutableDictionary *symbolPlacement = [[NSMutableDictionary alloc] init];
145
- [symbolPlacement setObject:@(MLNSymbolPlacementLine) forKey:@"Line"];
146
- [symbolPlacement setObject:@(MLNSymbolPlacementPoint) forKey:@"Point"];
147
-
148
- NSMutableDictionary *textAnchor = [[NSMutableDictionary alloc] init];
149
- [textAnchor setObject:@(MLNTextAnchorCenter) forKey:@"Center"];
150
- [textAnchor setObject:@(MLNTextAnchorLeft) forKey:@"Left"];
151
- [textAnchor setObject:@(MLNTextAnchorRight) forKey:@"Right"];
152
- [textAnchor setObject:@(MLNTextAnchorTop) forKey:@"Top"];
153
- [textAnchor setObject:@(MLNTextAnchorBottom) forKey:@"Bottom"];
154
- [textAnchor setObject:@(MLNTextAnchorTopLeft) forKey:@"TopLeft"];
155
- [textAnchor setObject:@(MLNTextAnchorTopRight) forKey:@"TopRight"];
156
- [textAnchor setObject:@(MLNTextAnchorBottomLeft) forKey:@"BottomLeft"];
157
- [textAnchor setObject:@(MLNTextAnchorBottomRight) forKey:@"BottomRight"];
158
-
159
- NSMutableDictionary *textJustify = [[NSMutableDictionary alloc] init];
160
- [textJustify setObject:@(MLNTextJustificationCenter) forKey:@"Center"];
161
- [textJustify setObject:@(MLNTextJustificationLeft) forKey:@"Left"];
162
- [textJustify setObject:@(MLNTextJustificationRight) forKey:@"Right"];
163
-
164
- NSMutableDictionary *textPitchAlignment = [[NSMutableDictionary alloc] init];
165
- [textPitchAlignment setObject:@(MLNTextPitchAlignmentAuto) forKey:@"Auto"];
166
- [textPitchAlignment setObject:@(MLNTextPitchAlignmentMap) forKey:@"Map"];
167
- [textPitchAlignment setObject:@(MLNTextPitchAlignmentViewport) forKey:@"Viewport"];
168
-
169
- NSMutableDictionary *textRotationAlignment = [[NSMutableDictionary alloc] init];
170
- [textRotationAlignment setObject:@(MLNTextRotationAlignmentAuto) forKey:@"Auto"];
171
- [textRotationAlignment setObject:@(MLNTextRotationAlignmentMap) forKey:@"Map"];
172
- [textRotationAlignment setObject:@(MLNTextRotationAlignmentViewport) forKey:@"Viewport"];
173
-
174
- NSMutableDictionary *textTransform = [[NSMutableDictionary alloc] init];
175
- [textTransform setObject:@(MLNTextTransformNone) forKey:@"None"];
176
- [textTransform setObject:@(MLNTextTransformLowercase) forKey:@"Lowercase"];
177
- [textTransform setObject:@(MLNTextTransformUppercase) forKey:@"Uppercase"];
178
-
179
- NSMutableDictionary *textTranslateAnchor = [[NSMutableDictionary alloc] init];
180
- [textTranslateAnchor setObject:@(MLNTextTranslationAnchorMap) forKey:@"Map"];
181
- [textTranslateAnchor setObject:@(MLNTextTranslationAnchorViewport) forKey:@"Viewport"];
182
-
183
- // light constants
184
- NSMutableDictionary *lightAnchor = [[NSMutableDictionary alloc] init];
185
- [lightAnchor setObject:@(MLNLightAnchorMap) forKey:@"Map"];
186
- [lightAnchor setObject:@(MLNLightAnchorViewport) forKey:@"Viewport"];
187
-
188
70
  // offline module callback names
189
71
  NSMutableDictionary *offlineModuleCallbackNames = [[NSMutableDictionary alloc] init];
190
72
  [offlineModuleCallbackNames setObject:RCT_MAPBOX_OFFLINE_CALLBACK_ERROR forKey:@"Error"];
@@ -202,27 +84,6 @@ RCT_EXPORT_MODULE();
202
84
  @"UserLocationVerticalAlignment": userLocationVerticalAlignment,
203
85
  @"CameraModes": cameraModes,
204
86
  @"StyleSource": styleSourceConsts,
205
- @"LineJoin": lineJoin,
206
- @"LineCap": lineCap,
207
- @"LineTranslateAnchor": lineTranslateAnchor,
208
- @"CirclePitchScale": circlePitchScale,
209
- @"CircleTranslateAnchor": circleTranslateAnchor,
210
- @"CirclePitchAlignment": circlePitchAlignment,
211
- @"FillExtrusionTranslateAnchor": fillExtrusionTranslateAnchor,
212
- @"FillTranslateAnchor": fillTranslateAnchor,
213
- @"IconRotationAlignment": iconRotationAlignment,
214
- @"IconTextFit": iconTextFit,
215
- @"IconTranslateAnchor": iconTranslateAnchor,
216
- @"IconAnchor": iconAnchor,
217
- @"IconPitchAlignment": iconPitchAlignment,
218
- @"SymbolPlacement": symbolPlacement,
219
- @"TextAnchor": textAnchor,
220
- @"TextJustify": textJustify,
221
- @"TextPitchAlignment": textPitchAlignment,
222
- @"TextRotationAlignment": textRotationAlignment,
223
- @"TextTransform": textTransform,
224
- @"TextTranslateAnchor": textTranslateAnchor,
225
- @"LightAnchor": lightAnchor,
226
87
  @"OfflineCallbackName": offlineModuleCallbackNames,
227
88
  @"OfflinePackDownloadState": offlinePackDownloadState,
228
89
  @"LocationCallbackName": locationModuleEvents
@@ -1,5 +1,4 @@
1
1
  #import "MLRNLayer.h"
2
- @import MapLibre;
3
2
 
4
3
  @interface MLRNRasterLayer : MLRNLayer
5
4
 
@@ -31,15 +31,4 @@
31
31
 
32
32
  - (double)getClusterExpansionZoom:(nonnull NSString *)featureJSON;
33
33
 
34
- // Deprecated. Will be removed in 9+ ver.
35
- - (nonnull NSArray<id <MLNFeature>> *)getClusterLeavesById:(nonnull NSNumber *)clusterId
36
- number:(NSUInteger)number
37
- offset:(NSUInteger)offset;
38
-
39
- // Deprecated. Will be removed in 9+ ver.
40
- - (nonnull NSArray<id <MLNFeature>> *)getClusterChildrenById:(nonnull NSNumber *)clusterId;
41
-
42
- // Deprecated. Will be removed in 9+ ver.
43
- - (double)getClusterExpansionZoomById:(nonnull NSNumber *)clusterId;
44
-
45
34
  @end