@maplibre/maplibre-react-native 10.0.0-beta.8 → 10.0.0

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 (548) hide show
  1. package/README.md +10 -54
  2. package/android/build.gradle +35 -12
  3. package/android/gradle.properties +14 -6
  4. package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java +37 -48
  5. package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java +16 -9
  6. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java +11 -13
  7. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java +4 -11
  8. package/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java +1 -4
  9. package/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java +10 -11
  10. package/android/src/main/java/org/maplibre/reactnative/location/LocationManager.java +7 -11
  11. package/android/src/main/java/org/maplibre/reactnative/location/engine/DefaultLocationEngineProvider.java +18 -0
  12. package/android/src/main/java/org/maplibre/reactnative/location/engine/LocationEngineProvidable.java +9 -0
  13. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java +27 -148
  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 +123 -18
  16. package/android/src/main/location-engine-default/org/maplibre/reactnative/location/engine/LocationEngineProvider.java +12 -0
  17. package/android/src/main/location-engine-google/org/maplibre/reactnative/location/engine/GoogleLocationEngineImpl.java +151 -0
  18. package/android/src/main/location-engine-google/org/maplibre/reactnative/location/engine/GoogleLocationEngineProvider.java +24 -0
  19. package/android/src/main/location-engine-google/org/maplibre/reactnative/location/engine/LocationEngineProvider.java +12 -0
  20. package/app.plugin.js +1 -1
  21. package/ios/MLRN/MLRNCamera.m +6 -7
  22. package/ios/MLRN/MLRNMapView.h +1 -1
  23. package/ios/MLRN/MLRNMapView.m +7 -7
  24. package/ios/MLRN/MLRNMapViewManager.m +1 -1
  25. package/ios/MLRN/MLRNModule.m +8 -139
  26. package/ios/MLRN/MLRNStyle.m +0 -40
  27. package/lib/commonjs/MLRNModule.js +3 -5
  28. package/lib/commonjs/MLRNModule.js.map +1 -1
  29. package/lib/commonjs/MapLibreRN.js +77 -59
  30. package/lib/commonjs/MapLibreRN.js.map +1 -1
  31. package/lib/commonjs/components/Annotation.js +7 -9
  32. package/lib/commonjs/components/Annotation.js.map +1 -1
  33. package/lib/commonjs/components/BackgroundLayer.js +6 -8
  34. package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
  35. package/lib/commonjs/components/Callout.js +2 -2
  36. package/lib/commonjs/components/Callout.js.map +1 -1
  37. package/lib/commonjs/components/Camera.js +111 -63
  38. package/lib/commonjs/components/Camera.js.map +1 -1
  39. package/lib/commonjs/components/CircleLayer.js +6 -8
  40. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  41. package/lib/commonjs/components/FillExtrusionLayer.js +6 -8
  42. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
  43. package/lib/commonjs/components/FillLayer.js +6 -8
  44. package/lib/commonjs/components/FillLayer.js.map +1 -1
  45. package/lib/commonjs/components/HeadingIndicator.js +4 -4
  46. package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
  47. package/lib/commonjs/components/HeatmapLayer.js +6 -8
  48. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  49. package/lib/commonjs/components/ImageSource.js +4 -5
  50. package/lib/commonjs/components/ImageSource.js.map +1 -1
  51. package/lib/commonjs/components/Images.js +2 -2
  52. package/lib/commonjs/components/Images.js.map +1 -1
  53. package/lib/commonjs/components/Light.js +4 -6
  54. package/lib/commonjs/components/Light.js.map +1 -1
  55. package/lib/commonjs/components/LineLayer.js +6 -8
  56. package/lib/commonjs/components/LineLayer.js.map +1 -1
  57. package/lib/commonjs/components/MapView.js +69 -76
  58. package/lib/commonjs/components/MapView.js.map +1 -1
  59. package/lib/commonjs/components/MarkerView.js +4 -5
  60. package/lib/commonjs/components/MarkerView.js.map +1 -1
  61. package/lib/commonjs/components/NativeUserLocation.js +2 -2
  62. package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
  63. package/lib/commonjs/components/PointAnnotation.js +7 -10
  64. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  65. package/lib/commonjs/components/RasterLayer.js +6 -8
  66. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  67. package/lib/commonjs/components/RasterSource.js +8 -10
  68. package/lib/commonjs/components/RasterSource.js.map +1 -1
  69. package/lib/commonjs/components/ShapeSource.js +6 -8
  70. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  71. package/lib/commonjs/components/SymbolLayer.js +6 -7
  72. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  73. package/lib/commonjs/components/UserLocation.js +21 -23
  74. package/lib/commonjs/components/UserLocation.js.map +1 -1
  75. package/lib/commonjs/components/VectorSource.js +8 -10
  76. package/lib/commonjs/components/VectorSource.js.map +1 -1
  77. package/lib/commonjs/hooks/useAbstractLayer.js +1 -1
  78. package/lib/commonjs/hooks/useAbstractLayer.js.map +1 -1
  79. package/lib/commonjs/hooks/useAbstractSource.js +1 -1
  80. package/lib/commonjs/hooks/useAbstractSource.js.map +1 -1
  81. package/lib/commonjs/hooks/useNativeBridge.js +2 -2
  82. package/lib/commonjs/hooks/useNativeBridge.js.map +1 -1
  83. package/lib/commonjs/hooks/useOnce.js +2 -2
  84. package/lib/commonjs/hooks/useOnce.js.map +1 -1
  85. package/lib/commonjs/index.js +3 -0
  86. package/lib/commonjs/index.js.map +1 -1
  87. package/lib/commonjs/modules/location/{locationManager.js → LocationManager.js} +10 -10
  88. package/lib/commonjs/modules/location/LocationManager.js.map +1 -0
  89. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -2
  90. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  91. package/lib/commonjs/modules/offline/{offlineManager.js → OfflineManager.js} +34 -36
  92. package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -0
  93. package/lib/commonjs/modules/offline/OfflinePack.js +2 -2
  94. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
  95. package/lib/commonjs/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +12 -14
  96. package/lib/commonjs/modules/snapshot/SnapshotManager.js.map +1 -0
  97. package/lib/commonjs/modules/snapshot/SnapshotOptions.js +3 -4
  98. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
  99. package/lib/commonjs/plugin/MapLibrePluginProps.js +2 -0
  100. package/lib/commonjs/plugin/MapLibrePluginProps.js.map +1 -0
  101. package/lib/commonjs/plugin/android.js +41 -0
  102. package/lib/commonjs/plugin/android.js.map +1 -0
  103. package/lib/commonjs/plugin/ios.js +131 -0
  104. package/lib/commonjs/plugin/ios.js.map +1 -0
  105. package/lib/commonjs/plugin/withMapLibre.js +31 -0
  106. package/lib/commonjs/plugin/withMapLibre.js.map +1 -0
  107. package/lib/commonjs/types/MapLibreRNStyles.js +6 -0
  108. package/lib/commonjs/types/MapLibreRNStyles.js.map +1 -0
  109. package/lib/commonjs/utils/BridgeValue.js +2 -2
  110. package/lib/commonjs/utils/BridgeValue.js.map +1 -1
  111. package/lib/commonjs/utils/Logger.js +2 -2
  112. package/lib/commonjs/utils/Logger.js.map +1 -1
  113. package/lib/commonjs/utils/StyleValue.js +4 -5
  114. package/lib/commonjs/utils/StyleValue.js.map +1 -1
  115. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  116. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  117. package/lib/commonjs/utils/animated/Animated.js +29 -31
  118. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  119. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +4 -5
  120. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
  121. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +2 -2
  122. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  123. package/lib/commonjs/utils/animated/AnimatedPoint.js +1 -2
  124. package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -1
  125. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +4 -4
  126. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  127. package/lib/commonjs/utils/animated/AnimatedShape.js +2 -2
  128. package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -1
  129. package/lib/commonjs/utils/getStylePropertyType.js +252 -0
  130. package/lib/commonjs/utils/getStylePropertyType.js.map +1 -0
  131. package/lib/module/MLRNModule.js +1 -2
  132. package/lib/module/MLRNModule.js.map +1 -1
  133. package/lib/module/MapLibreRN.js +40 -28
  134. package/lib/module/MapLibreRN.js.map +1 -1
  135. package/lib/module/components/Annotation.js +5 -6
  136. package/lib/module/components/Annotation.js.map +1 -1
  137. package/lib/module/components/BackgroundLayer.js +4 -6
  138. package/lib/module/components/BackgroundLayer.js.map +1 -1
  139. package/lib/module/components/Callout.js +2 -3
  140. package/lib/module/components/Callout.js.map +1 -1
  141. package/lib/module/components/Camera.js +112 -64
  142. package/lib/module/components/Camera.js.map +1 -1
  143. package/lib/module/components/CircleLayer.js +4 -6
  144. package/lib/module/components/CircleLayer.js.map +1 -1
  145. package/lib/module/components/FillExtrusionLayer.js +4 -6
  146. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  147. package/lib/module/components/FillLayer.js +4 -6
  148. package/lib/module/components/FillLayer.js.map +1 -1
  149. package/lib/module/components/HeadingIndicator.js +2 -3
  150. package/lib/module/components/HeadingIndicator.js.map +1 -1
  151. package/lib/module/components/HeatmapLayer.js +4 -6
  152. package/lib/module/components/HeatmapLayer.js.map +1 -1
  153. package/lib/module/components/ImageSource.js +2 -3
  154. package/lib/module/components/ImageSource.js.map +1 -1
  155. package/lib/module/components/Images.js +2 -3
  156. package/lib/module/components/Images.js.map +1 -1
  157. package/lib/module/components/Light.js +2 -4
  158. package/lib/module/components/Light.js.map +1 -1
  159. package/lib/module/components/LineLayer.js +4 -6
  160. package/lib/module/components/LineLayer.js.map +1 -1
  161. package/lib/module/components/MapView.js +65 -72
  162. package/lib/module/components/MapView.js.map +1 -1
  163. package/lib/module/components/MarkerView.js +2 -3
  164. package/lib/module/components/MarkerView.js.map +1 -1
  165. package/lib/module/components/NativeUserLocation.js +1 -2
  166. package/lib/module/components/NativeUserLocation.js.map +1 -1
  167. package/lib/module/components/PointAnnotation.js +5 -7
  168. package/lib/module/components/PointAnnotation.js.map +1 -1
  169. package/lib/module/components/RasterLayer.js +4 -6
  170. package/lib/module/components/RasterLayer.js.map +1 -1
  171. package/lib/module/components/RasterSource.js +5 -7
  172. package/lib/module/components/RasterSource.js.map +1 -1
  173. package/lib/module/components/ShapeSource.js +4 -5
  174. package/lib/module/components/ShapeSource.js.map +1 -1
  175. package/lib/module/components/SymbolLayer.js +4 -5
  176. package/lib/module/components/SymbolLayer.js.map +1 -1
  177. package/lib/module/components/UserLocation.js +14 -15
  178. package/lib/module/components/UserLocation.js.map +1 -1
  179. package/lib/module/components/VectorSource.js +5 -6
  180. package/lib/module/components/VectorSource.js.map +1 -1
  181. package/lib/module/hooks/useAbstractLayer.js +1 -1
  182. package/lib/module/hooks/useAbstractLayer.js.map +1 -1
  183. package/lib/module/hooks/useAbstractSource.js +1 -1
  184. package/lib/module/hooks/useAbstractSource.js.map +1 -1
  185. package/lib/module/hooks/useNativeBridge.js +1 -2
  186. package/lib/module/hooks/useNativeBridge.js.map +1 -1
  187. package/lib/module/hooks/useNativeRef.js.map +1 -1
  188. package/lib/module/hooks/useOnce.js +1 -2
  189. package/lib/module/hooks/useOnce.js.map +1 -1
  190. package/lib/module/index.js +4 -0
  191. package/lib/module/index.js.map +1 -1
  192. package/lib/module/modules/location/{locationManager.js → LocationManager.js} +10 -9
  193. package/lib/module/modules/location/LocationManager.js.map +1 -0
  194. package/lib/module/modules/offline/OfflineCreatePackOptions.js +1 -2
  195. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  196. package/lib/module/modules/offline/{offlineManager.js → OfflineManager.js} +30 -30
  197. package/lib/module/modules/offline/OfflineManager.js.map +1 -0
  198. package/lib/module/modules/offline/OfflinePack.js +1 -2
  199. package/lib/module/modules/offline/OfflinePack.js.map +1 -1
  200. package/lib/module/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +10 -10
  201. package/lib/module/modules/snapshot/{snapshotManager.js.map → SnapshotManager.js.map} +1 -1
  202. package/lib/module/modules/snapshot/SnapshotOptions.js +2 -3
  203. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  204. package/lib/module/plugin/MapLibrePluginProps.js +2 -0
  205. package/lib/module/plugin/MapLibrePluginProps.js.map +1 -0
  206. package/lib/module/plugin/android.js +34 -0
  207. package/lib/module/plugin/android.js.map +1 -0
  208. package/lib/module/plugin/ios.js +123 -0
  209. package/lib/module/plugin/ios.js.map +1 -0
  210. package/lib/module/plugin/withMapLibre.js +27 -0
  211. package/lib/module/plugin/withMapLibre.js.map +1 -0
  212. package/lib/module/types/MapLibreRNStyles.js +4 -0
  213. package/lib/module/types/MapLibreRNStyles.js.map +1 -0
  214. package/lib/module/utils/BridgeValue.js +1 -1
  215. package/lib/module/utils/BridgeValue.js.map +1 -1
  216. package/lib/module/utils/Logger.js +1 -2
  217. package/lib/module/utils/Logger.js.map +1 -1
  218. package/lib/module/utils/StyleValue.js +3 -3
  219. package/lib/module/utils/StyleValue.js.map +1 -1
  220. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +1 -2
  221. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  222. package/lib/module/utils/animated/Animated.js +14 -15
  223. package/lib/module/utils/animated/Animated.js.map +1 -1
  224. package/lib/module/utils/animated/AnimatedCoordinatesArray.js +2 -3
  225. package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
  226. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +1 -1
  227. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  228. package/lib/module/utils/animated/AnimatedPoint.js +0 -1
  229. package/lib/module/utils/animated/AnimatedPoint.js.map +1 -1
  230. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +2 -2
  231. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  232. package/lib/module/utils/animated/AnimatedShape.js +1 -2
  233. package/lib/module/utils/animated/AnimatedShape.js.map +1 -1
  234. package/lib/module/utils/getStylePropertyType.js +248 -0
  235. package/lib/module/utils/getStylePropertyType.js.map +1 -0
  236. package/lib/typescript/commonjs/src/MLRNModule.d.ts +2 -6
  237. package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/MapLibreRN.d.ts +43 -30
  239. package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/components/Annotation.d.ts +6 -6
  241. package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +3 -5
  243. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/src/components/Callout.d.ts +3 -4
  245. package/lib/typescript/commonjs/src/components/Callout.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/src/components/Camera.d.ts +4 -4
  247. package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +3 -5
  249. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +3 -5
  251. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/components/FillLayer.d.ts +3 -5
  253. package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +2 -3
  255. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +3 -5
  257. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/components/ImageSource.d.ts +3 -4
  259. package/lib/typescript/commonjs/src/components/ImageSource.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/components/Images.d.ts +5 -5
  261. package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/components/Light.d.ts +4 -5
  263. package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/components/LineLayer.d.ts +3 -5
  265. package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/components/MapView.d.ts +12 -15
  267. package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/src/components/MarkerView.d.ts +3 -3
  269. package/lib/typescript/commonjs/src/components/MarkerView.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts +2 -3
  271. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts +7 -8
  273. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +3 -5
  275. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/components/RasterSource.d.ts +4 -4
  277. package/lib/typescript/commonjs/src/components/RasterSource.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +8 -15
  279. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +3 -4
  281. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/components/UserLocation.d.ts +6 -6
  283. package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/components/VectorSource.d.ts +4 -8
  285. package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +5 -4
  287. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts +4 -3
  289. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts +5 -5
  291. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +2 -2
  293. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts +1 -2
  295. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/index.d.ts +3 -0
  297. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +33 -0
  299. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
  301. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/modules/offline/{offlineManager.d.ts → OfflineManager.d.ts} +25 -25
  303. package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +2 -3
  305. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -1
  306. package/lib/typescript/{module/src/modules/snapshot/snapshotManager.d.ts → commonjs/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
  307. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
  309. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts +77 -0
  311. package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/src/plugin/android.d.ts +16 -0
  313. package/lib/typescript/commonjs/src/plugin/android.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/src/plugin/ios.d.ts +17 -0
  315. package/lib/typescript/commonjs/src/plugin/ios.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts +5 -0
  317. package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts +960 -0
  319. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts +1 -1
  321. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/src/utils/Logger.d.ts +2 -2
  323. package/lib/typescript/commonjs/src/utils/Logger.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts +2 -2
  325. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  327. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +19 -19
  329. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
  331. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
  333. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +1 -1
  335. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
  337. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +5 -5
  339. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts +1 -1
  341. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts +35 -0
  343. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts.map +1 -0
  344. package/lib/typescript/module/src/MLRNModule.d.ts +2 -6
  345. package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
  346. package/lib/typescript/module/src/MapLibreRN.d.ts +43 -30
  347. package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
  348. package/lib/typescript/module/src/components/Annotation.d.ts +6 -6
  349. package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -1
  350. package/lib/typescript/module/src/components/BackgroundLayer.d.ts +3 -5
  351. package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -1
  352. package/lib/typescript/module/src/components/Callout.d.ts +3 -4
  353. package/lib/typescript/module/src/components/Callout.d.ts.map +1 -1
  354. package/lib/typescript/module/src/components/Camera.d.ts +4 -4
  355. package/lib/typescript/module/src/components/Camera.d.ts.map +1 -1
  356. package/lib/typescript/module/src/components/CircleLayer.d.ts +3 -5
  357. package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -1
  358. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +3 -5
  359. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -1
  360. package/lib/typescript/module/src/components/FillLayer.d.ts +3 -5
  361. package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -1
  362. package/lib/typescript/module/src/components/HeadingIndicator.d.ts +2 -3
  363. package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +1 -1
  364. package/lib/typescript/module/src/components/HeatmapLayer.d.ts +3 -5
  365. package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -1
  366. package/lib/typescript/module/src/components/ImageSource.d.ts +3 -4
  367. package/lib/typescript/module/src/components/ImageSource.d.ts.map +1 -1
  368. package/lib/typescript/module/src/components/Images.d.ts +5 -5
  369. package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
  370. package/lib/typescript/module/src/components/Light.d.ts +4 -5
  371. package/lib/typescript/module/src/components/Light.d.ts.map +1 -1
  372. package/lib/typescript/module/src/components/LineLayer.d.ts +3 -5
  373. package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -1
  374. package/lib/typescript/module/src/components/MapView.d.ts +12 -15
  375. package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
  376. package/lib/typescript/module/src/components/MarkerView.d.ts +3 -3
  377. package/lib/typescript/module/src/components/MarkerView.d.ts.map +1 -1
  378. package/lib/typescript/module/src/components/NativeUserLocation.d.ts +2 -3
  379. package/lib/typescript/module/src/components/NativeUserLocation.d.ts.map +1 -1
  380. package/lib/typescript/module/src/components/PointAnnotation.d.ts +7 -8
  381. package/lib/typescript/module/src/components/PointAnnotation.d.ts.map +1 -1
  382. package/lib/typescript/module/src/components/RasterLayer.d.ts +3 -5
  383. package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -1
  384. package/lib/typescript/module/src/components/RasterSource.d.ts +4 -4
  385. package/lib/typescript/module/src/components/RasterSource.d.ts.map +1 -1
  386. package/lib/typescript/module/src/components/ShapeSource.d.ts +8 -15
  387. package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
  388. package/lib/typescript/module/src/components/SymbolLayer.d.ts +3 -4
  389. package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -1
  390. package/lib/typescript/module/src/components/UserLocation.d.ts +6 -6
  391. package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
  392. package/lib/typescript/module/src/components/VectorSource.d.ts +4 -8
  393. package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
  394. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +5 -4
  395. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -1
  396. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts +4 -3
  397. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts.map +1 -1
  398. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts +5 -5
  399. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +1 -1
  400. package/lib/typescript/module/src/hooks/useNativeRef.d.ts +2 -2
  401. package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -1
  402. package/lib/typescript/module/src/hooks/useOnce.d.ts +1 -2
  403. package/lib/typescript/module/src/hooks/useOnce.d.ts.map +1 -1
  404. package/lib/typescript/module/src/index.d.ts +3 -0
  405. package/lib/typescript/module/src/index.d.ts.map +1 -1
  406. package/lib/typescript/module/src/modules/location/LocationManager.d.ts +33 -0
  407. package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -0
  408. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
  409. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  410. package/lib/typescript/module/src/modules/offline/{offlineManager.d.ts → OfflineManager.d.ts} +25 -25
  411. package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +1 -0
  412. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +2 -3
  413. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -1
  414. package/lib/typescript/{commonjs/src/modules/snapshot/snapshotManager.d.ts → module/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
  415. package/lib/typescript/module/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
  416. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
  417. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  418. package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts +77 -0
  419. package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts.map +1 -0
  420. package/lib/typescript/module/src/plugin/android.d.ts +16 -0
  421. package/lib/typescript/module/src/plugin/android.d.ts.map +1 -0
  422. package/lib/typescript/module/src/plugin/ios.d.ts +17 -0
  423. package/lib/typescript/module/src/plugin/ios.d.ts.map +1 -0
  424. package/lib/typescript/module/src/plugin/withMapLibre.d.ts +5 -0
  425. package/lib/typescript/module/src/plugin/withMapLibre.d.ts.map +1 -0
  426. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts +960 -0
  427. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +1 -0
  428. package/lib/typescript/module/src/utils/BridgeValue.d.ts +1 -1
  429. package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +1 -1
  430. package/lib/typescript/module/src/utils/Logger.d.ts +2 -2
  431. package/lib/typescript/module/src/utils/Logger.d.ts.map +1 -1
  432. package/lib/typescript/module/src/utils/StyleValue.d.ts +2 -2
  433. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -1
  434. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  435. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  436. package/lib/typescript/module/src/utils/animated/Animated.d.ts +19 -19
  437. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
  438. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
  439. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
  440. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
  441. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  442. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +1 -1
  443. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  444. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
  445. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  446. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +5 -5
  447. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  448. package/lib/typescript/module/src/utils/filterUtils.d.ts +1 -1
  449. package/lib/typescript/module/src/utils/filterUtils.d.ts.map +1 -1
  450. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts +35 -0
  451. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts.map +1 -0
  452. package/maplibre-react-native.podspec +15 -14
  453. package/package.json +17 -14
  454. package/src/MLRNModule.ts +15 -10
  455. package/src/MapLibreRN.ts +59 -41
  456. package/src/components/Annotation.tsx +12 -14
  457. package/src/components/BackgroundLayer.tsx +7 -9
  458. package/src/components/Callout.tsx +8 -10
  459. package/src/components/Camera.tsx +154 -78
  460. package/src/components/CircleLayer.tsx +7 -9
  461. package/src/components/FillExtrusionLayer.tsx +7 -9
  462. package/src/components/FillLayer.tsx +7 -9
  463. package/src/components/HeadingIndicator.tsx +2 -6
  464. package/src/components/HeatmapLayer.tsx +7 -9
  465. package/src/components/ImageSource.tsx +4 -6
  466. package/src/components/Images.tsx +7 -9
  467. package/src/components/Light.tsx +5 -7
  468. package/src/components/LineLayer.tsx +7 -9
  469. package/src/components/MapView.tsx +85 -94
  470. package/src/components/MarkerView.tsx +4 -6
  471. package/src/components/NativeUserLocation.tsx +1 -4
  472. package/src/components/PointAnnotation.tsx +10 -11
  473. package/src/components/RasterLayer.tsx +7 -9
  474. package/src/components/RasterSource.tsx +7 -9
  475. package/src/components/ShapeSource.tsx +17 -22
  476. package/src/components/SymbolLayer.tsx +7 -8
  477. package/src/components/UserLocation.tsx +21 -22
  478. package/src/components/VectorSource.tsx +8 -15
  479. package/src/hooks/useAbstractLayer.ts +8 -8
  480. package/src/hooks/useAbstractSource.ts +6 -6
  481. package/src/hooks/useNativeBridge.ts +9 -6
  482. package/src/hooks/useNativeRef.ts +2 -2
  483. package/src/hooks/useOnce.ts +3 -3
  484. package/src/index.ts +3 -0
  485. package/src/modules/location/{locationManager.ts → LocationManager.ts} +16 -15
  486. package/src/modules/offline/OfflineCreatePackOptions.ts +1 -3
  487. package/src/modules/offline/{offlineManager.ts → OfflineManager.ts} +30 -29
  488. package/src/modules/offline/OfflinePack.ts +2 -4
  489. package/src/modules/snapshot/{snapshotManager.ts → SnapshotManager.ts} +9 -9
  490. package/src/modules/snapshot/SnapshotOptions.ts +2 -4
  491. package/src/plugin/MapLibrePluginProps.ts +83 -0
  492. package/src/plugin/android.ts +64 -0
  493. package/src/plugin/ios.ts +166 -0
  494. package/src/plugin/withMapLibre.ts +30 -0
  495. package/src/{utils/MapLibreRNStyles.d.ts → types/MapLibreRNStyles.ts} +86 -406
  496. package/src/utils/BridgeValue.ts +1 -1
  497. package/src/utils/Logger.ts +1 -3
  498. package/src/utils/StyleValue.ts +6 -5
  499. package/src/utils/animated/AbstractAnimatedCoordinates.ts +3 -3
  500. package/src/utils/animated/Animated.ts +23 -21
  501. package/src/utils/animated/AnimatedCoordinatesArray.ts +3 -4
  502. package/src/utils/animated/AnimatedExtractCoordinateFromArray.ts +1 -1
  503. package/src/utils/animated/AnimatedPoint.ts +0 -2
  504. package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +3 -2
  505. package/src/utils/animated/AnimatedShape.ts +4 -6
  506. package/src/utils/filterUtils.ts +1 -1
  507. package/src/utils/getStylePropertyType.ts +265 -0
  508. package/lib/commonjs/modules/location/locationManager.js.map +0 -1
  509. package/lib/commonjs/modules/offline/offlineManager.js.map +0 -1
  510. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +0 -1
  511. package/lib/commonjs/types/StyleURL.js +0 -11
  512. package/lib/commonjs/types/StyleURL.js.map +0 -1
  513. package/lib/commonjs/utils/MapLibreRNStyles.d.js +0 -181
  514. package/lib/commonjs/utils/MapLibreRNStyles.d.js.map +0 -1
  515. package/lib/commonjs/utils/styleMap.js +0 -255
  516. package/lib/commonjs/utils/styleMap.js.map +0 -1
  517. package/lib/module/modules/location/locationManager.js.map +0 -1
  518. package/lib/module/modules/offline/offlineManager.js.map +0 -1
  519. package/lib/module/types/StyleURL.js +0 -7
  520. package/lib/module/types/StyleURL.js.map +0 -1
  521. package/lib/module/utils/MapLibreRNStyles.d.js +0 -180
  522. package/lib/module/utils/MapLibreRNStyles.d.js.map +0 -1
  523. package/lib/module/utils/styleMap.js +0 -249
  524. package/lib/module/utils/styleMap.js.map +0 -1
  525. package/lib/typescript/commonjs/jest.config.d.ts +0 -2
  526. package/lib/typescript/commonjs/jest.config.d.ts.map +0 -1
  527. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts +0 -64
  528. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts.map +0 -1
  529. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +0 -1
  530. package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
  531. package/lib/typescript/commonjs/src/types/StyleURL.d.ts +0 -4
  532. package/lib/typescript/commonjs/src/types/StyleURL.d.ts.map +0 -1
  533. package/lib/typescript/commonjs/src/utils/styleMap.d.ts +0 -231
  534. package/lib/typescript/commonjs/src/utils/styleMap.d.ts.map +0 -1
  535. package/lib/typescript/module/jest.config.d.ts +0 -2
  536. package/lib/typescript/module/jest.config.d.ts.map +0 -1
  537. package/lib/typescript/module/src/modules/location/locationManager.d.ts +0 -64
  538. package/lib/typescript/module/src/modules/location/locationManager.d.ts.map +0 -1
  539. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +0 -1
  540. package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
  541. package/lib/typescript/module/src/types/StyleURL.d.ts +0 -4
  542. package/lib/typescript/module/src/types/StyleURL.d.ts.map +0 -1
  543. package/lib/typescript/module/src/utils/styleMap.d.ts +0 -231
  544. package/lib/typescript/module/src/utils/styleMap.d.ts.map +0 -1
  545. package/plugin/build/withMapLibre.d.ts +0 -12
  546. package/plugin/build/withMapLibre.js +0 -148
  547. package/src/types/StyleURL.ts +0 -3
  548. package/src/utils/styleMap.ts +0 -265
@@ -0,0 +1,151 @@
1
+ package org.maplibre.reactnative.location.engine;
2
+
3
+ import android.annotation.SuppressLint;
4
+ import android.app.PendingIntent;
5
+ import android.content.Context;
6
+ import android.location.Location;
7
+ import android.os.Looper;
8
+
9
+ import androidx.annotation.NonNull;
10
+ import androidx.annotation.Nullable;
11
+ import androidx.annotation.VisibleForTesting;
12
+
13
+ import com.google.android.gms.location.FusedLocationProviderClient;
14
+ import com.google.android.gms.location.LocationCallback;
15
+ import com.google.android.gms.location.LocationRequest;
16
+ import com.google.android.gms.location.LocationResult;
17
+ import com.google.android.gms.location.LocationServices;
18
+ import com.google.android.gms.location.Priority;
19
+ import com.google.android.gms.tasks.OnFailureListener;
20
+ import com.google.android.gms.tasks.OnSuccessListener;
21
+
22
+ import org.maplibre.android.location.engine.LocationEngineCallback;
23
+ import org.maplibre.android.location.engine.LocationEngineImpl;
24
+ import org.maplibre.android.location.engine.LocationEngineRequest;
25
+ import org.maplibre.android.location.engine.LocationEngineResult;
26
+
27
+ import java.util.Collections;
28
+ import java.util.List;
29
+
30
+ /**
31
+ * Wraps implementation of Fused Location Provider
32
+ */
33
+ public class GoogleLocationEngineImpl implements LocationEngineImpl<LocationCallback> {
34
+ private final FusedLocationProviderClient fusedLocationProviderClient;
35
+
36
+ @VisibleForTesting
37
+ GoogleLocationEngineImpl(FusedLocationProviderClient fusedLocationProviderClient) {
38
+ this.fusedLocationProviderClient = fusedLocationProviderClient;
39
+ }
40
+
41
+ public GoogleLocationEngineImpl(@NonNull Context context) {
42
+ this.fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);
43
+ }
44
+
45
+ @NonNull
46
+ @Override
47
+ public LocationCallback createListener(LocationEngineCallback<LocationEngineResult> callback) {
48
+ return new GoogleLocationEngineCallbackTransport(callback);
49
+ }
50
+
51
+ @SuppressLint("MissingPermission")
52
+ @Override
53
+ public void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback)
54
+ throws SecurityException {
55
+ GoogleLastLocationEngineCallbackTransport transport =
56
+ new GoogleLastLocationEngineCallbackTransport(callback);
57
+ fusedLocationProviderClient.getLastLocation().addOnSuccessListener(transport).addOnFailureListener(transport);
58
+ }
59
+
60
+ @SuppressLint("MissingPermission")
61
+ @Override
62
+ public void requestLocationUpdates(@NonNull LocationEngineRequest request,
63
+ @NonNull LocationCallback listener,
64
+ @Nullable Looper looper) throws SecurityException {
65
+ fusedLocationProviderClient.requestLocationUpdates(toGMSLocationRequest(request), listener, looper);
66
+ }
67
+
68
+ @SuppressLint("MissingPermission")
69
+ @Override
70
+ public void requestLocationUpdates(@NonNull LocationEngineRequest request,
71
+ @NonNull PendingIntent pendingIntent) throws SecurityException {
72
+ fusedLocationProviderClient.requestLocationUpdates(toGMSLocationRequest(request), pendingIntent);
73
+ }
74
+
75
+ @Override
76
+ public void removeLocationUpdates(@NonNull LocationCallback listener) {
77
+ if (listener != null) {
78
+ fusedLocationProviderClient.removeLocationUpdates(listener);
79
+ }
80
+ }
81
+
82
+ @Override
83
+ public void removeLocationUpdates(PendingIntent pendingIntent) {
84
+ if (pendingIntent != null) {
85
+ fusedLocationProviderClient.removeLocationUpdates(pendingIntent);
86
+ }
87
+ }
88
+
89
+ private static LocationRequest toGMSLocationRequest(LocationEngineRequest request) {
90
+ LocationRequest.Builder builder = new LocationRequest.Builder(request.getInterval());
91
+ builder.setMinUpdateIntervalMillis(request.getFastestInterval());
92
+ builder.setMinUpdateDistanceMeters(request.getDisplacement());
93
+ builder.setMaxUpdateDelayMillis(request.getMaxWaitTime());
94
+ builder.setPriority(toGMSLocationPriority(request.getPriority()));
95
+ return builder.build();
96
+ }
97
+
98
+ private static int toGMSLocationPriority(int enginePriority) {
99
+ switch (enginePriority) {
100
+ case LocationEngineRequest.PRIORITY_HIGH_ACCURACY:
101
+ return Priority.PRIORITY_HIGH_ACCURACY;
102
+ case LocationEngineRequest.PRIORITY_BALANCED_POWER_ACCURACY:
103
+ return Priority.PRIORITY_BALANCED_POWER_ACCURACY;
104
+ case LocationEngineRequest.PRIORITY_LOW_POWER:
105
+ return Priority.PRIORITY_LOW_POWER;
106
+ case LocationEngineRequest.PRIORITY_NO_POWER:
107
+ default:
108
+ return Priority.PRIORITY_PASSIVE;
109
+ }
110
+ }
111
+
112
+ private static final class GoogleLocationEngineCallbackTransport extends LocationCallback {
113
+ private final LocationEngineCallback<LocationEngineResult> callback;
114
+
115
+ GoogleLocationEngineCallbackTransport(LocationEngineCallback<LocationEngineResult> callback) {
116
+ this.callback = callback;
117
+ }
118
+
119
+ @Override
120
+ public void onLocationResult(LocationResult locationResult) {
121
+ super.onLocationResult(locationResult);
122
+ List<Location> locations = locationResult.getLocations();
123
+ if (!locations.isEmpty()) {
124
+ callback.onSuccess(LocationEngineResult.create(locations));
125
+ } else {
126
+ callback.onFailure(new Exception("Unavailable location"));
127
+ }
128
+ }
129
+ }
130
+
131
+ @VisibleForTesting
132
+ static final class GoogleLastLocationEngineCallbackTransport
133
+ implements OnSuccessListener<Location>, OnFailureListener {
134
+ private final LocationEngineCallback<LocationEngineResult> callback;
135
+
136
+ GoogleLastLocationEngineCallbackTransport(LocationEngineCallback<LocationEngineResult> callback) {
137
+ this.callback = callback;
138
+ }
139
+
140
+ @Override
141
+ public void onSuccess(Location location) {
142
+ callback.onSuccess(location != null ? LocationEngineResult.create(location) :
143
+ LocationEngineResult.create(Collections.<Location>emptyList()));
144
+ }
145
+
146
+ @Override
147
+ public void onFailure(@NonNull Exception e) {
148
+ callback.onFailure(e);
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,24 @@
1
+ package org.maplibre.reactnative.location.engine;
2
+
3
+ import android.content.Context;
4
+ import android.util.Log;
5
+
6
+ import com.google.android.gms.common.ConnectionResult;
7
+ import com.google.android.gms.common.GoogleApiAvailability;
8
+
9
+ import org.maplibre.android.location.engine.LocationEngine;
10
+ import org.maplibre.android.location.engine.LocationEngineProxy;
11
+
12
+ public class GoogleLocationEngineProvider implements LocationEngineProvidable {
13
+ private static final String LOG_TAG = "GoogleLocationEngineProvider";
14
+
15
+ public LocationEngine getLocationEngine(Context context) {
16
+ if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS) {
17
+ LocationEngine locationEngine = new LocationEngineProxy<>(new GoogleLocationEngineImpl(context.getApplicationContext()));
18
+ Log.d(LOG_TAG, "GoogleLocationEngine will be used.");
19
+ return locationEngine;
20
+ } else {
21
+ return new DefaultLocationEngineProvider().getLocationEngine(context);
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,12 @@
1
+ package org.maplibre.reactnative.location.engine;
2
+
3
+ import android.content.Context;
4
+
5
+ import org.maplibre.android.location.engine.LocationEngine;
6
+
7
+ public class LocationEngineProvider implements LocationEngineProvidable {
8
+ @Override
9
+ public LocationEngine getLocationEngine(Context context) {
10
+ return new GoogleLocationEngineProvider().getLocationEngine(context);
11
+ }
12
+ }
package/app.plugin.js CHANGED
@@ -1 +1 @@
1
- module.exports = require("./plugin/build/withMapLibre");
1
+ module.exports = require("./lib/commonjs/plugin/withMapLibre");
@@ -179,11 +179,6 @@
179
179
  return;
180
180
  }
181
181
 
182
- if (_map.userTrackingMode != [self _userTrackingMode]) {
183
- _map.showsUserLocation = [self _userTrackingMode] != MLNUserTrackingModeNone;
184
- _map.userTrackingMode = [self _userTrackingMode];
185
- }
186
-
187
182
  MLNMapCamera *camera = _map.camera;
188
183
  if (_followPitch != nil && [_followPitch floatValue] >= 0.0) {
189
184
  camera.pitch = [_followPitch floatValue];
@@ -202,8 +197,12 @@
202
197
  if (_followZoomLevel != nil && [_followZoomLevel doubleValue] >= 0.0) {
203
198
  camera.altitude = [_map altitudeFromZoom:[_followZoomLevel doubleValue]];
204
199
  }
205
-
206
- [_map setCamera:camera animated:YES];
200
+
201
+ [_map setCamera:camera animated:NO];
202
+
203
+ if (_map.userTrackingMode != [self _userTrackingMode]) {
204
+ [_map setUserTrackingMode:[self _userTrackingMode] animated:NO completionHandler:nil];
205
+ }
207
206
  }
208
207
 
209
208
  - (NSUInteger)_userTrackingMode
@@ -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,33 +84,16 @@ 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
229
90
  };
230
91
  }
231
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
+ */
232
97
  RCT_EXPORT_METHOD(setAccessToken:(NSString *)accessToken)
233
98
  {
234
99
  if (accessToken.length > 0) {
@@ -246,6 +111,10 @@ RCT_EXPORT_METHOD(removeCustomHeader:(NSString *)headerName)
246
111
  [MLRNCustomHeaders.sharedInstance removeHeader:headerName];
247
112
  }
248
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
+ */
249
118
  RCT_EXPORT_METHOD(getAccessToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
250
119
  {
251
120
  NSString* accessToken = MLNSettings.apiKey;
@@ -24,10 +24,6 @@
24
24
 
25
25
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
26
26
  for (NSString *prop in styleProps) {
27
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
28
- continue;
29
- }
30
-
31
27
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
32
28
 
33
29
  if ([prop isEqualToString:@"fillSortKey"]) {
@@ -88,10 +84,6 @@
88
84
 
89
85
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
90
86
  for (NSString *prop in styleProps) {
91
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
92
- continue;
93
- }
94
-
95
87
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
96
88
 
97
89
  if ([prop isEqualToString:@"lineCap"]) {
@@ -176,10 +168,6 @@
176
168
 
177
169
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
178
170
  for (NSString *prop in styleProps) {
179
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
180
- continue;
181
- }
182
-
183
171
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
184
172
 
185
173
  if ([prop isEqualToString:@"symbolPlacement"]) {
@@ -348,10 +336,6 @@
348
336
 
349
337
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
350
338
  for (NSString *prop in styleProps) {
351
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
352
- continue;
353
- }
354
-
355
339
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
356
340
 
357
341
  if ([prop isEqualToString:@"circleSortKey"]) {
@@ -411,10 +395,6 @@
411
395
 
412
396
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
413
397
  for (NSString *prop in styleProps) {
414
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
415
- continue;
416
- }
417
-
418
398
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
419
399
 
420
400
  if ([prop isEqualToString:@"visibility"]) {
@@ -450,10 +430,6 @@
450
430
 
451
431
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
452
432
  for (NSString *prop in styleProps) {
453
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
454
- continue;
455
- }
456
-
457
433
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
458
434
 
459
435
  if ([prop isEqualToString:@"visibility"]) {
@@ -516,10 +492,6 @@
516
492
 
517
493
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
518
494
  for (NSString *prop in styleProps) {
519
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
520
- continue;
521
- }
522
-
523
495
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
524
496
 
525
497
  if ([prop isEqualToString:@"visibility"]) {
@@ -567,10 +539,6 @@
567
539
 
568
540
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
569
541
  for (NSString *prop in styleProps) {
570
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
571
- continue;
572
- }
573
-
574
542
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
575
543
 
576
544
  if ([prop isEqualToString:@"visibility"]) {
@@ -610,10 +578,6 @@
610
578
 
611
579
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
612
580
  for (NSString *prop in styleProps) {
613
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
614
- continue;
615
- }
616
-
617
581
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
618
582
 
619
583
  if ([prop isEqualToString:@"visibility"]) {
@@ -660,10 +624,6 @@
660
624
 
661
625
  NSArray<NSString*> *styleProps = [reactStyle allKeys];
662
626
  for (NSString *prop in styleProps) {
663
- if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
664
- continue;
665
- }
666
-
667
627
  MLRNStyleValue *styleValue = [MLRNStyleValue make:reactStyle[prop]];
668
628
 
669
629
  if ([prop isEqualToString:@"anchor"]) {
@@ -3,15 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setConnected = exports.setAccessToken = exports.removeCustomHeader = exports.getAccessToken = exports.addCustomHeader = exports.StyleURL = exports.StyleSource = exports.OfflinePackDownloadState = exports.LineJoin = exports.CameraModes = void 0;
6
+ exports.setConnected = exports.setAccessToken = exports.removeCustomHeader = exports.getAccessToken = exports.addCustomHeader = exports.StyleURL = exports.StyleSource = exports.OfflinePackDownloadState = exports.CameraModes = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  const MLRNModule = Object.create(_reactNative.NativeModules.MLRNModule);
9
9
  const {
10
10
  CameraModes,
11
- StyleURL,
12
11
  OfflinePackDownloadState,
13
- LineJoin,
14
12
  StyleSource,
13
+ StyleURL,
15
14
  setAccessToken,
16
15
  getAccessToken,
17
16
  addCustomHeader,
@@ -23,9 +22,8 @@ exports.removeCustomHeader = removeCustomHeader;
23
22
  exports.addCustomHeader = addCustomHeader;
24
23
  exports.getAccessToken = getAccessToken;
25
24
  exports.setAccessToken = setAccessToken;
25
+ exports.StyleURL = StyleURL;
26
26
  exports.StyleSource = StyleSource;
27
- exports.LineJoin = LineJoin;
28
27
  exports.OfflinePackDownloadState = OfflinePackDownloadState;
29
- exports.StyleURL = StyleURL;
30
28
  exports.CameraModes = CameraModes;
31
29
  //# sourceMappingURL=MLRNModule.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","MLRNModule","Object","create","NativeModules","CameraModes","StyleURL","OfflinePackDownloadState","LineJoin","StyleSource","setAccessToken","getAccessToken","addCustomHeader","removeCustomHeader","setConnected","exports"],"sourceRoot":"../../src","sources":["MLRNModule.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAsCA,MAAMC,UAAuB,GAAGC,MAAM,CAACC,MAAM,CAACC,0BAAa,CAACH,UAAU,CAAC;AAEhE,MAAM;EACXI,WAAW;EACXC,QAAQ;EACRC,wBAAwB;EACxBC,QAAQ;EACRC,WAAW;EAEXC,cAAc;EACdC,cAAc;EAEdC,eAAe;EACfC,kBAAkB;EAElBC;AACF,CAAC,GAAGb,UAAU;AAACc,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,WAAA,GAAAA,WAAA;AAAAM,OAAA,CAAAP,QAAA,GAAAA,QAAA;AAAAO,OAAA,CAAAR,wBAAA,GAAAA,wBAAA;AAAAQ,OAAA,CAAAT,QAAA,GAAAA,QAAA;AAAAS,OAAA,CAAAV,WAAA,GAAAA,WAAA","ignoreList":[]}
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":[]}