@maplibre/maplibre-react-native 11.0.0-beta.2 → 11.0.0-beta.21

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 (643) hide show
  1. package/android/build.gradle +3 -1
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +13 -0
  4. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerView.kt +35 -28
  5. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerViewContent.kt +9 -14
  6. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerViewManager.kt +8 -1
  7. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MarkerViewManager.kt +20 -13
  8. package/android/src/main/java/org/maplibre/reactnative/components/annotations/pointannotation/MLRNPointAnnotation.kt +45 -25
  9. package/android/src/main/java/org/maplibre/reactnative/components/annotations/pointannotation/MLRNPointAnnotationManager.kt +2 -1
  10. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleFactory.java +1 -1
  11. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.kt +222 -133
  12. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt +18 -0
  13. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogModule.kt +2 -0
  14. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNNetworkModule.kt +0 -42
  15. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.kt +27 -4
  16. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNTransformRequestModule.kt +144 -0
  17. package/android/src/main/java/org/maplibre/reactnative/modules/TransformRequestInterceptor.kt +184 -0
  18. package/ios/components/annotations/point-annotation/MLRNPointAnnotation.h +3 -2
  19. package/ios/components/annotations/point-annotation/MLRNPointAnnotation.m +26 -2
  20. package/ios/components/annotations/point-annotation/MLRNPointAnnotationComponentView.mm +27 -19
  21. package/ios/components/camera/MLRNCameraComponentView.mm +5 -4
  22. package/ios/components/images/MLRNImageLoader.h +27 -0
  23. package/ios/components/images/MLRNImageLoader.m +85 -0
  24. package/ios/components/images/MLRNImageQueue.h +2 -2
  25. package/ios/components/images/MLRNImageQueue.m +2 -2
  26. package/ios/components/images/MLRNImageQueueOperation.h +2 -2
  27. package/ios/components/images/MLRNImageQueueOperation.m +3 -3
  28. package/ios/components/images/MLRNImages.h +0 -3
  29. package/ios/components/images/MLRNImages.m +6 -6
  30. package/ios/components/images/MLRNImagesComponentView.mm +0 -3
  31. package/ios/components/images/MLRNImagesModule.h +6 -0
  32. package/ios/components/images/MLRNImagesModule.mm +23 -0
  33. package/ios/components/layer/MLRNLayer.h +0 -3
  34. package/ios/components/layer/MLRNLayer.m +0 -1
  35. package/ios/components/layer/MLRNLayerComponentView.mm +12 -11
  36. package/ios/components/layer/style/MLRNStyle.h +1 -3
  37. package/ios/components/layer/style/MLRNStyle.m +68 -71
  38. package/ios/components/map-view/MLRNMapView.h +5 -0
  39. package/ios/components/map-view/MLRNMapView.m +64 -15
  40. package/ios/components/map-view/MLRNMapViewComponentView.mm +19 -3
  41. package/ios/components/map-view/MLRNMapViewModule.mm +1 -1
  42. package/ios/components/sources/geojson-source/MLRNGeoJSONSource.h +0 -3
  43. package/ios/components/sources/image-source/MLRNImageSourceComponentView.mm +1 -1
  44. package/ios/components/sources/tile-sources/raster-source/MLRNRasterSourceComponentView.mm +2 -3
  45. package/ios/components/sources/tile-sources/vector-source/MLRNVectorSourceComponentView.mm +2 -3
  46. package/ios/modules/logging/MLRNLogging.h +4 -0
  47. package/ios/modules/logging/MLRNLogging.m +8 -0
  48. package/ios/modules/network/MLRNNetworkModule.mm +0 -10
  49. package/ios/modules/transform-request/MLRNTransformRequest.h +38 -0
  50. package/ios/modules/transform-request/MLRNTransformRequest.m +413 -0
  51. package/ios/modules/transform-request/MLRNTransformRequestModule.h +9 -0
  52. package/ios/modules/transform-request/MLRNTransformRequestModule.mm +72 -0
  53. package/ios/utils/MLRNUtils.h +0 -14
  54. package/ios/utils/MLRNUtils.m +0 -71
  55. package/lib/commonjs/components/annotations/marker/Marker.js +0 -5
  56. package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -1
  57. package/lib/commonjs/components/annotations/marker/MarkerViewNativeComponent.ts +12 -2
  58. package/lib/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +5 -4
  59. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +10 -14
  60. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  61. package/lib/commonjs/components/camera/Camera.js +4 -3
  62. package/lib/commonjs/components/camera/Camera.js.map +1 -1
  63. package/lib/commonjs/components/images/Images.js +1 -0
  64. package/lib/commonjs/components/images/Images.js.map +1 -1
  65. package/lib/commonjs/components/images/NativeImagesModule.js +10 -0
  66. package/lib/commonjs/components/images/NativeImagesModule.js.map +1 -0
  67. package/lib/commonjs/components/layer/Layer.js +17 -62
  68. package/lib/commonjs/components/layer/Layer.js.map +1 -1
  69. package/lib/commonjs/components/map/AndroidTextureMapViewNativeComponent.ts +4 -1
  70. package/lib/commonjs/components/map/Map.js +4 -3
  71. package/lib/commonjs/components/map/Map.js.map +1 -1
  72. package/lib/commonjs/components/map/MapViewNativeComponent.ts +3 -0
  73. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +4 -3
  74. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  75. package/lib/commonjs/components/sources/vector-source/VectorSource.js +4 -3
  76. package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
  77. package/lib/commonjs/components/user-location/UserLocation.js +21 -12
  78. package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
  79. package/lib/commonjs/components/user-location/UserLocationPuck.js +16 -16
  80. package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
  81. package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +8 -10
  82. package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
  83. package/lib/commonjs/index.js +7 -0
  84. package/lib/commonjs/index.js.map +1 -1
  85. package/lib/commonjs/modules/network/NativeNetworkModule.js.map +1 -1
  86. package/lib/commonjs/modules/network/NetworkManager.js +1 -39
  87. package/lib/commonjs/modules/network/NetworkManager.js.map +1 -1
  88. package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js +9 -0
  89. package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
  90. package/lib/commonjs/modules/transform-request/TransformRequestManager.js +223 -0
  91. package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -0
  92. package/lib/commonjs/utils/getStylePropertyType.js +1 -1
  93. package/lib/module/components/annotations/marker/Marker.js +0 -5
  94. package/lib/module/components/annotations/marker/Marker.js.map +1 -1
  95. package/lib/module/components/annotations/marker/MarkerViewNativeComponent.ts +12 -2
  96. package/lib/module/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +5 -4
  97. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +10 -15
  98. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  99. package/lib/module/components/camera/Camera.js +5 -4
  100. package/lib/module/components/camera/Camera.js.map +1 -1
  101. package/lib/module/components/images/Images.js +1 -0
  102. package/lib/module/components/images/Images.js.map +1 -1
  103. package/lib/module/components/images/NativeImagesModule.js +7 -0
  104. package/lib/module/components/images/NativeImagesModule.js.map +1 -0
  105. package/lib/module/components/layer/Layer.js +17 -62
  106. package/lib/module/components/layer/Layer.js.map +1 -1
  107. package/lib/module/components/map/AndroidTextureMapViewNativeComponent.ts +4 -1
  108. package/lib/module/components/map/Map.js +5 -4
  109. package/lib/module/components/map/Map.js.map +1 -1
  110. package/lib/module/components/map/MapViewNativeComponent.ts +3 -0
  111. package/lib/module/components/sources/geojson-source/GeoJSONSource.js +5 -4
  112. package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  113. package/lib/module/components/sources/vector-source/VectorSource.js +5 -4
  114. package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
  115. package/lib/module/components/user-location/UserLocation.js +21 -13
  116. package/lib/module/components/user-location/UserLocation.js.map +1 -1
  117. package/lib/module/components/user-location/UserLocationPuck.js +16 -16
  118. package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
  119. package/lib/module/components/user-location/UserLocationPuckHeading.js +8 -9
  120. package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
  121. package/lib/module/index.js +1 -0
  122. package/lib/module/index.js.map +1 -1
  123. package/lib/module/modules/network/NativeNetworkModule.js.map +1 -1
  124. package/lib/module/modules/network/NetworkManager.js +1 -39
  125. package/lib/module/modules/network/NetworkManager.js.map +1 -1
  126. package/lib/module/modules/transform-request/NativeTransformRequestModule.js +5 -0
  127. package/lib/module/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
  128. package/lib/module/modules/transform-request/TransformRequestManager.js +220 -0
  129. package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -0
  130. package/lib/module/utils/getStylePropertyType.js +1 -1
  131. package/lib/typescript/commonjs/components/annotations/LayerAnnotation.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
  134. package/lib/typescript/{module/src → commonjs}/components/annotations/marker/Marker.d.ts +17 -4
  135. package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/{src/components → components}/annotations/marker/MarkerViewNativeComponent.d.ts +12 -2
  137. package/lib/typescript/commonjs/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/{src/components → components}/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +5 -4
  139. package/lib/typescript/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/{src/components → components}/annotations/view-annotation/ViewAnnotation.d.ts +23 -8
  141. package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/{src/components → components}/camera/Camera.d.ts +6 -1
  143. package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -0
  144. package/lib/typescript/commonjs/components/camera/CameraNativeComponent.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/components/camera/NativeCameraModule.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/{src/components → components}/images/Images.d.ts +1 -0
  147. package/lib/typescript/commonjs/components/images/Images.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/components/images/ImagesNativeComponent.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/components/images/NativeImagesModule.d.ts +6 -0
  150. package/lib/typescript/commonjs/components/images/NativeImagesModule.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/{src/components → components}/layer/Layer.d.ts +23 -59
  152. package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/components/layer/LayerNativeComponent.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/{src/components → components}/map/AndroidTextureMapViewNativeComponent.d.ts +2 -0
  155. package/lib/typescript/commonjs/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/{src/components → components}/map/Map.d.ts +22 -9
  157. package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -0
  158. package/lib/typescript/{module/src → commonjs}/components/map/MapViewNativeComponent.d.ts +2 -0
  159. package/lib/typescript/commonjs/components/map/MapViewNativeComponent.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/components/map/NativeMapViewModule.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/GeoJSONSource.d.ts +6 -2
  162. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/VectorSource.d.ts +6 -2
  171. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/components/user-location/UserLocationPuck.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/hooks/useFrozenId.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/hooks/useNativeBridge.d.ts.map +1 -0
  181. package/lib/typescript/{module/src → commonjs}/index.d.ts +4 -3
  182. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/modules/location/LocationManager.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/modules/location/NativeLocationModule.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/modules/log/LogManager.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/modules/log/NativeLogModule.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/{src/modules → modules}/network/NativeNetworkModule.d.ts +0 -2
  188. package/lib/typescript/commonjs/modules/network/NativeNetworkModule.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts +24 -0
  190. package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/modules/offline/NativeOfflineModule.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/modules/offline/OfflinePack.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/modules/static-map/NativeStaticMapModule.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
  197. package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +201 -0
  199. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/plugin/android.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/plugin/ios.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/plugin/withMapLibre.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/types/Anchor.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/types/BaseProps.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/types/LngLat.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/types/LngLatBounds.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/{src/types → types}/MapLibreRNStyles.d.ts +10 -10
  209. package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/types/PixelPoint.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/types/PixelPointBounds.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/types/PressEvent.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/types/ViewPadding.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/types/codegen/UnsafeMixed.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/utils/BridgeValue.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/utils/StyleValue.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
  220. package/lib/typescript/{module/src → commonjs}/utils/animated/Animated.d.ts +1 -1
  221. package/lib/typescript/commonjs/utils/animated/Animated.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/utils/animated/AnimatedPoint.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/utils/findNodeHandle.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/utils/getNativeFilter.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/utils/getStylePropertyType.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
  232. package/lib/typescript/module/components/annotations/LayerAnnotation.d.ts.map +1 -0
  233. package/lib/typescript/module/components/annotations/callout/Callout.d.ts.map +1 -0
  234. package/lib/typescript/module/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
  235. package/lib/typescript/{commonjs/src → module}/components/annotations/marker/Marker.d.ts +17 -4
  236. package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -0
  237. package/lib/typescript/module/{src/components → components}/annotations/marker/MarkerViewNativeComponent.d.ts +12 -2
  238. package/lib/typescript/module/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
  239. package/lib/typescript/module/{src/components → components}/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +5 -4
  240. package/lib/typescript/module/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
  241. package/lib/typescript/module/{src/components → components}/annotations/view-annotation/ViewAnnotation.d.ts +23 -8
  242. package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
  243. package/lib/typescript/module/{src/components → components}/camera/Camera.d.ts +6 -1
  244. package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -0
  245. package/lib/typescript/module/components/camera/CameraNativeComponent.d.ts.map +1 -0
  246. package/lib/typescript/module/components/camera/NativeCameraModule.d.ts.map +1 -0
  247. package/lib/typescript/module/{src/components → components}/images/Images.d.ts +1 -0
  248. package/lib/typescript/module/components/images/Images.d.ts.map +1 -0
  249. package/lib/typescript/module/components/images/ImagesNativeComponent.d.ts.map +1 -0
  250. package/lib/typescript/module/components/images/NativeImagesModule.d.ts +6 -0
  251. package/lib/typescript/module/components/images/NativeImagesModule.d.ts.map +1 -0
  252. package/lib/typescript/module/{src/components → components}/layer/Layer.d.ts +23 -59
  253. package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -0
  254. package/lib/typescript/module/components/layer/LayerNativeComponent.d.ts.map +1 -0
  255. package/lib/typescript/module/{src/components → components}/map/AndroidTextureMapViewNativeComponent.d.ts +2 -0
  256. package/lib/typescript/module/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
  257. package/lib/typescript/module/{src/components → components}/map/Map.d.ts +22 -9
  258. package/lib/typescript/module/components/map/Map.d.ts.map +1 -0
  259. package/lib/typescript/{commonjs/src → module}/components/map/MapViewNativeComponent.d.ts +2 -0
  260. package/lib/typescript/module/components/map/MapViewNativeComponent.d.ts.map +1 -0
  261. package/lib/typescript/module/components/map/NativeMapViewModule.d.ts.map +1 -0
  262. package/lib/typescript/module/{src/components → components}/sources/geojson-source/GeoJSONSource.d.ts +6 -2
  263. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -0
  264. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -0
  265. package/lib/typescript/module/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +1 -0
  266. package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts.map +1 -0
  267. package/lib/typescript/module/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -0
  268. package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts.map +1 -0
  269. package/lib/typescript/module/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +1 -0
  270. package/lib/typescript/module/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
  271. package/lib/typescript/module/{src/components → components}/sources/vector-source/VectorSource.d.ts +6 -2
  272. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts.map +1 -0
  273. package/lib/typescript/module/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +1 -0
  274. package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts.map +1 -0
  275. package/lib/typescript/module/components/user-location/UserLocation.d.ts.map +1 -0
  276. package/lib/typescript/module/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
  277. package/lib/typescript/module/components/user-location/UserLocationPuck.d.ts.map +1 -0
  278. package/lib/typescript/module/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
  279. package/lib/typescript/module/hooks/useCurrentPosition.d.ts.map +1 -0
  280. package/lib/typescript/module/hooks/useFrozenId.d.ts.map +1 -0
  281. package/lib/typescript/module/hooks/useNativeBridge.d.ts.map +1 -0
  282. package/lib/typescript/{commonjs/src → module}/index.d.ts +4 -3
  283. package/lib/typescript/module/index.d.ts.map +1 -0
  284. package/lib/typescript/module/modules/location/LocationManager.d.ts.map +1 -0
  285. package/lib/typescript/module/modules/location/NativeLocationModule.d.ts.map +1 -0
  286. package/lib/typescript/module/modules/log/LogManager.d.ts.map +1 -0
  287. package/lib/typescript/module/modules/log/NativeLogModule.d.ts.map +1 -0
  288. package/lib/typescript/module/{src/modules → modules}/network/NativeNetworkModule.d.ts +0 -2
  289. package/lib/typescript/module/modules/network/NativeNetworkModule.d.ts.map +1 -0
  290. package/lib/typescript/module/modules/network/NetworkManager.d.ts +24 -0
  291. package/lib/typescript/module/modules/network/NetworkManager.d.ts.map +1 -0
  292. package/lib/typescript/module/modules/offline/NativeOfflineModule.d.ts.map +1 -0
  293. package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -0
  294. package/lib/typescript/module/modules/offline/OfflinePack.d.ts.map +1 -0
  295. package/lib/typescript/module/modules/static-map/NativeStaticMapModule.d.ts.map +1 -0
  296. package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts.map +1 -0
  297. package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
  298. package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
  299. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +201 -0
  300. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
  301. package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts.map +1 -0
  302. package/lib/typescript/module/plugin/android.d.ts.map +1 -0
  303. package/lib/typescript/module/plugin/ios.d.ts.map +1 -0
  304. package/lib/typescript/module/plugin/withMapLibre.d.ts.map +1 -0
  305. package/lib/typescript/module/types/Anchor.d.ts.map +1 -0
  306. package/lib/typescript/module/types/BaseProps.d.ts.map +1 -0
  307. package/lib/typescript/module/types/LngLat.d.ts.map +1 -0
  308. package/lib/typescript/module/types/LngLatBounds.d.ts.map +1 -0
  309. package/lib/typescript/module/{src/types → types}/MapLibreRNStyles.d.ts +10 -10
  310. package/lib/typescript/module/types/MapLibreRNStyles.d.ts.map +1 -0
  311. package/lib/typescript/module/types/PixelPoint.d.ts.map +1 -0
  312. package/lib/typescript/module/types/PixelPointBounds.d.ts.map +1 -0
  313. package/lib/typescript/module/types/PressEvent.d.ts.map +1 -0
  314. package/lib/typescript/module/types/PressEventWithFeatures.d.ts.map +1 -0
  315. package/lib/typescript/module/types/ViewPadding.d.ts.map +1 -0
  316. package/lib/typescript/module/types/codegen/UnsafeMixed.d.ts.map +1 -0
  317. package/lib/typescript/module/types/sources/PressableSourceProps.d.ts.map +1 -0
  318. package/lib/typescript/module/utils/BridgeValue.d.ts.map +1 -0
  319. package/lib/typescript/module/utils/StyleValue.d.ts.map +1 -0
  320. package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
  321. package/lib/typescript/{commonjs/src → module}/utils/animated/Animated.d.ts +1 -1
  322. package/lib/typescript/module/utils/animated/Animated.d.ts.map +1 -0
  323. package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
  324. package/lib/typescript/module/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  325. package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
  326. package/lib/typescript/module/utils/animated/AnimatedPoint.d.ts.map +1 -0
  327. package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  328. package/lib/typescript/module/utils/convertStyleSpec.d.ts.map +1 -0
  329. package/lib/typescript/module/utils/findNodeHandle.d.ts.map +1 -0
  330. package/lib/typescript/module/utils/getNativeFilter.d.ts.map +1 -0
  331. package/lib/typescript/module/utils/getStylePropertyType.d.ts.map +1 -0
  332. package/lib/typescript/module/utils/index.d.ts.map +1 -0
  333. package/package.json +21 -43
  334. package/src/components/annotations/marker/Marker.tsx +24 -21
  335. package/src/components/annotations/marker/MarkerViewNativeComponent.ts +12 -2
  336. package/src/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +5 -4
  337. package/src/components/annotations/view-annotation/ViewAnnotation.tsx +78 -77
  338. package/src/components/camera/Camera.tsx +70 -69
  339. package/src/components/images/Images.tsx +1 -0
  340. package/src/components/images/NativeImagesModule.ts +11 -0
  341. package/src/components/layer/Layer.tsx +32 -78
  342. package/src/components/map/AndroidTextureMapViewNativeComponent.ts +4 -1
  343. package/src/components/map/Map.tsx +166 -164
  344. package/src/components/map/MapViewNativeComponent.ts +3 -0
  345. package/src/components/sources/geojson-source/GeoJSONSource.tsx +65 -62
  346. package/src/components/sources/vector-source/VectorSource.tsx +40 -37
  347. package/src/components/user-location/UserLocation.tsx +30 -18
  348. package/src/components/user-location/UserLocationPuck.tsx +20 -20
  349. package/src/components/user-location/UserLocationPuckHeading.tsx +9 -10
  350. package/src/index.ts +16 -5
  351. package/src/modules/network/NativeNetworkModule.ts +0 -4
  352. package/src/modules/network/NetworkManager.ts +1 -47
  353. package/src/modules/transform-request/NativeTransformRequestModule.ts +41 -0
  354. package/src/modules/transform-request/TransformRequestManager.ts +292 -0
  355. package/src/types/MapLibreRNStyles.ts +11 -10
  356. package/src/utils/getStylePropertyType.ts +1 -1
  357. package/android/src/main/java/org/maplibre/reactnative/http/RequestHeadersInterceptor.kt +0 -65
  358. package/android/src/main/res/layout/annotation.xml +0 -17
  359. package/ios/modules/network/MLRNNetworkHTTPHeaders.h +0 -14
  360. package/ios/modules/network/MLRNNetworkHTTPHeaders.m +0 -97
  361. package/lib/typescript/commonjs/src/components/annotations/LayerAnnotation.d.ts.map +0 -1
  362. package/lib/typescript/commonjs/src/components/annotations/callout/Callout.d.ts.map +0 -1
  363. package/lib/typescript/commonjs/src/components/annotations/callout/CalloutNativeComponent.d.ts.map +0 -1
  364. package/lib/typescript/commonjs/src/components/annotations/marker/Marker.d.ts.map +0 -1
  365. package/lib/typescript/commonjs/src/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +0 -1
  366. package/lib/typescript/commonjs/src/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +0 -1
  367. package/lib/typescript/commonjs/src/components/annotations/view-annotation/ViewAnnotation.d.ts.map +0 -1
  368. package/lib/typescript/commonjs/src/components/camera/Camera.d.ts.map +0 -1
  369. package/lib/typescript/commonjs/src/components/camera/CameraNativeComponent.d.ts.map +0 -1
  370. package/lib/typescript/commonjs/src/components/camera/NativeCameraModule.d.ts.map +0 -1
  371. package/lib/typescript/commonjs/src/components/images/Images.d.ts.map +0 -1
  372. package/lib/typescript/commonjs/src/components/images/ImagesNativeComponent.d.ts.map +0 -1
  373. package/lib/typescript/commonjs/src/components/layer/Layer.d.ts.map +0 -1
  374. package/lib/typescript/commonjs/src/components/layer/LayerNativeComponent.d.ts.map +0 -1
  375. package/lib/typescript/commonjs/src/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +0 -1
  376. package/lib/typescript/commonjs/src/components/map/Map.d.ts.map +0 -1
  377. package/lib/typescript/commonjs/src/components/map/MapViewNativeComponent.d.ts.map +0 -1
  378. package/lib/typescript/commonjs/src/components/map/NativeMapViewModule.d.ts.map +0 -1
  379. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +0 -1
  380. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +0 -1
  381. package/lib/typescript/commonjs/src/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +0 -1
  382. package/lib/typescript/commonjs/src/components/sources/image-source/ImageSource.d.ts.map +0 -1
  383. package/lib/typescript/commonjs/src/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +0 -1
  384. package/lib/typescript/commonjs/src/components/sources/raster-source/RasterSource.d.ts.map +0 -1
  385. package/lib/typescript/commonjs/src/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +0 -1
  386. package/lib/typescript/commonjs/src/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +0 -1
  387. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSource.d.ts.map +0 -1
  388. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +0 -1
  389. package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts.map +0 -1
  390. package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +0 -1
  391. package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts.map +0 -1
  392. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +0 -1
  393. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +0 -1
  394. package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts.map +0 -1
  395. package/lib/typescript/commonjs/src/hooks/useFrozenId.d.ts.map +0 -1
  396. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +0 -1
  397. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  398. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +0 -1
  399. package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts.map +0 -1
  400. package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts.map +0 -1
  401. package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts.map +0 -1
  402. package/lib/typescript/commonjs/src/modules/network/NativeNetworkModule.d.ts.map +0 -1
  403. package/lib/typescript/commonjs/src/modules/network/NetworkManager.d.ts +0 -56
  404. package/lib/typescript/commonjs/src/modules/network/NetworkManager.d.ts.map +0 -1
  405. package/lib/typescript/commonjs/src/modules/offline/NativeOfflineModule.d.ts.map +0 -1
  406. package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +0 -1
  407. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +0 -1
  408. package/lib/typescript/commonjs/src/modules/static-map/NativeStaticMapModule.d.ts.map +0 -1
  409. package/lib/typescript/commonjs/src/modules/static-map/StaticMapManager.d.ts.map +0 -1
  410. package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts.map +0 -1
  411. package/lib/typescript/commonjs/src/plugin/android.d.ts.map +0 -1
  412. package/lib/typescript/commonjs/src/plugin/ios.d.ts.map +0 -1
  413. package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts.map +0 -1
  414. package/lib/typescript/commonjs/src/types/Anchor.d.ts.map +0 -1
  415. package/lib/typescript/commonjs/src/types/BaseProps.d.ts.map +0 -1
  416. package/lib/typescript/commonjs/src/types/LngLat.d.ts.map +0 -1
  417. package/lib/typescript/commonjs/src/types/LngLatBounds.d.ts.map +0 -1
  418. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +0 -1
  419. package/lib/typescript/commonjs/src/types/PixelPoint.d.ts.map +0 -1
  420. package/lib/typescript/commonjs/src/types/PixelPointBounds.d.ts.map +0 -1
  421. package/lib/typescript/commonjs/src/types/PressEvent.d.ts.map +0 -1
  422. package/lib/typescript/commonjs/src/types/PressEventWithFeatures.d.ts.map +0 -1
  423. package/lib/typescript/commonjs/src/types/ViewPadding.d.ts.map +0 -1
  424. package/lib/typescript/commonjs/src/types/codegen/UnsafeMixed.d.ts.map +0 -1
  425. package/lib/typescript/commonjs/src/types/sources/PressableSourceProps.d.ts.map +0 -1
  426. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +0 -1
  427. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +0 -1
  428. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +0 -1
  429. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +0 -1
  430. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +0 -1
  431. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +0 -1
  432. package/lib/typescript/commonjs/src/utils/animated/AnimatedGeoJSON.d.ts.map +0 -1
  433. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +0 -1
  434. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +0 -1
  435. package/lib/typescript/commonjs/src/utils/convertStyleSpec.d.ts.map +0 -1
  436. package/lib/typescript/commonjs/src/utils/findNodeHandle.d.ts.map +0 -1
  437. package/lib/typescript/commonjs/src/utils/getNativeFilter.d.ts.map +0 -1
  438. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts.map +0 -1
  439. package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
  440. package/lib/typescript/module/src/components/annotations/LayerAnnotation.d.ts.map +0 -1
  441. package/lib/typescript/module/src/components/annotations/callout/Callout.d.ts.map +0 -1
  442. package/lib/typescript/module/src/components/annotations/callout/CalloutNativeComponent.d.ts.map +0 -1
  443. package/lib/typescript/module/src/components/annotations/marker/Marker.d.ts.map +0 -1
  444. package/lib/typescript/module/src/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +0 -1
  445. package/lib/typescript/module/src/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +0 -1
  446. package/lib/typescript/module/src/components/annotations/view-annotation/ViewAnnotation.d.ts.map +0 -1
  447. package/lib/typescript/module/src/components/camera/Camera.d.ts.map +0 -1
  448. package/lib/typescript/module/src/components/camera/CameraNativeComponent.d.ts.map +0 -1
  449. package/lib/typescript/module/src/components/camera/NativeCameraModule.d.ts.map +0 -1
  450. package/lib/typescript/module/src/components/images/Images.d.ts.map +0 -1
  451. package/lib/typescript/module/src/components/images/ImagesNativeComponent.d.ts.map +0 -1
  452. package/lib/typescript/module/src/components/layer/Layer.d.ts.map +0 -1
  453. package/lib/typescript/module/src/components/layer/LayerNativeComponent.d.ts.map +0 -1
  454. package/lib/typescript/module/src/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +0 -1
  455. package/lib/typescript/module/src/components/map/Map.d.ts.map +0 -1
  456. package/lib/typescript/module/src/components/map/MapViewNativeComponent.d.ts.map +0 -1
  457. package/lib/typescript/module/src/components/map/NativeMapViewModule.d.ts.map +0 -1
  458. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +0 -1
  459. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +0 -1
  460. package/lib/typescript/module/src/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +0 -1
  461. package/lib/typescript/module/src/components/sources/image-source/ImageSource.d.ts.map +0 -1
  462. package/lib/typescript/module/src/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +0 -1
  463. package/lib/typescript/module/src/components/sources/raster-source/RasterSource.d.ts.map +0 -1
  464. package/lib/typescript/module/src/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +0 -1
  465. package/lib/typescript/module/src/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +0 -1
  466. package/lib/typescript/module/src/components/sources/vector-source/VectorSource.d.ts.map +0 -1
  467. package/lib/typescript/module/src/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +0 -1
  468. package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts.map +0 -1
  469. package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +0 -1
  470. package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map +0 -1
  471. package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +0 -1
  472. package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +0 -1
  473. package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts.map +0 -1
  474. package/lib/typescript/module/src/hooks/useFrozenId.d.ts.map +0 -1
  475. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +0 -1
  476. package/lib/typescript/module/src/index.d.ts.map +0 -1
  477. package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +0 -1
  478. package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts.map +0 -1
  479. package/lib/typescript/module/src/modules/log/LogManager.d.ts.map +0 -1
  480. package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts.map +0 -1
  481. package/lib/typescript/module/src/modules/network/NativeNetworkModule.d.ts.map +0 -1
  482. package/lib/typescript/module/src/modules/network/NetworkManager.d.ts +0 -56
  483. package/lib/typescript/module/src/modules/network/NetworkManager.d.ts.map +0 -1
  484. package/lib/typescript/module/src/modules/offline/NativeOfflineModule.d.ts.map +0 -1
  485. package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +0 -1
  486. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +0 -1
  487. package/lib/typescript/module/src/modules/static-map/NativeStaticMapModule.d.ts.map +0 -1
  488. package/lib/typescript/module/src/modules/static-map/StaticMapManager.d.ts.map +0 -1
  489. package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts.map +0 -1
  490. package/lib/typescript/module/src/plugin/android.d.ts.map +0 -1
  491. package/lib/typescript/module/src/plugin/ios.d.ts.map +0 -1
  492. package/lib/typescript/module/src/plugin/withMapLibre.d.ts.map +0 -1
  493. package/lib/typescript/module/src/types/Anchor.d.ts.map +0 -1
  494. package/lib/typescript/module/src/types/BaseProps.d.ts.map +0 -1
  495. package/lib/typescript/module/src/types/LngLat.d.ts.map +0 -1
  496. package/lib/typescript/module/src/types/LngLatBounds.d.ts.map +0 -1
  497. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +0 -1
  498. package/lib/typescript/module/src/types/PixelPoint.d.ts.map +0 -1
  499. package/lib/typescript/module/src/types/PixelPointBounds.d.ts.map +0 -1
  500. package/lib/typescript/module/src/types/PressEvent.d.ts.map +0 -1
  501. package/lib/typescript/module/src/types/PressEventWithFeatures.d.ts.map +0 -1
  502. package/lib/typescript/module/src/types/ViewPadding.d.ts.map +0 -1
  503. package/lib/typescript/module/src/types/codegen/UnsafeMixed.d.ts.map +0 -1
  504. package/lib/typescript/module/src/types/sources/PressableSourceProps.d.ts.map +0 -1
  505. package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +0 -1
  506. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +0 -1
  507. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +0 -1
  508. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +0 -1
  509. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +0 -1
  510. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +0 -1
  511. package/lib/typescript/module/src/utils/animated/AnimatedGeoJSON.d.ts.map +0 -1
  512. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +0 -1
  513. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +0 -1
  514. package/lib/typescript/module/src/utils/convertStyleSpec.d.ts.map +0 -1
  515. package/lib/typescript/module/src/utils/findNodeHandle.d.ts.map +0 -1
  516. package/lib/typescript/module/src/utils/getNativeFilter.d.ts.map +0 -1
  517. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts.map +0 -1
  518. package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
  519. /package/android/src/main/res/drawable-xxhdpi/{red_marker.png → default_marker.png} +0 -0
  520. /package/ios/{components/images → utils}/MLRNImageUtils.h +0 -0
  521. /package/ios/{components/images → utils}/MLRNImageUtils.m +0 -0
  522. /package/lib/typescript/commonjs/{src/components → components}/annotations/LayerAnnotation.d.ts +0 -0
  523. /package/lib/typescript/commonjs/{src/components → components}/annotations/callout/Callout.d.ts +0 -0
  524. /package/lib/typescript/commonjs/{src/components → components}/annotations/callout/CalloutNativeComponent.d.ts +0 -0
  525. /package/lib/typescript/commonjs/{src/components → components}/camera/CameraNativeComponent.d.ts +0 -0
  526. /package/lib/typescript/commonjs/{src/components → components}/camera/NativeCameraModule.d.ts +0 -0
  527. /package/lib/typescript/commonjs/{src/components → components}/images/ImagesNativeComponent.d.ts +0 -0
  528. /package/lib/typescript/commonjs/{src/components → components}/layer/LayerNativeComponent.d.ts +0 -0
  529. /package/lib/typescript/commonjs/{src/components → components}/map/NativeMapViewModule.d.ts +0 -0
  530. /package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +0 -0
  531. /package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +0 -0
  532. /package/lib/typescript/commonjs/{src/components → components}/sources/image-source/ImageSource.d.ts +0 -0
  533. /package/lib/typescript/commonjs/{src/components → components}/sources/image-source/ImageSourceNativeComponent.d.ts +0 -0
  534. /package/lib/typescript/commonjs/{src/components → components}/sources/raster-source/RasterSource.d.ts +0 -0
  535. /package/lib/typescript/commonjs/{src/components → components}/sources/raster-source/RasterSourceNativeComponent.d.ts +0 -0
  536. /package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/NativeVectorSourceModule.d.ts +0 -0
  537. /package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/VectorSourceNativeComponent.d.ts +0 -0
  538. /package/lib/typescript/commonjs/{src/components → components}/user-location/NativeUserLocation.d.ts +0 -0
  539. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocation.d.ts +0 -0
  540. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationNativeComponent.d.ts +0 -0
  541. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationPuck.d.ts +0 -0
  542. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationPuckHeading.d.ts +0 -0
  543. /package/lib/typescript/commonjs/{src/hooks → hooks}/useCurrentPosition.d.ts +0 -0
  544. /package/lib/typescript/commonjs/{src/hooks → hooks}/useFrozenId.d.ts +0 -0
  545. /package/lib/typescript/commonjs/{src/hooks → hooks}/useNativeBridge.d.ts +0 -0
  546. /package/lib/typescript/commonjs/{src/modules → modules}/location/LocationManager.d.ts +0 -0
  547. /package/lib/typescript/commonjs/{src/modules → modules}/location/NativeLocationModule.d.ts +0 -0
  548. /package/lib/typescript/commonjs/{src/modules → modules}/log/LogManager.d.ts +0 -0
  549. /package/lib/typescript/commonjs/{src/modules → modules}/log/NativeLogModule.d.ts +0 -0
  550. /package/lib/typescript/commonjs/{src/modules → modules}/offline/NativeOfflineModule.d.ts +0 -0
  551. /package/lib/typescript/commonjs/{src/modules → modules}/offline/OfflineManager.d.ts +0 -0
  552. /package/lib/typescript/commonjs/{src/modules → modules}/offline/OfflinePack.d.ts +0 -0
  553. /package/lib/typescript/commonjs/{src/modules → modules}/static-map/NativeStaticMapModule.d.ts +0 -0
  554. /package/lib/typescript/commonjs/{src/modules → modules}/static-map/StaticMapManager.d.ts +0 -0
  555. /package/lib/typescript/commonjs/{src/plugin → plugin}/MapLibrePluginProps.d.ts +0 -0
  556. /package/lib/typescript/commonjs/{src/plugin → plugin}/android.d.ts +0 -0
  557. /package/lib/typescript/commonjs/{src/plugin → plugin}/ios.d.ts +0 -0
  558. /package/lib/typescript/commonjs/{src/plugin → plugin}/withMapLibre.d.ts +0 -0
  559. /package/lib/typescript/commonjs/{src/types → types}/Anchor.d.ts +0 -0
  560. /package/lib/typescript/commonjs/{src/types → types}/BaseProps.d.ts +0 -0
  561. /package/lib/typescript/commonjs/{src/types → types}/LngLat.d.ts +0 -0
  562. /package/lib/typescript/commonjs/{src/types → types}/LngLatBounds.d.ts +0 -0
  563. /package/lib/typescript/commonjs/{src/types → types}/PixelPoint.d.ts +0 -0
  564. /package/lib/typescript/commonjs/{src/types → types}/PixelPointBounds.d.ts +0 -0
  565. /package/lib/typescript/commonjs/{src/types → types}/PressEvent.d.ts +0 -0
  566. /package/lib/typescript/commonjs/{src/types → types}/PressEventWithFeatures.d.ts +0 -0
  567. /package/lib/typescript/commonjs/{src/types → types}/ViewPadding.d.ts +0 -0
  568. /package/lib/typescript/commonjs/{src/types → types}/codegen/UnsafeMixed.d.ts +0 -0
  569. /package/lib/typescript/commonjs/{src/types → types}/sources/PressableSourceProps.d.ts +0 -0
  570. /package/lib/typescript/commonjs/{src/utils → utils}/BridgeValue.d.ts +0 -0
  571. /package/lib/typescript/commonjs/{src/utils → utils}/StyleValue.d.ts +0 -0
  572. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AbstractAnimatedCoordinates.d.ts +0 -0
  573. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedCoordinatesArray.d.ts +0 -0
  574. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -0
  575. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedGeoJSON.d.ts +0 -0
  576. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedPoint.d.ts +0 -0
  577. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedRouteCoordinatesArray.d.ts +0 -0
  578. /package/lib/typescript/commonjs/{src/utils → utils}/convertStyleSpec.d.ts +0 -0
  579. /package/lib/typescript/commonjs/{src/utils → utils}/findNodeHandle.d.ts +0 -0
  580. /package/lib/typescript/commonjs/{src/utils → utils}/getNativeFilter.d.ts +0 -0
  581. /package/lib/typescript/commonjs/{src/utils → utils}/getStylePropertyType.d.ts +0 -0
  582. /package/lib/typescript/commonjs/{src/utils → utils}/index.d.ts +0 -0
  583. /package/lib/typescript/module/{src/components → components}/annotations/LayerAnnotation.d.ts +0 -0
  584. /package/lib/typescript/module/{src/components → components}/annotations/callout/Callout.d.ts +0 -0
  585. /package/lib/typescript/module/{src/components → components}/annotations/callout/CalloutNativeComponent.d.ts +0 -0
  586. /package/lib/typescript/module/{src/components → components}/camera/CameraNativeComponent.d.ts +0 -0
  587. /package/lib/typescript/module/{src/components → components}/camera/NativeCameraModule.d.ts +0 -0
  588. /package/lib/typescript/module/{src/components → components}/images/ImagesNativeComponent.d.ts +0 -0
  589. /package/lib/typescript/module/{src/components → components}/layer/LayerNativeComponent.d.ts +0 -0
  590. /package/lib/typescript/module/{src/components → components}/map/NativeMapViewModule.d.ts +0 -0
  591. /package/lib/typescript/module/{src/components → components}/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +0 -0
  592. /package/lib/typescript/module/{src/components → components}/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +0 -0
  593. /package/lib/typescript/module/{src/components → components}/sources/image-source/ImageSource.d.ts +0 -0
  594. /package/lib/typescript/module/{src/components → components}/sources/image-source/ImageSourceNativeComponent.d.ts +0 -0
  595. /package/lib/typescript/module/{src/components → components}/sources/raster-source/RasterSource.d.ts +0 -0
  596. /package/lib/typescript/module/{src/components → components}/sources/raster-source/RasterSourceNativeComponent.d.ts +0 -0
  597. /package/lib/typescript/module/{src/components → components}/sources/vector-source/NativeVectorSourceModule.d.ts +0 -0
  598. /package/lib/typescript/module/{src/components → components}/sources/vector-source/VectorSourceNativeComponent.d.ts +0 -0
  599. /package/lib/typescript/module/{src/components → components}/user-location/NativeUserLocation.d.ts +0 -0
  600. /package/lib/typescript/module/{src/components → components}/user-location/UserLocation.d.ts +0 -0
  601. /package/lib/typescript/module/{src/components → components}/user-location/UserLocationNativeComponent.d.ts +0 -0
  602. /package/lib/typescript/module/{src/components → components}/user-location/UserLocationPuck.d.ts +0 -0
  603. /package/lib/typescript/module/{src/components → components}/user-location/UserLocationPuckHeading.d.ts +0 -0
  604. /package/lib/typescript/module/{src/hooks → hooks}/useCurrentPosition.d.ts +0 -0
  605. /package/lib/typescript/module/{src/hooks → hooks}/useFrozenId.d.ts +0 -0
  606. /package/lib/typescript/module/{src/hooks → hooks}/useNativeBridge.d.ts +0 -0
  607. /package/lib/typescript/module/{src/modules → modules}/location/LocationManager.d.ts +0 -0
  608. /package/lib/typescript/module/{src/modules → modules}/location/NativeLocationModule.d.ts +0 -0
  609. /package/lib/typescript/module/{src/modules → modules}/log/LogManager.d.ts +0 -0
  610. /package/lib/typescript/module/{src/modules → modules}/log/NativeLogModule.d.ts +0 -0
  611. /package/lib/typescript/module/{src/modules → modules}/offline/NativeOfflineModule.d.ts +0 -0
  612. /package/lib/typescript/module/{src/modules → modules}/offline/OfflineManager.d.ts +0 -0
  613. /package/lib/typescript/module/{src/modules → modules}/offline/OfflinePack.d.ts +0 -0
  614. /package/lib/typescript/module/{src/modules → modules}/static-map/NativeStaticMapModule.d.ts +0 -0
  615. /package/lib/typescript/module/{src/modules → modules}/static-map/StaticMapManager.d.ts +0 -0
  616. /package/lib/typescript/module/{src/plugin → plugin}/MapLibrePluginProps.d.ts +0 -0
  617. /package/lib/typescript/module/{src/plugin → plugin}/android.d.ts +0 -0
  618. /package/lib/typescript/module/{src/plugin → plugin}/ios.d.ts +0 -0
  619. /package/lib/typescript/module/{src/plugin → plugin}/withMapLibre.d.ts +0 -0
  620. /package/lib/typescript/module/{src/types → types}/Anchor.d.ts +0 -0
  621. /package/lib/typescript/module/{src/types → types}/BaseProps.d.ts +0 -0
  622. /package/lib/typescript/module/{src/types → types}/LngLat.d.ts +0 -0
  623. /package/lib/typescript/module/{src/types → types}/LngLatBounds.d.ts +0 -0
  624. /package/lib/typescript/module/{src/types → types}/PixelPoint.d.ts +0 -0
  625. /package/lib/typescript/module/{src/types → types}/PixelPointBounds.d.ts +0 -0
  626. /package/lib/typescript/module/{src/types → types}/PressEvent.d.ts +0 -0
  627. /package/lib/typescript/module/{src/types → types}/PressEventWithFeatures.d.ts +0 -0
  628. /package/lib/typescript/module/{src/types → types}/ViewPadding.d.ts +0 -0
  629. /package/lib/typescript/module/{src/types → types}/codegen/UnsafeMixed.d.ts +0 -0
  630. /package/lib/typescript/module/{src/types → types}/sources/PressableSourceProps.d.ts +0 -0
  631. /package/lib/typescript/module/{src/utils → utils}/BridgeValue.d.ts +0 -0
  632. /package/lib/typescript/module/{src/utils → utils}/StyleValue.d.ts +0 -0
  633. /package/lib/typescript/module/{src/utils → utils}/animated/AbstractAnimatedCoordinates.d.ts +0 -0
  634. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedCoordinatesArray.d.ts +0 -0
  635. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -0
  636. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedGeoJSON.d.ts +0 -0
  637. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedPoint.d.ts +0 -0
  638. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedRouteCoordinatesArray.d.ts +0 -0
  639. /package/lib/typescript/module/{src/utils → utils}/convertStyleSpec.d.ts +0 -0
  640. /package/lib/typescript/module/{src/utils → utils}/findNodeHandle.d.ts +0 -0
  641. /package/lib/typescript/module/{src/utils → utils}/getNativeFilter.d.ts +0 -0
  642. /package/lib/typescript/module/{src/utils → utils}/getStylePropertyType.d.ts +0 -0
  643. /package/lib/typescript/module/{src/utils → utils}/index.d.ts +0 -0
@@ -13,6 +13,9 @@ import android.view.MotionEvent
13
13
  import android.view.View
14
14
  import android.view.ViewGroup
15
15
  import android.widget.FrameLayout
16
+ import androidx.core.graphics.Insets
17
+ import androidx.core.view.ViewCompat
18
+ import androidx.core.view.WindowInsetsCompat
16
19
  import com.facebook.react.bridge.Arguments
17
20
  import com.facebook.react.bridge.LifecycleEventListener
18
21
  import com.facebook.react.bridge.ReactContext
@@ -37,6 +40,8 @@ import org.maplibre.android.maps.Style.OnStyleLoaded
37
40
  import org.maplibre.android.plugins.annotation.OnSymbolDragListener
38
41
  import org.maplibre.android.plugins.annotation.Symbol
39
42
  import org.maplibre.android.plugins.annotation.SymbolManager
43
+ import org.maplibre.android.plugins.scalebar.ScaleBarOptions
44
+ import org.maplibre.android.plugins.scalebar.ScaleBarPlugin
40
45
  import org.maplibre.android.style.expressions.Expression
41
46
  import org.maplibre.android.style.layers.Layer
42
47
  import org.maplibre.android.style.layers.Property
@@ -91,7 +96,6 @@ open class MLRNMapView(
91
96
  OnMapReadyCallback,
92
97
  MapLibreMap.OnMapClickListener,
93
98
  MapLibreMap.OnMapLongClickListener,
94
- MapView.OnCameraIsChangingListener,
95
99
  MapView.OnCameraDidChangeListener,
96
100
  MapView.OnWillStartLoadingMapListener,
97
101
  MapView.OnDidFailLoadingMapListener,
@@ -154,10 +158,14 @@ open class MLRNMapView(
154
158
  private var compassMargins: IntArray? = null
155
159
  private var compassHiddenFacingNorth: Boolean? = null
156
160
 
157
- private var symbolManager: SymbolManager? = null
161
+ private var scaleBarEnabled: Boolean? = null
162
+ private var scaleBarMarginTop: Float? = null
163
+ private var scaleBarMarginLeft: Float? = null
164
+ private var scaleBarPlugin: ScaleBarPlugin? = null
165
+
166
+ private var windowInsets: WindowInsetsCompat? = null
158
167
 
159
- private var activePointAnnotationAnnotationId: Long? = null
160
- private var pointAnnotationClicked = false
168
+ private var symbolManager: SymbolManager? = null
161
169
 
162
170
  private var markerViewManager: MarkerViewManager? = null
163
171
  private var offscreenAnnotationViewContainer: ViewGroup? = null
@@ -195,6 +203,22 @@ open class MLRNMapView(
195
203
  destroyed = true
196
204
  }
197
205
 
206
+ override fun onAttachedToWindow() {
207
+ super.onAttachedToWindow()
208
+ ViewCompat.setOnApplyWindowInsetsListener(this) { _, insets ->
209
+ windowInsets = insets
210
+ updateUISettings()
211
+ updateScaleBar()
212
+ insets
213
+ }
214
+ ViewCompat.requestApplyInsets(this)
215
+ }
216
+
217
+ override fun onDetachedFromWindow() {
218
+ super.onDetachedFromWindow()
219
+ ViewCompat.setOnApplyWindowInsetsListener(this, null)
220
+ }
221
+
198
222
  fun addFeature(
199
223
  childView: View?,
200
224
  childPosition: Int,
@@ -264,10 +288,6 @@ open class MLRNMapView(
264
288
  }
265
289
 
266
290
  is MLRNPointAnnotation -> {
267
- if (child.feature.annotationId == activePointAnnotationAnnotationId) {
268
- activePointAnnotationAnnotationId = null
269
- }
270
-
271
291
  child.feature.mapLibreId?.let { pointAnnotations.remove(it) }
272
292
  }
273
293
 
@@ -324,18 +344,11 @@ open class MLRNMapView(
324
344
  mapLibreMap!!.moveCamera(cameraUpdate, callback)
325
345
  }
326
346
 
327
- fun getPointAnnotationByMarkerID(markerID: Long): MLRNPointAnnotation? {
328
- for (key in pointAnnotations.keys) {
329
- val annotation = pointAnnotations[key]
330
-
331
- if (annotation != null && markerID == annotation.annotationId) {
332
- return annotation
333
- }
347
+ fun getPointAnnotationByAnnotationId(annotationId: Long): MLRNPointAnnotation? =
348
+ pointAnnotations.values.find {
349
+ it.annotationId == annotationId
334
350
  }
335
351
 
336
- return null
337
- }
338
-
339
352
  fun getSymbolManager(): SymbolManager = symbolManager!!
340
353
 
341
354
  interface FoundLayerCallback {
@@ -361,7 +374,6 @@ open class MLRNMapView(
361
374
 
362
375
  setLifecycleListeners()
363
376
 
364
- addOnCameraIsChangingListener(this)
365
377
  addOnCameraDidChangeListener(this)
366
378
  addOnDidFailLoadingMapListener(this)
367
379
  addOnDidFinishLoadingMapListener(this)
@@ -402,6 +414,37 @@ open class MLRNMapView(
402
414
  override fun onMapReady(mapLibreMap: MapLibreMap) {
403
415
  this.mapLibreMap = mapLibreMap
404
416
 
417
+ val uiSettings = mapLibreMap.uiSettings
418
+ attributionGravity = Gravity.END or Gravity.BOTTOM
419
+ attributionMargin =
420
+ intArrayOf(
421
+ 0,
422
+ 0,
423
+ (4 * displayDensity).roundToInt(),
424
+ (4 * displayDensity).roundToInt(),
425
+ )
426
+
427
+ if (logoGravity == null) logoGravity = uiSettings.logoGravity
428
+ if (logoMargins == null) {
429
+ logoMargins =
430
+ intArrayOf(
431
+ uiSettings.logoMarginLeft,
432
+ uiSettings.logoMarginTop,
433
+ uiSettings.logoMarginRight,
434
+ uiSettings.logoMarginBottom,
435
+ )
436
+ }
437
+ if (compassGravity == null) compassGravity = uiSettings.compassGravity
438
+ if (compassMargins == null) {
439
+ compassMargins =
440
+ intArrayOf(
441
+ uiSettings.compassMarginLeft,
442
+ uiSettings.compassMarginTop,
443
+ uiSettings.compassMarginRight,
444
+ uiSettings.compassMarginBottom,
445
+ )
446
+ }
447
+
405
448
  mapStyle?.let { style ->
406
449
  mapLibreMap.setStyle(
407
450
  if (ConvertUtils.isJSONValid(style)) {
@@ -425,12 +468,17 @@ open class MLRNMapView(
425
468
  updatePreferredFramesPerSecond()
426
469
  updateInsets()
427
470
  updateUISettings()
471
+ updateScaleBar()
428
472
 
429
473
  mapLibreMap.addOnCameraMoveStartedListener { reason ->
430
474
  cameraChangeTracker.setReason(reason)
431
475
  handleMapChangedEvent("onRegionWillChange", true)
432
476
  }
433
477
 
478
+ mapLibreMap.addOnCameraMoveListener {
479
+ handleMapChangedEvent("onRegionIsChanging", true)
480
+ }
481
+
434
482
  mapLibreMap.addOnMoveListener(
435
483
  object : MapLibreMap.OnMoveListener {
436
484
  override fun onMoveBegin(detector: MoveGestureDetector) {
@@ -439,8 +487,7 @@ open class MLRNMapView(
439
487
  }
440
488
 
441
489
  override fun onMove(detector: MoveGestureDetector) {
442
- cameraChangeTracker.setReason(CameraChangeTracker.USER_GESTURE)
443
- handleMapChangedEvent("onRegionIsChanging", true)
490
+ // Handled by mapLibreMap.addOnCameraMoveListener
444
491
  }
445
492
 
446
493
  override fun onMoveEnd(detector: MoveGestureDetector) {
@@ -465,28 +512,24 @@ open class MLRNMapView(
465
512
  symbolManager = SymbolManager(this, this.mapLibreMap!!, style)
466
513
  symbolManager!!.setIconAllowOverlap(true)
467
514
  symbolManager!!.addClickListener { symbol ->
468
- onMarkerClick(symbol)
515
+ onPointAnnotationClick(symbol)
469
516
  true
470
517
  }
471
518
  symbolManager!!.addDragListener(
472
519
  object : OnSymbolDragListener {
473
520
  override fun onAnnotationDragStarted(symbol: Symbol) {
474
- pointAnnotationClicked = true
475
- val selectedMarkerID = symbol.id
476
- val annotation = getPointAnnotationByMarkerID(selectedMarkerID)
521
+ val selectedPointAnnotationID = symbol.id
522
+ val annotation = getPointAnnotationByAnnotationId(selectedPointAnnotationID)
477
523
  annotation?.onDragStart()
478
524
  }
479
525
 
480
526
  override fun onAnnotationDrag(symbol: Symbol) {
481
- val selectedMarkerID = symbol.id
482
- val annotation = getPointAnnotationByMarkerID(selectedMarkerID)
527
+ val annotation = getPointAnnotationByAnnotationId(symbol.id)
483
528
  annotation?.onDrag()
484
529
  }
485
530
 
486
531
  override fun onAnnotationDragFinished(symbol: Symbol) {
487
- pointAnnotationClicked = false
488
- val selectedMarkerID = symbol.id
489
- val annotation = getPointAnnotationByMarkerID(selectedMarkerID)
532
+ val annotation = getPointAnnotationByAnnotationId(symbol.id)
490
533
  annotation?.onDragEnd()
491
534
  }
492
535
  },
@@ -544,22 +587,29 @@ open class MLRNMapView(
544
587
  markerViewManager!!.restoreViews()
545
588
  }
546
589
  }
590
+
591
+ if (changed) {
592
+ handler.post {
593
+ updateUISettings()
594
+ updateScaleBar()
595
+ }
596
+ }
547
597
  }
548
598
 
549
599
  override fun onMapClick(latLng: LatLng): Boolean {
550
- if (pointAnnotationClicked) {
551
- pointAnnotationClicked = false
552
- }
600
+ pointAnnotations.values.find { it.selected }?.let { deselectAnnotation(it) }
553
601
 
554
- if (activePointAnnotationAnnotationId != null) {
555
- val active = pointAnnotations.values.find { it.annotationId == activePointAnnotationAnnotationId }
556
- if (active != null) {
557
- deselectAnnotation(active)
602
+ val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
603
+
604
+ if (markerViewManager != null) {
605
+ val hitMarker = markerViewManager!!.findMarkerAtPoint(screenPoint)
606
+ if (hitMarker != null) {
607
+ val pressPoint = PointF(screenPoint.x / displayDensity, screenPoint.y / displayDensity)
608
+ hitMarker.markerView.onPress(latLng, pressPoint)
609
+ return true
558
610
  }
559
611
  }
560
612
 
561
- val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
562
-
563
613
  val hits: MutableMap<String, MutableList<Feature>?> = HashMap()
564
614
  val hitPressableSources: MutableList<MLRNPressableSource<*>> = ArrayList()
565
615
  for (pressableSource in this.pressableSources) {
@@ -567,10 +617,10 @@ open class MLRNMapView(
567
617
 
568
618
  val pointWithHitbox =
569
619
  RectF(
570
- screenPoint.x - hitbox.left,
571
- screenPoint.y - hitbox.top,
572
- screenPoint.x + hitbox.right,
573
- screenPoint.y + hitbox.bottom,
620
+ screenPoint.x - (hitbox.left * displayDensity),
621
+ screenPoint.y - (hitbox.top * displayDensity),
622
+ screenPoint.x + (hitbox.right * displayDensity),
623
+ screenPoint.y + (hitbox.bottom * displayDensity),
574
624
  )
575
625
 
576
626
  val features =
@@ -581,6 +631,9 @@ open class MLRNMapView(
581
631
  }
582
632
  }
583
633
 
634
+ screenPoint.x /= this.displayDensity
635
+ screenPoint.y /= this.displayDensity
636
+
584
637
  if (hits.isNotEmpty()) {
585
638
  val source = getPressableSourceWithHighestZIndex(hitPressableSources)
586
639
  if (source != null && source.hasOnPress) {
@@ -599,11 +652,14 @@ open class MLRNMapView(
599
652
  }
600
653
 
601
654
  override fun onMapLongClick(latLng: LatLng): Boolean {
602
- if (pointAnnotationClicked) {
603
- pointAnnotationClicked = false
655
+ val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
656
+
657
+ if (markerViewManager?.isPointInsideMarker(screenPoint) == true) {
658
+ return true
604
659
  }
605
660
 
606
- val screenPoint = mapLibreMap!!.projection.toScreenLocation(latLng)
661
+ screenPoint.x /= this.displayDensity
662
+ screenPoint.y /= this.displayDensity
607
663
 
608
664
  val event = MapPressEvent(surfaceId, id, "onLongPress", latLng, screenPoint)
609
665
  eventDispatcher?.dispatchEvent(event)
@@ -611,42 +667,26 @@ open class MLRNMapView(
611
667
  return false
612
668
  }
613
669
 
614
- fun onMarkerClick(symbol: Symbol) {
615
- pointAnnotationClicked = true
616
- val selectedMarkerID = symbol.id
617
-
618
- var activeAnnotation: MLRNPointAnnotation? = null
619
- var nextActiveAnnotation: MLRNPointAnnotation? = null
670
+ fun onPointAnnotationClick(nextSymbol: Symbol) {
671
+ val nextSelectedPointAnnotation =
672
+ getPointAnnotationByAnnotationId(nextSymbol.id) ?: return
620
673
 
621
- for (key in pointAnnotations.keys) {
622
- val pointAnnotation = pointAnnotations[key]
623
- val currentAnnotationId = pointAnnotation!!.annotationId
674
+ nextSelectedPointAnnotation.onPress()
624
675
 
625
- if (activePointAnnotationAnnotationId == currentAnnotationId) {
626
- activeAnnotation = pointAnnotation
627
- }
628
-
629
- if (selectedMarkerID == currentAnnotationId && activePointAnnotationAnnotationId != currentAnnotationId) {
630
- nextActiveAnnotation = pointAnnotation
631
- }
632
- }
633
-
634
- if (activeAnnotation != null) {
635
- deselectAnnotation(activeAnnotation)
636
- }
637
-
638
- if (nextActiveAnnotation != null) {
639
- selectAnnotation(nextActiveAnnotation)
676
+ if (!nextSelectedPointAnnotation.selected) {
677
+ selectAnnotation(nextSelectedPointAnnotation)
640
678
  }
641
679
  }
642
680
 
643
- fun selectAnnotation(annotation: MLRNPointAnnotation) {
644
- activePointAnnotationAnnotationId = annotation.annotationId
645
- annotation.onSelect(true)
681
+ fun selectAnnotation(nextSelectedPointAnnotation: MLRNPointAnnotation) {
682
+ pointAnnotations.values
683
+ .filter { it.selected && it !== nextSelectedPointAnnotation }
684
+ .forEach { it.onDeselect() }
685
+
686
+ nextSelectedPointAnnotation.onSelect()
646
687
  }
647
688
 
648
689
  fun deselectAnnotation(annotation: MLRNPointAnnotation) {
649
- activePointAnnotationAnnotationId = null
650
690
  annotation.onDeselect()
651
691
  }
652
692
 
@@ -654,10 +694,6 @@ open class MLRNMapView(
654
694
  cameraChangeTracker.isAnimating = animated
655
695
  }
656
696
 
657
- override fun onCameraIsChanging() {
658
- handleMapChangedEvent("onRegionIsChanging", true)
659
- }
660
-
661
697
  override fun onWillStartLoadingMap() {
662
698
  handleMapChangedEvent("onWillStartLoadingMap")
663
699
  }
@@ -825,13 +861,12 @@ open class MLRNMapView(
825
861
  if (position.hasKey("right")) gravity = gravity or Gravity.END
826
862
  if (position.hasKey("top")) gravity = gravity or Gravity.TOP
827
863
  if (position.hasKey("bottom")) gravity = gravity or Gravity.BOTTOM
828
- val density = this.displayDensity
829
864
  val margins =
830
865
  intArrayOf(
831
- if (position.hasKey("left")) (density * position.getInt("left")).roundToInt() else 0,
832
- if (position.hasKey("top")) (density * position.getInt("top")).roundToInt() else 0,
833
- if (position.hasKey("right")) (density * position.getInt("right")).roundToInt() else 0,
834
- if (position.hasKey("bottom")) (density * position.getInt("bottom")).roundToInt() else 0,
866
+ if (position.hasKey("left")) (displayDensity * position.getInt("left")).roundToInt() else 0,
867
+ if (position.hasKey("top")) (displayDensity * position.getInt("top")).roundToInt() else 0,
868
+ if (position.hasKey("right")) (displayDensity * position.getInt("right")).roundToInt() else 0,
869
+ if (position.hasKey("bottom")) (displayDensity * position.getInt("bottom")).roundToInt() else 0,
835
870
  )
836
871
  setGravity(gravity)
837
872
  setMargins(margins)
@@ -890,6 +925,39 @@ open class MLRNMapView(
890
925
  updateUISettings()
891
926
  }
892
927
 
928
+ fun setReactScaleBar(value: Boolean) {
929
+ scaleBarEnabled = value
930
+ updateScaleBar()
931
+ }
932
+
933
+ fun setReactScaleBarPosition(position: ReadableMap?) {
934
+ if (position == null) {
935
+ scaleBarMarginTop = null
936
+ scaleBarMarginLeft = null
937
+ } else {
938
+ scaleBarMarginTop = if (position.hasKey("top")) (displayDensity * position.getInt("top")) else 0f
939
+ scaleBarMarginLeft = if (position.hasKey("left")) (displayDensity * position.getInt("left")) else 0f
940
+ }
941
+ updateScaleBar()
942
+ }
943
+
944
+ private fun updateScaleBar() {
945
+ val map = mapLibreMap ?: return
946
+
947
+ if (scaleBarPlugin == null) {
948
+ scaleBarPlugin = ScaleBarPlugin(this, map)
949
+ }
950
+
951
+ val viewInsets = getSystemInsetsForView()
952
+ val options = ScaleBarOptions(context)
953
+ options.setMarginTop((scaleBarMarginTop ?: (8 * displayDensity)) + viewInsets.top)
954
+ options.setMarginLeft((scaleBarMarginLeft ?: (10 * displayDensity)) + viewInsets.left)
955
+ scaleBarPlugin!!.create(options)
956
+ scaleBarPlugin!!.isEnabled = scaleBarEnabled ?: false
957
+
958
+ reflow()
959
+ }
960
+
893
961
  fun getCenter(): WritableArray {
894
962
  val cameraPosition = mapLibreMap!!.cameraPosition
895
963
  val center = cameraPosition.target!!
@@ -937,8 +1005,7 @@ open class MLRNMapView(
937
1005
  layers: ReadableArray?,
938
1006
  filter: Expression?,
939
1007
  ): WritableArray {
940
- val density = this.displayDensity
941
- val screenPoint = PointF(point.x * density, point.y * density)
1008
+ val screenPoint = PointF(point.x * displayDensity, point.y * displayDensity)
942
1009
 
943
1010
  val features =
944
1011
  mapLibreMap!!.queryRenderedFeatures(
@@ -981,9 +1048,8 @@ open class MLRNMapView(
981
1048
 
982
1049
  fun project(mapCoordinate: LatLng): WritableArray {
983
1050
  val pointInView = mapLibreMap!!.projection.toScreenLocation(mapCoordinate)
984
- val density = this.displayDensity
985
- pointInView.x /= density
986
- pointInView.y /= density
1051
+ pointInView.x /= displayDensity
1052
+ pointInView.y /= displayDensity
987
1053
  val payload: WritableArray = Arguments.createArray()
988
1054
 
989
1055
  payload.pushDouble(pointInView.x.toDouble())
@@ -993,9 +1059,8 @@ open class MLRNMapView(
993
1059
  }
994
1060
 
995
1061
  fun unproject(pointInView: PointF): WritableArray {
996
- val density = this.displayDensity
997
- pointInView.x *= density
998
- pointInView.y *= density
1062
+ pointInView.x *= displayDensity
1063
+ pointInView.y *= displayDensity
999
1064
 
1000
1065
  val latLng = mapLibreMap!!.projection.fromScreenLocation(pointInView)
1001
1066
 
@@ -1061,6 +1126,48 @@ open class MLRNMapView(
1061
1126
  mapLibreMap!!.getStyle(onStyleLoaded)
1062
1127
  }
1063
1128
 
1129
+ private fun getSystemInsetsForView(): Insets {
1130
+ val sysInsets =
1131
+ windowInsets?.getInsets(
1132
+ WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout(),
1133
+ )
1134
+ ?: return Insets.NONE
1135
+ if (!isAttachedToWindow || width == 0 || height == 0) return Insets.NONE
1136
+
1137
+ val location = IntArray(2)
1138
+ getLocationOnScreen(location)
1139
+ val screenWidth = rootView.width
1140
+ val screenHeight = rootView.height
1141
+
1142
+ return Insets.of(
1143
+ if (location[0] <= 0) sysInsets.left else 0,
1144
+ if (location[1] <= 0) sysInsets.top else 0,
1145
+ if (location[0] + width >= screenWidth) sysInsets.right else 0,
1146
+ if (location[1] + height >= screenHeight) sysInsets.bottom else 0,
1147
+ )
1148
+ }
1149
+
1150
+ private fun marginsWithInsets(
1151
+ margins: IntArray,
1152
+ gravity: Int,
1153
+ ): IntArray {
1154
+ val viewInsets = getSystemInsetsForView()
1155
+ if (viewInsets == Insets.NONE) return margins
1156
+
1157
+ val absGravity = Gravity.getAbsoluteGravity(gravity, layoutDirection)
1158
+ val isLeft = (absGravity and Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT
1159
+ val isRight = (absGravity and Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.RIGHT
1160
+ val isTop = (absGravity and Gravity.VERTICAL_GRAVITY_MASK) == Gravity.TOP
1161
+ val isBottom = (absGravity and Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM
1162
+
1163
+ return intArrayOf(
1164
+ margins[0] + if (isLeft) viewInsets.left else 0,
1165
+ margins[1] + if (isTop) viewInsets.top else 0,
1166
+ margins[2] + if (isRight) viewInsets.right else 0,
1167
+ margins[3] + if (isBottom) viewInsets.bottom else 0,
1168
+ )
1169
+ }
1170
+
1064
1171
  private fun updateUISettings() {
1065
1172
  if (mapLibreMap == null) {
1066
1173
  return
@@ -1108,19 +1215,13 @@ open class MLRNMapView(
1108
1215
  uiSettings.attributionGravity = attributionGravity!!
1109
1216
  }
1110
1217
 
1111
- if (attributionMargin != null &&
1112
- (
1113
- uiSettings.attributionMarginLeft != attributionMargin!![0] || uiSettings.attributionMarginTop != attributionMargin!![1] ||
1114
- uiSettings.attributionMarginRight != attributionMargin!![2] ||
1115
- uiSettings.attributionMarginBottom != attributionMargin!![3]
1116
- )
1117
- ) {
1118
- uiSettings.setAttributionMargins(
1119
- attributionMargin!![0],
1120
- attributionMargin!![1],
1121
- attributionMargin!![2],
1122
- attributionMargin!![3],
1123
- )
1218
+ if (attributionMargin != null) {
1219
+ val adjusted = marginsWithInsets(attributionMargin!!, attributionGravity ?: uiSettings.attributionGravity)
1220
+ if (uiSettings.attributionMarginLeft != adjusted[0] || uiSettings.attributionMarginTop != adjusted[1] ||
1221
+ uiSettings.attributionMarginRight != adjusted[2] || uiSettings.attributionMarginBottom != adjusted[3]
1222
+ ) {
1223
+ uiSettings.setAttributionMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
1224
+ }
1124
1225
  }
1125
1226
 
1126
1227
  if (logoEnabled != null && uiSettings.isLogoEnabled != logoEnabled) {
@@ -1131,19 +1232,13 @@ open class MLRNMapView(
1131
1232
  uiSettings.logoGravity = logoGravity!!
1132
1233
  }
1133
1234
 
1134
- if (logoMargins != null &&
1135
- (
1136
- uiSettings.logoMarginLeft != logoMargins!![0] || uiSettings.logoMarginTop != logoMargins!![1] ||
1137
- uiSettings.logoMarginRight != logoMargins!![2] ||
1138
- uiSettings.logoMarginBottom != logoMargins!![3]
1139
- )
1140
- ) {
1141
- uiSettings.setLogoMargins(
1142
- logoMargins!![0],
1143
- logoMargins!![1],
1144
- logoMargins!![2],
1145
- logoMargins!![3],
1146
- )
1235
+ if (logoMargins != null) {
1236
+ val adjusted = marginsWithInsets(logoMargins!!, logoGravity ?: uiSettings.logoGravity)
1237
+ if (uiSettings.logoMarginLeft != adjusted[0] || uiSettings.logoMarginTop != adjusted[1] ||
1238
+ uiSettings.logoMarginRight != adjusted[2] || uiSettings.logoMarginBottom != adjusted[3]
1239
+ ) {
1240
+ uiSettings.setLogoMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
1241
+ }
1147
1242
  }
1148
1243
 
1149
1244
  if (compassEnabled != null && uiSettings.isCompassEnabled != compassEnabled) {
@@ -1154,19 +1249,13 @@ open class MLRNMapView(
1154
1249
  uiSettings.compassGravity = compassGravity!!
1155
1250
  }
1156
1251
 
1157
- if (compassMargins != null &&
1158
- (
1159
- uiSettings.compassMarginLeft != compassMargins!![0] || uiSettings.compassMarginTop != compassMargins!![1] ||
1160
- uiSettings.compassMarginRight != compassMargins!![2] ||
1161
- uiSettings.compassMarginBottom != compassMargins!![3]
1162
- )
1163
- ) {
1164
- uiSettings.setCompassMargins(
1165
- compassMargins!![0],
1166
- compassMargins!![1],
1167
- compassMargins!![2],
1168
- compassMargins!![3],
1169
- )
1252
+ if (compassMargins != null) {
1253
+ val adjusted = marginsWithInsets(compassMargins!!, compassGravity ?: uiSettings.compassGravity)
1254
+ if (uiSettings.compassMarginLeft != adjusted[0] || uiSettings.compassMarginTop != adjusted[1] ||
1255
+ uiSettings.compassMarginRight != adjusted[2] || uiSettings.compassMarginBottom != adjusted[3]
1256
+ ) {
1257
+ uiSettings.setCompassMargins(adjusted[0], adjusted[1], adjusted[2], adjusted[3])
1258
+ }
1170
1259
  }
1171
1260
  if (compassHiddenFacingNorth != null) {
1172
1261
  uiSettings.setCompassFadeFacingNorth(compassHiddenFacingNorth!!)
@@ -1348,7 +1437,7 @@ open class MLRNMapView(
1348
1437
  }
1349
1438
 
1350
1439
  private fun getPressableSourceWithHighestZIndex(sources: MutableList<MLRNPressableSource<*>>?): MLRNPressableSource<*>? {
1351
- if (sources == null || sources.isEmpty()) {
1440
+ if (sources.isNullOrEmpty()) {
1352
1441
  return null
1353
1442
  }
1354
1443
 
@@ -1401,10 +1490,10 @@ open class MLRNMapView(
1401
1490
  */
1402
1491
  private fun setUpImage(loadedStyle: Style) {
1403
1492
  loadedStyle.addImage(
1404
- "MARKER_IMAGE_ID",
1493
+ MLRNPointAnnotation.DEFAULT_MARKER,
1405
1494
  BitmapFactory.decodeResource(
1406
1495
  this.resources,
1407
- R.drawable.red_marker,
1496
+ R.drawable.default_marker,
1408
1497
  ),
1409
1498
  )
1410
1499
  }
@@ -78,6 +78,8 @@ open class MLRNMapViewManager(
78
78
  mViews.remove(reactTag)
79
79
  }
80
80
 
81
+ mapView.dispose()
82
+
81
83
  super.onDropViewInstance(mapView)
82
84
  }
83
85
 
@@ -213,6 +215,22 @@ open class MLRNMapViewManager(
213
215
  mapView.setReactCompassHiddenFacingNorth(value)
214
216
  }
215
217
 
218
+ @ReactProp(name = "scaleBar")
219
+ override fun setScaleBar(
220
+ mapView: MLRNMapView,
221
+ value: Boolean,
222
+ ) {
223
+ mapView.setReactScaleBar(value)
224
+ }
225
+
226
+ @ReactProp(name = "scaleBarPosition")
227
+ override fun setScaleBarPosition(
228
+ mapView: MLRNMapView,
229
+ value: ReadableMap?,
230
+ ) {
231
+ mapView.setReactScaleBarPosition(value)
232
+ }
233
+
216
234
  //endregion
217
235
 
218
236
  private class MapShadowNode(
@@ -3,10 +3,12 @@ package org.maplibre.reactnative.modules
3
3
  import android.util.Log
4
4
  import com.facebook.react.bridge.Arguments
5
5
  import com.facebook.react.bridge.ReactApplicationContext
6
+ import com.facebook.react.module.annotations.ReactModule
6
7
  import org.maplibre.android.log.Logger
7
8
  import org.maplibre.android.log.LoggerDefinition
8
9
  import org.maplibre.reactnative.NativeLogModuleSpec
9
10
 
11
+ @ReactModule(name = MLRNLogModule.NAME)
10
12
  class MLRNLogModule(
11
13
  reactContext: ReactApplicationContext,
12
14
  ) : NativeLogModuleSpec(