@maplibre/maplibre-react-native 11.0.0-beta.9 → 11.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 (718) hide show
  1. package/MapLibreReactNative.podspec +1 -1
  2. package/README.md +0 -5
  3. package/android/build.gradle +3 -1
  4. package/android/gradle.properties +2 -2
  5. package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +14 -1
  6. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerView.kt +35 -29
  7. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MLRNMarkerViewManager.kt +8 -1
  8. package/android/src/main/java/org/maplibre/reactnative/components/annotations/markerview/MarkerViewManager.kt +8 -5
  9. package/android/src/main/java/org/maplibre/reactnative/components/annotations/pointannotation/MLRNPointAnnotation.kt +45 -25
  10. package/android/src/main/java/org/maplibre/reactnative/components/annotations/pointannotation/MLRNPointAnnotationManager.kt +2 -1
  11. package/android/src/main/java/org/maplibre/reactnative/components/layer/MLRNLayer.kt +8 -8
  12. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyle.kt +60 -0
  13. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleFactory.kt +3005 -0
  14. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleValue.kt +159 -0
  15. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.kt +234 -128
  16. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt +37 -3
  17. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewModule.kt +3 -1
  18. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogModule.kt +2 -0
  19. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNNetworkModule.kt +0 -42
  20. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.kt +27 -4
  21. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNTransformRequestModule.kt +144 -0
  22. package/android/src/main/java/org/maplibre/reactnative/modules/TransformRequestInterceptor.kt +184 -0
  23. package/ios/components/annotations/point-annotation/MLRNPointAnnotation.h +3 -2
  24. package/ios/components/annotations/point-annotation/MLRNPointAnnotation.m +65 -2
  25. package/ios/components/annotations/point-annotation/MLRNPointAnnotationComponentView.mm +24 -6
  26. package/ios/components/images/MLRNImageLoader.h +27 -0
  27. package/ios/components/images/MLRNImageLoader.m +85 -0
  28. package/ios/components/images/MLRNImageQueue.h +2 -2
  29. package/ios/components/images/MLRNImageQueue.m +2 -2
  30. package/ios/components/images/MLRNImageQueueOperation.h +2 -2
  31. package/ios/components/images/MLRNImageQueueOperation.m +3 -3
  32. package/ios/components/images/MLRNImages.h +0 -3
  33. package/ios/components/images/MLRNImages.m +6 -6
  34. package/ios/components/images/MLRNImagesComponentView.mm +0 -3
  35. package/ios/components/images/MLRNImagesModule.h +6 -0
  36. package/ios/components/images/MLRNImagesModule.mm +23 -0
  37. package/ios/components/layer/MLRNLayer.h +0 -3
  38. package/ios/components/layer/MLRNLayer.m +0 -1
  39. package/ios/components/layer/MLRNLayerComponentView.mm +0 -2
  40. package/ios/components/layer/style/MLRNStyle.h +1 -3
  41. package/ios/components/layer/style/MLRNStyle.m +68 -71
  42. package/ios/components/map-view/MLRNMapView.h +8 -1
  43. package/ios/components/map-view/MLRNMapView.m +106 -24
  44. package/ios/components/map-view/MLRNMapViewComponentView.mm +28 -2
  45. package/ios/components/sources/geojson-source/MLRNGeoJSONSource.h +0 -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/offline/MLRNOfflineModule.h +1 -2
  50. package/ios/modules/offline/MLRNOfflineModule.mm +9 -9
  51. package/ios/modules/transform-request/MLRNTransformRequest.h +38 -0
  52. package/ios/modules/transform-request/MLRNTransformRequest.m +413 -0
  53. package/ios/modules/transform-request/MLRNTransformRequestModule.h +9 -0
  54. package/ios/modules/transform-request/MLRNTransformRequestModule.mm +72 -0
  55. package/ios/utils/MLRNUtils.h +0 -14
  56. package/ios/utils/MLRNUtils.m +0 -71
  57. package/lib/commonjs/components/annotations/callout/Callout.js +2 -1
  58. package/lib/commonjs/components/annotations/callout/Callout.js.map +1 -1
  59. package/lib/commonjs/components/annotations/marker/Marker.js +17 -3
  60. package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -1
  61. package/lib/commonjs/components/annotations/marker/MarkerViewNativeComponent.ts +10 -0
  62. package/lib/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +3 -2
  63. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +20 -17
  64. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  65. package/lib/commonjs/components/camera/Camera.js +52 -3
  66. package/lib/commonjs/components/camera/Camera.js.map +1 -1
  67. package/lib/commonjs/components/images/Images.js +12 -2
  68. package/lib/commonjs/components/images/Images.js.map +1 -1
  69. package/lib/commonjs/components/images/NativeImagesModule.js +10 -0
  70. package/lib/commonjs/components/images/NativeImagesModule.js.map +1 -0
  71. package/lib/commonjs/components/layer/Layer.js +18 -8
  72. package/lib/commonjs/components/layer/Layer.js.map +1 -1
  73. package/lib/commonjs/components/map/AndroidTextureMapViewNativeComponent.ts +7 -2
  74. package/lib/commonjs/components/map/Map.js +29 -4
  75. package/lib/commonjs/components/map/Map.js.map +1 -1
  76. package/lib/commonjs/components/map/MapViewNativeComponent.ts +6 -1
  77. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +6 -5
  78. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  79. package/lib/commonjs/components/sources/image-source/ImageSource.js +3 -2
  80. package/lib/commonjs/components/sources/image-source/ImageSource.js.map +1 -1
  81. package/lib/commonjs/components/sources/raster-source/RasterSource.js +4 -3
  82. package/lib/commonjs/components/sources/raster-source/RasterSource.js.map +1 -1
  83. package/lib/commonjs/components/sources/vector-source/VectorSource.js +8 -5
  84. package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
  85. package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -1
  86. package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
  87. package/lib/commonjs/index.js +7 -0
  88. package/lib/commonjs/index.js.map +1 -1
  89. package/lib/commonjs/modules/log/LogManager.js +5 -4
  90. package/lib/commonjs/modules/log/LogManager.js.map +1 -1
  91. package/lib/commonjs/modules/network/NativeNetworkModule.js.map +1 -1
  92. package/lib/commonjs/modules/network/NetworkManager.js +6 -44
  93. package/lib/commonjs/modules/network/NetworkManager.js.map +1 -1
  94. package/lib/commonjs/modules/offline/OfflineManager.js +109 -62
  95. package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -1
  96. package/lib/commonjs/modules/static-map/StaticMapManager.js +13 -5
  97. package/lib/commonjs/modules/static-map/StaticMapManager.js.map +1 -1
  98. package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js +9 -0
  99. package/lib/commonjs/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
  100. package/lib/commonjs/modules/transform-request/TransformRequestManager.js +233 -0
  101. package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -0
  102. package/lib/commonjs/plugin/ios.js +28 -15
  103. package/lib/commonjs/plugin/ios.js.map +1 -1
  104. package/lib/commonjs/types/Anchor.js +5 -6
  105. package/lib/commonjs/types/Anchor.js.map +1 -1
  106. package/lib/commonjs/types/PressableSourceProps.js.map +1 -0
  107. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  108. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +6 -6
  109. package/lib/commonjs/utils/animated/AnimatedGeoJSON.js +2 -1
  110. package/lib/commonjs/utils/animated/AnimatedGeoJSON.js.map +1 -1
  111. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +6 -6
  112. package/lib/commonjs/utils/convertStyleSpec.js +4 -4
  113. package/lib/commonjs/utils/getStylePropertyType.js +1 -1
  114. package/lib/module/components/annotations/callout/Callout.js +2 -1
  115. package/lib/module/components/annotations/callout/Callout.js.map +1 -1
  116. package/lib/module/components/annotations/marker/Marker.js +17 -3
  117. package/lib/module/components/annotations/marker/Marker.js.map +1 -1
  118. package/lib/module/components/annotations/marker/MarkerViewNativeComponent.ts +10 -0
  119. package/lib/module/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +3 -2
  120. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +20 -17
  121. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  122. package/lib/module/components/camera/Camera.js +53 -4
  123. package/lib/module/components/camera/Camera.js.map +1 -1
  124. package/lib/module/components/images/Images.js +12 -2
  125. package/lib/module/components/images/Images.js.map +1 -1
  126. package/lib/module/components/images/NativeImagesModule.js +7 -0
  127. package/lib/module/components/images/NativeImagesModule.js.map +1 -0
  128. package/lib/module/components/layer/Layer.js +18 -8
  129. package/lib/module/components/layer/Layer.js.map +1 -1
  130. package/lib/module/components/map/AndroidTextureMapViewNativeComponent.ts +7 -2
  131. package/lib/module/components/map/Map.js +30 -5
  132. package/lib/module/components/map/Map.js.map +1 -1
  133. package/lib/module/components/map/MapViewNativeComponent.ts +6 -1
  134. package/lib/module/components/sources/geojson-source/GeoJSONSource.js +7 -6
  135. package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  136. package/lib/module/components/sources/image-source/ImageSource.js +3 -2
  137. package/lib/module/components/sources/image-source/ImageSource.js.map +1 -1
  138. package/lib/module/components/sources/raster-source/RasterSource.js +4 -3
  139. package/lib/module/components/sources/raster-source/RasterSource.js.map +1 -1
  140. package/lib/module/components/sources/vector-source/VectorSource.js +9 -6
  141. package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
  142. package/lib/module/components/user-location/NativeUserLocation.js.map +1 -1
  143. package/lib/module/components/user-location/UserLocation.js.map +1 -1
  144. package/lib/module/index.js +1 -0
  145. package/lib/module/index.js.map +1 -1
  146. package/lib/module/modules/log/LogManager.js +5 -4
  147. package/lib/module/modules/log/LogManager.js.map +1 -1
  148. package/lib/module/modules/network/NativeNetworkModule.js.map +1 -1
  149. package/lib/module/modules/network/NetworkManager.js +6 -44
  150. package/lib/module/modules/network/NetworkManager.js.map +1 -1
  151. package/lib/module/modules/offline/OfflineManager.js +109 -62
  152. package/lib/module/modules/offline/OfflineManager.js.map +1 -1
  153. package/lib/module/modules/static-map/StaticMapManager.js +13 -5
  154. package/lib/module/modules/static-map/StaticMapManager.js.map +1 -1
  155. package/lib/module/modules/transform-request/NativeTransformRequestModule.js +5 -0
  156. package/lib/module/modules/transform-request/NativeTransformRequestModule.js.map +1 -0
  157. package/lib/module/modules/transform-request/TransformRequestManager.js +230 -0
  158. package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -0
  159. package/lib/module/plugin/ios.js +28 -15
  160. package/lib/module/plugin/ios.js.map +1 -1
  161. package/lib/module/types/Anchor.js +5 -6
  162. package/lib/module/types/Anchor.js.map +1 -1
  163. package/lib/module/types/PressableSourceProps.js.map +1 -0
  164. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  165. package/lib/module/utils/animated/AnimatedCoordinatesArray.js +6 -6
  166. package/lib/module/utils/animated/AnimatedGeoJSON.js +2 -1
  167. package/lib/module/utils/animated/AnimatedGeoJSON.js.map +1 -1
  168. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +6 -6
  169. package/lib/module/utils/convertStyleSpec.js +4 -4
  170. package/lib/module/utils/getStylePropertyType.js +1 -1
  171. package/lib/typescript/commonjs/components/annotations/LayerAnnotation.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/{src/components → components}/annotations/callout/Callout.d.ts +3 -2
  173. package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
  175. package/lib/typescript/{module/src → commonjs}/components/annotations/marker/Marker.d.ts +29 -22
  176. package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/{src/components → components}/annotations/marker/MarkerViewNativeComponent.d.ts +10 -0
  178. package/lib/typescript/commonjs/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
  179. package/lib/typescript/{module/src → commonjs}/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +3 -2
  180. package/lib/typescript/commonjs/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/{src/components → components}/annotations/view-annotation/ViewAnnotation.d.ts +35 -29
  182. package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/{src/components → components}/camera/Camera.d.ts +85 -43
  184. package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/components/camera/CameraNativeComponent.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/components/camera/NativeCameraModule.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/{src/components → components}/images/Images.d.ts +20 -12
  188. package/lib/typescript/commonjs/components/images/Images.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/components/images/ImagesNativeComponent.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/components/images/NativeImagesModule.d.ts +6 -0
  191. package/lib/typescript/commonjs/components/images/NativeImagesModule.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/{src/components → components}/layer/Layer.d.ts +18 -8
  193. package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/components/layer/LayerNativeComponent.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/{src/components → components}/map/AndroidTextureMapViewNativeComponent.d.ts +5 -1
  196. package/lib/typescript/commonjs/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/{src/components → components}/map/Map.d.ts +151 -75
  198. package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -0
  199. package/lib/typescript/{module/src → commonjs}/components/map/MapViewNativeComponent.d.ts +5 -1
  200. package/lib/typescript/commonjs/components/map/MapViewNativeComponent.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/components/map/NativeMapViewModule.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/GeoJSONSource.d.ts +47 -44
  203. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/{src/components → components}/sources/image-source/ImageSource.d.ts +5 -3
  207. package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/{src/components → components}/sources/raster-source/RasterSource.d.ts +20 -15
  210. package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts +75 -0
  214. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +1 -0
  216. package/lib/typescript/{module/src → commonjs}/components/user-location/NativeUserLocation.d.ts +9 -6
  217. package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocation.d.ts +4 -2
  219. package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/components/user-location/UserLocationPuck.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/{src/hooks → hooks}/useCurrentPosition.d.ts +2 -2
  224. package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/hooks/useFrozenId.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/hooks/useNativeBridge.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/{src/index.d.ts → index.d.ts} +3 -2
  228. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/modules/location/LocationManager.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/modules/location/NativeLocationModule.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/{src/modules → modules}/log/LogManager.d.ts +5 -4
  232. package/lib/typescript/commonjs/modules/log/LogManager.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/modules/log/NativeLogModule.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/{src/modules → modules}/network/NativeNetworkModule.d.ts +0 -2
  235. package/lib/typescript/commonjs/modules/network/NativeNetworkModule.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts +24 -0
  237. package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/modules/offline/NativeOfflineModule.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/{src/modules → modules}/offline/OfflineManager.d.ts +110 -63
  240. package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/modules/offline/OfflinePack.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/modules/static-map/NativeStaticMapModule.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/{src/modules → modules}/static-map/StaticMapManager.d.ts +15 -7
  244. package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
  246. package/lib/typescript/commonjs/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +213 -0
  248. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
  249. package/lib/typescript/{module/src → commonjs}/plugin/MapLibrePluginProps.d.ts +10 -15
  250. package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/plugin/android.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/{src/plugin → plugin}/ios.d.ts +2 -2
  253. package/lib/typescript/commonjs/plugin/ios.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/plugin/withMapLibre.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/types/Anchor.d.ts +16 -0
  256. package/lib/typescript/commonjs/types/Anchor.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/types/BaseProps.d.ts +7 -0
  258. package/lib/typescript/commonjs/types/BaseProps.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/types/LngLat.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/{src/types → types}/LngLatBounds.d.ts +2 -1
  261. package/lib/typescript/commonjs/types/LngLatBounds.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/{src/types → types}/MapLibreRNStyles.d.ts +316 -132
  263. package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/types/PixelPoint.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/types/PixelPointBounds.d.ts.map +1 -0
  266. package/lib/typescript/{module/src → commonjs}/types/PressEvent.d.ts +3 -0
  267. package/lib/typescript/commonjs/types/PressEvent.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/{src/types → types}/PressEventWithFeatures.d.ts +3 -0
  269. package/lib/typescript/commonjs/types/PressEventWithFeatures.d.ts.map +1 -0
  270. package/lib/typescript/{module/src/types/sources → commonjs/types}/PressableSourceProps.d.ts +6 -4
  271. package/lib/typescript/commonjs/types/PressableSourceProps.d.ts.map +1 -0
  272. package/lib/typescript/{module/src → commonjs}/types/ViewPadding.d.ts +3 -0
  273. package/lib/typescript/commonjs/types/ViewPadding.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/types/codegen/UnsafeMixed.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/utils/BridgeValue.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/utils/StyleValue.d.ts.map +1 -0
  277. package/lib/typescript/{module/src → commonjs}/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  278. package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
  279. package/lib/typescript/{module/src → commonjs}/utils/animated/Animated.d.ts +1 -1
  280. package/lib/typescript/commonjs/utils/animated/Animated.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedCoordinatesArray.d.ts +6 -6
  282. package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedGeoJSON.d.ts +2 -1
  285. package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/utils/animated/AnimatedPoint.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedRouteCoordinatesArray.d.ts +6 -6
  288. package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  289. package/lib/typescript/{module/src → commonjs}/utils/convertStyleSpec.d.ts +4 -4
  290. package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/utils/findNodeHandle.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/utils/getNativeFilter.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/utils/getStylePropertyType.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
  295. package/lib/typescript/module/components/annotations/LayerAnnotation.d.ts.map +1 -0
  296. package/lib/typescript/module/{src/components → components}/annotations/callout/Callout.d.ts +3 -2
  297. package/lib/typescript/module/components/annotations/callout/Callout.d.ts.map +1 -0
  298. package/lib/typescript/module/components/annotations/callout/CalloutNativeComponent.d.ts.map +1 -0
  299. package/lib/typescript/{commonjs/src → module}/components/annotations/marker/Marker.d.ts +29 -22
  300. package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -0
  301. package/lib/typescript/module/{src/components → components}/annotations/marker/MarkerViewNativeComponent.d.ts +10 -0
  302. package/lib/typescript/module/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +1 -0
  303. package/lib/typescript/{commonjs/src → module}/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts +3 -2
  304. package/lib/typescript/module/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +1 -0
  305. package/lib/typescript/module/{src/components → components}/annotations/view-annotation/ViewAnnotation.d.ts +35 -29
  306. package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -0
  307. package/lib/typescript/module/{src/components → components}/camera/Camera.d.ts +85 -43
  308. package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -0
  309. package/lib/typescript/module/components/camera/CameraNativeComponent.d.ts.map +1 -0
  310. package/lib/typescript/module/components/camera/NativeCameraModule.d.ts.map +1 -0
  311. package/lib/typescript/module/{src/components → components}/images/Images.d.ts +20 -12
  312. package/lib/typescript/module/components/images/Images.d.ts.map +1 -0
  313. package/lib/typescript/module/components/images/ImagesNativeComponent.d.ts.map +1 -0
  314. package/lib/typescript/module/components/images/NativeImagesModule.d.ts +6 -0
  315. package/lib/typescript/module/components/images/NativeImagesModule.d.ts.map +1 -0
  316. package/lib/typescript/module/{src/components → components}/layer/Layer.d.ts +18 -8
  317. package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -0
  318. package/lib/typescript/module/components/layer/LayerNativeComponent.d.ts.map +1 -0
  319. package/lib/typescript/module/{src/components → components}/map/AndroidTextureMapViewNativeComponent.d.ts +5 -1
  320. package/lib/typescript/module/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +1 -0
  321. package/lib/typescript/module/{src/components → components}/map/Map.d.ts +151 -75
  322. package/lib/typescript/module/components/map/Map.d.ts.map +1 -0
  323. package/lib/typescript/{commonjs/src → module}/components/map/MapViewNativeComponent.d.ts +5 -1
  324. package/lib/typescript/module/components/map/MapViewNativeComponent.d.ts.map +1 -0
  325. package/lib/typescript/module/components/map/NativeMapViewModule.d.ts.map +1 -0
  326. package/lib/typescript/module/{src/components → components}/sources/geojson-source/GeoJSONSource.d.ts +47 -44
  327. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -0
  328. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +1 -0
  329. package/lib/typescript/module/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +1 -0
  330. package/lib/typescript/module/{src/components → components}/sources/image-source/ImageSource.d.ts +5 -3
  331. package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts.map +1 -0
  332. package/lib/typescript/module/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +1 -0
  333. package/lib/typescript/module/{src/components → components}/sources/raster-source/RasterSource.d.ts +20 -15
  334. package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts.map +1 -0
  335. package/lib/typescript/module/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +1 -0
  336. package/lib/typescript/module/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +1 -0
  337. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts +75 -0
  338. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts.map +1 -0
  339. package/lib/typescript/module/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +1 -0
  340. package/lib/typescript/{commonjs/src → module}/components/user-location/NativeUserLocation.d.ts +9 -6
  341. package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts.map +1 -0
  342. package/lib/typescript/module/{src/components → components}/user-location/UserLocation.d.ts +4 -2
  343. package/lib/typescript/module/components/user-location/UserLocation.d.ts.map +1 -0
  344. package/lib/typescript/module/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
  345. package/lib/typescript/module/components/user-location/UserLocationPuck.d.ts.map +1 -0
  346. package/lib/typescript/module/components/user-location/UserLocationPuckHeading.d.ts.map +1 -0
  347. package/lib/typescript/module/{src/hooks → hooks}/useCurrentPosition.d.ts +2 -2
  348. package/lib/typescript/module/hooks/useCurrentPosition.d.ts.map +1 -0
  349. package/lib/typescript/module/hooks/useFrozenId.d.ts.map +1 -0
  350. package/lib/typescript/module/hooks/useNativeBridge.d.ts.map +1 -0
  351. package/lib/typescript/module/{src/index.d.ts → index.d.ts} +3 -2
  352. package/lib/typescript/module/index.d.ts.map +1 -0
  353. package/lib/typescript/module/modules/location/LocationManager.d.ts.map +1 -0
  354. package/lib/typescript/module/modules/location/NativeLocationModule.d.ts.map +1 -0
  355. package/lib/typescript/module/{src/modules → modules}/log/LogManager.d.ts +5 -4
  356. package/lib/typescript/module/modules/log/LogManager.d.ts.map +1 -0
  357. package/lib/typescript/module/modules/log/NativeLogModule.d.ts.map +1 -0
  358. package/lib/typescript/module/{src/modules → modules}/network/NativeNetworkModule.d.ts +0 -2
  359. package/lib/typescript/module/modules/network/NativeNetworkModule.d.ts.map +1 -0
  360. package/lib/typescript/module/modules/network/NetworkManager.d.ts +24 -0
  361. package/lib/typescript/module/modules/network/NetworkManager.d.ts.map +1 -0
  362. package/lib/typescript/module/modules/offline/NativeOfflineModule.d.ts.map +1 -0
  363. package/lib/typescript/module/{src/modules → modules}/offline/OfflineManager.d.ts +110 -63
  364. package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -0
  365. package/lib/typescript/module/modules/offline/OfflinePack.d.ts.map +1 -0
  366. package/lib/typescript/module/modules/static-map/NativeStaticMapModule.d.ts.map +1 -0
  367. package/lib/typescript/module/{src/modules → modules}/static-map/StaticMapManager.d.ts +15 -7
  368. package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts.map +1 -0
  369. package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts +15 -0
  370. package/lib/typescript/module/modules/transform-request/NativeTransformRequestModule.d.ts.map +1 -0
  371. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +213 -0
  372. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -0
  373. package/lib/typescript/{commonjs/src → module}/plugin/MapLibrePluginProps.d.ts +10 -15
  374. package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts.map +1 -0
  375. package/lib/typescript/module/plugin/android.d.ts.map +1 -0
  376. package/lib/typescript/module/{src/plugin → plugin}/ios.d.ts +2 -2
  377. package/lib/typescript/module/plugin/ios.d.ts.map +1 -0
  378. package/lib/typescript/module/plugin/withMapLibre.d.ts.map +1 -0
  379. package/lib/typescript/module/types/Anchor.d.ts +16 -0
  380. package/lib/typescript/module/types/Anchor.d.ts.map +1 -0
  381. package/lib/typescript/module/types/BaseProps.d.ts +7 -0
  382. package/lib/typescript/module/types/BaseProps.d.ts.map +1 -0
  383. package/lib/typescript/module/types/LngLat.d.ts.map +1 -0
  384. package/lib/typescript/module/{src/types → types}/LngLatBounds.d.ts +2 -1
  385. package/lib/typescript/module/types/LngLatBounds.d.ts.map +1 -0
  386. package/lib/typescript/module/{src/types → types}/MapLibreRNStyles.d.ts +316 -132
  387. package/lib/typescript/module/types/MapLibreRNStyles.d.ts.map +1 -0
  388. package/lib/typescript/module/types/PixelPoint.d.ts.map +1 -0
  389. package/lib/typescript/module/types/PixelPointBounds.d.ts.map +1 -0
  390. package/lib/typescript/{commonjs/src → module}/types/PressEvent.d.ts +3 -0
  391. package/lib/typescript/module/types/PressEvent.d.ts.map +1 -0
  392. package/lib/typescript/module/{src/types → types}/PressEventWithFeatures.d.ts +3 -0
  393. package/lib/typescript/module/types/PressEventWithFeatures.d.ts.map +1 -0
  394. package/lib/typescript/{commonjs/src/types/sources → module/types}/PressableSourceProps.d.ts +6 -4
  395. package/lib/typescript/module/types/PressableSourceProps.d.ts.map +1 -0
  396. package/lib/typescript/{commonjs/src → module}/types/ViewPadding.d.ts +3 -0
  397. package/lib/typescript/module/types/ViewPadding.d.ts.map +1 -0
  398. package/lib/typescript/module/types/codegen/UnsafeMixed.d.ts.map +1 -0
  399. package/lib/typescript/module/utils/BridgeValue.d.ts.map +1 -0
  400. package/lib/typescript/module/utils/StyleValue.d.ts.map +1 -0
  401. package/lib/typescript/{commonjs/src → module}/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  402. package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
  403. package/lib/typescript/{commonjs/src → module}/utils/animated/Animated.d.ts +1 -1
  404. package/lib/typescript/module/utils/animated/Animated.d.ts.map +1 -0
  405. package/lib/typescript/module/{src/utils → utils}/animated/AnimatedCoordinatesArray.d.ts +6 -6
  406. package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
  407. package/lib/typescript/module/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  408. package/lib/typescript/module/{src/utils → utils}/animated/AnimatedGeoJSON.d.ts +2 -1
  409. package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts.map +1 -0
  410. package/lib/typescript/module/utils/animated/AnimatedPoint.d.ts.map +1 -0
  411. package/lib/typescript/module/{src/utils → utils}/animated/AnimatedRouteCoordinatesArray.d.ts +6 -6
  412. package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  413. package/lib/typescript/{commonjs/src → module}/utils/convertStyleSpec.d.ts +4 -4
  414. package/lib/typescript/module/utils/convertStyleSpec.d.ts.map +1 -0
  415. package/lib/typescript/module/utils/findNodeHandle.d.ts.map +1 -0
  416. package/lib/typescript/module/utils/getNativeFilter.d.ts.map +1 -0
  417. package/lib/typescript/module/utils/getStylePropertyType.d.ts.map +1 -0
  418. package/lib/typescript/module/utils/index.d.ts.map +1 -0
  419. package/package.json +19 -40
  420. package/src/components/annotations/callout/Callout.tsx +3 -2
  421. package/src/components/annotations/marker/Marker.tsx +47 -30
  422. package/src/components/annotations/marker/MarkerViewNativeComponent.ts +10 -0
  423. package/src/components/annotations/view-annotation/PointAnnotationNativeComponent.ts +3 -2
  424. package/src/components/annotations/view-annotation/ViewAnnotation.tsx +53 -47
  425. package/src/components/camera/Camera.tsx +148 -110
  426. package/src/components/images/Images.tsx +20 -12
  427. package/src/components/images/NativeImagesModule.ts +11 -0
  428. package/src/components/layer/Layer.tsx +18 -8
  429. package/src/components/map/AndroidTextureMapViewNativeComponent.ts +7 -2
  430. package/src/components/map/Map.tsx +296 -229
  431. package/src/components/map/MapViewNativeComponent.ts +6 -1
  432. package/src/components/sources/geojson-source/GeoJSONSource.tsx +105 -103
  433. package/src/components/sources/image-source/ImageSource.tsx +5 -3
  434. package/src/components/sources/raster-source/RasterSource.tsx +20 -15
  435. package/src/components/sources/vector-source/VectorSource.tsx +66 -58
  436. package/src/components/user-location/NativeUserLocation.tsx +9 -6
  437. package/src/components/user-location/UserLocation.tsx +4 -2
  438. package/src/hooks/useCurrentPosition.ts +2 -2
  439. package/src/index.ts +12 -3
  440. package/src/modules/log/LogManager.ts +5 -4
  441. package/src/modules/network/NativeNetworkModule.ts +0 -4
  442. package/src/modules/network/NetworkManager.ts +6 -52
  443. package/src/modules/offline/OfflineManager.ts +109 -62
  444. package/src/modules/static-map/StaticMapManager.ts +15 -7
  445. package/src/modules/transform-request/NativeTransformRequestModule.ts +41 -0
  446. package/src/modules/transform-request/TransformRequestManager.ts +304 -0
  447. package/src/plugin/MapLibrePluginProps.ts +10 -15
  448. package/src/plugin/ios.ts +43 -21
  449. package/src/types/Anchor.ts +5 -6
  450. package/src/types/BaseProps.ts +3 -0
  451. package/src/types/LngLatBounds.ts +2 -1
  452. package/src/types/MapLibreRNStyles.ts +326 -192
  453. package/src/types/PressEvent.ts +3 -0
  454. package/src/types/PressEventWithFeatures.ts +3 -0
  455. package/src/types/{sources/PressableSourceProps.ts → PressableSourceProps.ts} +6 -4
  456. package/src/types/ViewPadding.ts +3 -0
  457. package/src/utils/animated/AbstractAnimatedCoordinates.ts +2 -2
  458. package/src/utils/animated/AnimatedCoordinatesArray.ts +6 -6
  459. package/src/utils/animated/AnimatedGeoJSON.ts +2 -1
  460. package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +6 -6
  461. package/src/utils/convertStyleSpec.ts +4 -4
  462. package/src/utils/getStylePropertyType.ts +1 -1
  463. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyle.java +0 -76
  464. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleFactory.java +0 -2285
  465. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleFunctionParser.java +0 -94
  466. package/android/src/main/java/org/maplibre/reactnative/components/layer/style/MLRNStyleValue.java +0 -207
  467. package/android/src/main/java/org/maplibre/reactnative/events/AndroidCallbackEvent.java +0 -34
  468. package/android/src/main/java/org/maplibre/reactnative/http/RequestHeadersInterceptor.kt +0 -65
  469. package/android/src/main/res/layout/annotation.xml +0 -17
  470. package/ios/modules/network/MLRNNetworkHTTPHeaders.h +0 -14
  471. package/ios/modules/network/MLRNNetworkHTTPHeaders.m +0 -97
  472. package/lib/commonjs/types/sources/PressableSourceProps.js.map +0 -1
  473. package/lib/module/types/sources/PressableSourceProps.js.map +0 -1
  474. package/lib/typescript/commonjs/src/components/annotations/LayerAnnotation.d.ts.map +0 -1
  475. package/lib/typescript/commonjs/src/components/annotations/callout/Callout.d.ts.map +0 -1
  476. package/lib/typescript/commonjs/src/components/annotations/callout/CalloutNativeComponent.d.ts.map +0 -1
  477. package/lib/typescript/commonjs/src/components/annotations/marker/Marker.d.ts.map +0 -1
  478. package/lib/typescript/commonjs/src/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +0 -1
  479. package/lib/typescript/commonjs/src/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +0 -1
  480. package/lib/typescript/commonjs/src/components/annotations/view-annotation/ViewAnnotation.d.ts.map +0 -1
  481. package/lib/typescript/commonjs/src/components/camera/Camera.d.ts.map +0 -1
  482. package/lib/typescript/commonjs/src/components/camera/CameraNativeComponent.d.ts.map +0 -1
  483. package/lib/typescript/commonjs/src/components/camera/NativeCameraModule.d.ts.map +0 -1
  484. package/lib/typescript/commonjs/src/components/images/Images.d.ts.map +0 -1
  485. package/lib/typescript/commonjs/src/components/images/ImagesNativeComponent.d.ts.map +0 -1
  486. package/lib/typescript/commonjs/src/components/layer/Layer.d.ts.map +0 -1
  487. package/lib/typescript/commonjs/src/components/layer/LayerNativeComponent.d.ts.map +0 -1
  488. package/lib/typescript/commonjs/src/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +0 -1
  489. package/lib/typescript/commonjs/src/components/map/Map.d.ts.map +0 -1
  490. package/lib/typescript/commonjs/src/components/map/MapViewNativeComponent.d.ts.map +0 -1
  491. package/lib/typescript/commonjs/src/components/map/NativeMapViewModule.d.ts.map +0 -1
  492. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +0 -1
  493. package/lib/typescript/commonjs/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +0 -1
  494. package/lib/typescript/commonjs/src/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +0 -1
  495. package/lib/typescript/commonjs/src/components/sources/image-source/ImageSource.d.ts.map +0 -1
  496. package/lib/typescript/commonjs/src/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +0 -1
  497. package/lib/typescript/commonjs/src/components/sources/raster-source/RasterSource.d.ts.map +0 -1
  498. package/lib/typescript/commonjs/src/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +0 -1
  499. package/lib/typescript/commonjs/src/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +0 -1
  500. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSource.d.ts +0 -66
  501. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSource.d.ts.map +0 -1
  502. package/lib/typescript/commonjs/src/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +0 -1
  503. package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts.map +0 -1
  504. package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +0 -1
  505. package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts.map +0 -1
  506. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +0 -1
  507. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +0 -1
  508. package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts.map +0 -1
  509. package/lib/typescript/commonjs/src/hooks/useFrozenId.d.ts.map +0 -1
  510. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +0 -1
  511. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  512. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +0 -1
  513. package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts.map +0 -1
  514. package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts.map +0 -1
  515. package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts.map +0 -1
  516. package/lib/typescript/commonjs/src/modules/network/NativeNetworkModule.d.ts.map +0 -1
  517. package/lib/typescript/commonjs/src/modules/network/NetworkManager.d.ts +0 -56
  518. package/lib/typescript/commonjs/src/modules/network/NetworkManager.d.ts.map +0 -1
  519. package/lib/typescript/commonjs/src/modules/offline/NativeOfflineModule.d.ts.map +0 -1
  520. package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +0 -1
  521. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +0 -1
  522. package/lib/typescript/commonjs/src/modules/static-map/NativeStaticMapModule.d.ts.map +0 -1
  523. package/lib/typescript/commonjs/src/modules/static-map/StaticMapManager.d.ts.map +0 -1
  524. package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts.map +0 -1
  525. package/lib/typescript/commonjs/src/plugin/android.d.ts.map +0 -1
  526. package/lib/typescript/commonjs/src/plugin/ios.d.ts.map +0 -1
  527. package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts.map +0 -1
  528. package/lib/typescript/commonjs/src/types/Anchor.d.ts +0 -17
  529. package/lib/typescript/commonjs/src/types/Anchor.d.ts.map +0 -1
  530. package/lib/typescript/commonjs/src/types/BaseProps.d.ts +0 -4
  531. package/lib/typescript/commonjs/src/types/BaseProps.d.ts.map +0 -1
  532. package/lib/typescript/commonjs/src/types/LngLat.d.ts.map +0 -1
  533. package/lib/typescript/commonjs/src/types/LngLatBounds.d.ts.map +0 -1
  534. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +0 -1
  535. package/lib/typescript/commonjs/src/types/PixelPoint.d.ts.map +0 -1
  536. package/lib/typescript/commonjs/src/types/PixelPointBounds.d.ts.map +0 -1
  537. package/lib/typescript/commonjs/src/types/PressEvent.d.ts.map +0 -1
  538. package/lib/typescript/commonjs/src/types/PressEventWithFeatures.d.ts.map +0 -1
  539. package/lib/typescript/commonjs/src/types/ViewPadding.d.ts.map +0 -1
  540. package/lib/typescript/commonjs/src/types/codegen/UnsafeMixed.d.ts.map +0 -1
  541. package/lib/typescript/commonjs/src/types/sources/PressableSourceProps.d.ts.map +0 -1
  542. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +0 -1
  543. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +0 -1
  544. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +0 -1
  545. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +0 -1
  546. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +0 -1
  547. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +0 -1
  548. package/lib/typescript/commonjs/src/utils/animated/AnimatedGeoJSON.d.ts.map +0 -1
  549. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +0 -1
  550. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +0 -1
  551. package/lib/typescript/commonjs/src/utils/convertStyleSpec.d.ts.map +0 -1
  552. package/lib/typescript/commonjs/src/utils/findNodeHandle.d.ts.map +0 -1
  553. package/lib/typescript/commonjs/src/utils/getNativeFilter.d.ts.map +0 -1
  554. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts.map +0 -1
  555. package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
  556. package/lib/typescript/module/src/components/annotations/LayerAnnotation.d.ts.map +0 -1
  557. package/lib/typescript/module/src/components/annotations/callout/Callout.d.ts.map +0 -1
  558. package/lib/typescript/module/src/components/annotations/callout/CalloutNativeComponent.d.ts.map +0 -1
  559. package/lib/typescript/module/src/components/annotations/marker/Marker.d.ts.map +0 -1
  560. package/lib/typescript/module/src/components/annotations/marker/MarkerViewNativeComponent.d.ts.map +0 -1
  561. package/lib/typescript/module/src/components/annotations/view-annotation/PointAnnotationNativeComponent.d.ts.map +0 -1
  562. package/lib/typescript/module/src/components/annotations/view-annotation/ViewAnnotation.d.ts.map +0 -1
  563. package/lib/typescript/module/src/components/camera/Camera.d.ts.map +0 -1
  564. package/lib/typescript/module/src/components/camera/CameraNativeComponent.d.ts.map +0 -1
  565. package/lib/typescript/module/src/components/camera/NativeCameraModule.d.ts.map +0 -1
  566. package/lib/typescript/module/src/components/images/Images.d.ts.map +0 -1
  567. package/lib/typescript/module/src/components/images/ImagesNativeComponent.d.ts.map +0 -1
  568. package/lib/typescript/module/src/components/layer/Layer.d.ts.map +0 -1
  569. package/lib/typescript/module/src/components/layer/LayerNativeComponent.d.ts.map +0 -1
  570. package/lib/typescript/module/src/components/map/AndroidTextureMapViewNativeComponent.d.ts.map +0 -1
  571. package/lib/typescript/module/src/components/map/Map.d.ts.map +0 -1
  572. package/lib/typescript/module/src/components/map/MapViewNativeComponent.d.ts.map +0 -1
  573. package/lib/typescript/module/src/components/map/NativeMapViewModule.d.ts.map +0 -1
  574. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSource.d.ts.map +0 -1
  575. package/lib/typescript/module/src/components/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts.map +0 -1
  576. package/lib/typescript/module/src/components/sources/geojson-source/NativeGeoJSONSourceModule.d.ts.map +0 -1
  577. package/lib/typescript/module/src/components/sources/image-source/ImageSource.d.ts.map +0 -1
  578. package/lib/typescript/module/src/components/sources/image-source/ImageSourceNativeComponent.d.ts.map +0 -1
  579. package/lib/typescript/module/src/components/sources/raster-source/RasterSource.d.ts.map +0 -1
  580. package/lib/typescript/module/src/components/sources/raster-source/RasterSourceNativeComponent.d.ts.map +0 -1
  581. package/lib/typescript/module/src/components/sources/vector-source/NativeVectorSourceModule.d.ts.map +0 -1
  582. package/lib/typescript/module/src/components/sources/vector-source/VectorSource.d.ts +0 -66
  583. package/lib/typescript/module/src/components/sources/vector-source/VectorSource.d.ts.map +0 -1
  584. package/lib/typescript/module/src/components/sources/vector-source/VectorSourceNativeComponent.d.ts.map +0 -1
  585. package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts.map +0 -1
  586. package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +0 -1
  587. package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map +0 -1
  588. package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +0 -1
  589. package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +0 -1
  590. package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts.map +0 -1
  591. package/lib/typescript/module/src/hooks/useFrozenId.d.ts.map +0 -1
  592. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +0 -1
  593. package/lib/typescript/module/src/index.d.ts.map +0 -1
  594. package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +0 -1
  595. package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts.map +0 -1
  596. package/lib/typescript/module/src/modules/log/LogManager.d.ts.map +0 -1
  597. package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts.map +0 -1
  598. package/lib/typescript/module/src/modules/network/NativeNetworkModule.d.ts.map +0 -1
  599. package/lib/typescript/module/src/modules/network/NetworkManager.d.ts +0 -56
  600. package/lib/typescript/module/src/modules/network/NetworkManager.d.ts.map +0 -1
  601. package/lib/typescript/module/src/modules/offline/NativeOfflineModule.d.ts.map +0 -1
  602. package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +0 -1
  603. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +0 -1
  604. package/lib/typescript/module/src/modules/static-map/NativeStaticMapModule.d.ts.map +0 -1
  605. package/lib/typescript/module/src/modules/static-map/StaticMapManager.d.ts.map +0 -1
  606. package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts.map +0 -1
  607. package/lib/typescript/module/src/plugin/android.d.ts.map +0 -1
  608. package/lib/typescript/module/src/plugin/ios.d.ts.map +0 -1
  609. package/lib/typescript/module/src/plugin/withMapLibre.d.ts.map +0 -1
  610. package/lib/typescript/module/src/types/Anchor.d.ts +0 -17
  611. package/lib/typescript/module/src/types/Anchor.d.ts.map +0 -1
  612. package/lib/typescript/module/src/types/BaseProps.d.ts +0 -4
  613. package/lib/typescript/module/src/types/BaseProps.d.ts.map +0 -1
  614. package/lib/typescript/module/src/types/LngLat.d.ts.map +0 -1
  615. package/lib/typescript/module/src/types/LngLatBounds.d.ts.map +0 -1
  616. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +0 -1
  617. package/lib/typescript/module/src/types/PixelPoint.d.ts.map +0 -1
  618. package/lib/typescript/module/src/types/PixelPointBounds.d.ts.map +0 -1
  619. package/lib/typescript/module/src/types/PressEvent.d.ts.map +0 -1
  620. package/lib/typescript/module/src/types/PressEventWithFeatures.d.ts.map +0 -1
  621. package/lib/typescript/module/src/types/ViewPadding.d.ts.map +0 -1
  622. package/lib/typescript/module/src/types/codegen/UnsafeMixed.d.ts.map +0 -1
  623. package/lib/typescript/module/src/types/sources/PressableSourceProps.d.ts.map +0 -1
  624. package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +0 -1
  625. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +0 -1
  626. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +0 -1
  627. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +0 -1
  628. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +0 -1
  629. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +0 -1
  630. package/lib/typescript/module/src/utils/animated/AnimatedGeoJSON.d.ts.map +0 -1
  631. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +0 -1
  632. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +0 -1
  633. package/lib/typescript/module/src/utils/convertStyleSpec.d.ts.map +0 -1
  634. package/lib/typescript/module/src/utils/findNodeHandle.d.ts.map +0 -1
  635. package/lib/typescript/module/src/utils/getNativeFilter.d.ts.map +0 -1
  636. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts.map +0 -1
  637. package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
  638. /package/android/src/main/res/drawable-xxhdpi/{red_marker.png → default_marker.png} +0 -0
  639. /package/ios/{components/images → utils}/MLRNImageUtils.h +0 -0
  640. /package/ios/{components/images → utils}/MLRNImageUtils.m +0 -0
  641. /package/lib/commonjs/types/{sources/PressableSourceProps.js → PressableSourceProps.js} +0 -0
  642. /package/lib/module/types/{sources/PressableSourceProps.js → PressableSourceProps.js} +0 -0
  643. /package/lib/typescript/commonjs/{src/components → components}/annotations/LayerAnnotation.d.ts +0 -0
  644. /package/lib/typescript/commonjs/{src/components → components}/annotations/callout/CalloutNativeComponent.d.ts +0 -0
  645. /package/lib/typescript/commonjs/{src/components → components}/camera/CameraNativeComponent.d.ts +0 -0
  646. /package/lib/typescript/commonjs/{src/components → components}/camera/NativeCameraModule.d.ts +0 -0
  647. /package/lib/typescript/commonjs/{src/components → components}/images/ImagesNativeComponent.d.ts +0 -0
  648. /package/lib/typescript/commonjs/{src/components → components}/layer/LayerNativeComponent.d.ts +0 -0
  649. /package/lib/typescript/commonjs/{src/components → components}/map/NativeMapViewModule.d.ts +0 -0
  650. /package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +0 -0
  651. /package/lib/typescript/commonjs/{src/components → components}/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +0 -0
  652. /package/lib/typescript/commonjs/{src/components → components}/sources/image-source/ImageSourceNativeComponent.d.ts +0 -0
  653. /package/lib/typescript/commonjs/{src/components → components}/sources/raster-source/RasterSourceNativeComponent.d.ts +0 -0
  654. /package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/NativeVectorSourceModule.d.ts +0 -0
  655. /package/lib/typescript/commonjs/{src/components → components}/sources/vector-source/VectorSourceNativeComponent.d.ts +0 -0
  656. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationNativeComponent.d.ts +0 -0
  657. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationPuck.d.ts +0 -0
  658. /package/lib/typescript/commonjs/{src/components → components}/user-location/UserLocationPuckHeading.d.ts +0 -0
  659. /package/lib/typescript/commonjs/{src/hooks → hooks}/useFrozenId.d.ts +0 -0
  660. /package/lib/typescript/commonjs/{src/hooks → hooks}/useNativeBridge.d.ts +0 -0
  661. /package/lib/typescript/commonjs/{src/modules → modules}/location/LocationManager.d.ts +0 -0
  662. /package/lib/typescript/commonjs/{src/modules → modules}/location/NativeLocationModule.d.ts +0 -0
  663. /package/lib/typescript/commonjs/{src/modules → modules}/log/NativeLogModule.d.ts +0 -0
  664. /package/lib/typescript/commonjs/{src/modules → modules}/offline/NativeOfflineModule.d.ts +0 -0
  665. /package/lib/typescript/commonjs/{src/modules → modules}/offline/OfflinePack.d.ts +0 -0
  666. /package/lib/typescript/commonjs/{src/modules → modules}/static-map/NativeStaticMapModule.d.ts +0 -0
  667. /package/lib/typescript/commonjs/{src/plugin → plugin}/android.d.ts +0 -0
  668. /package/lib/typescript/commonjs/{src/plugin → plugin}/withMapLibre.d.ts +0 -0
  669. /package/lib/typescript/commonjs/{src/types → types}/LngLat.d.ts +0 -0
  670. /package/lib/typescript/commonjs/{src/types → types}/PixelPoint.d.ts +0 -0
  671. /package/lib/typescript/commonjs/{src/types → types}/PixelPointBounds.d.ts +0 -0
  672. /package/lib/typescript/commonjs/{src/types → types}/codegen/UnsafeMixed.d.ts +0 -0
  673. /package/lib/typescript/commonjs/{src/utils → utils}/BridgeValue.d.ts +0 -0
  674. /package/lib/typescript/commonjs/{src/utils → utils}/StyleValue.d.ts +0 -0
  675. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -0
  676. /package/lib/typescript/commonjs/{src/utils → utils}/animated/AnimatedPoint.d.ts +0 -0
  677. /package/lib/typescript/commonjs/{src/utils → utils}/findNodeHandle.d.ts +0 -0
  678. /package/lib/typescript/commonjs/{src/utils → utils}/getNativeFilter.d.ts +0 -0
  679. /package/lib/typescript/commonjs/{src/utils → utils}/getStylePropertyType.d.ts +0 -0
  680. /package/lib/typescript/commonjs/{src/utils → utils}/index.d.ts +0 -0
  681. /package/lib/typescript/module/{src/components → components}/annotations/LayerAnnotation.d.ts +0 -0
  682. /package/lib/typescript/module/{src/components → components}/annotations/callout/CalloutNativeComponent.d.ts +0 -0
  683. /package/lib/typescript/module/{src/components → components}/camera/CameraNativeComponent.d.ts +0 -0
  684. /package/lib/typescript/module/{src/components → components}/camera/NativeCameraModule.d.ts +0 -0
  685. /package/lib/typescript/module/{src/components → components}/images/ImagesNativeComponent.d.ts +0 -0
  686. /package/lib/typescript/module/{src/components → components}/layer/LayerNativeComponent.d.ts +0 -0
  687. /package/lib/typescript/module/{src/components → components}/map/NativeMapViewModule.d.ts +0 -0
  688. /package/lib/typescript/module/{src/components → components}/sources/geojson-source/GeoJSONSourceNativeComponent.d.ts +0 -0
  689. /package/lib/typescript/module/{src/components → components}/sources/geojson-source/NativeGeoJSONSourceModule.d.ts +0 -0
  690. /package/lib/typescript/module/{src/components → components}/sources/image-source/ImageSourceNativeComponent.d.ts +0 -0
  691. /package/lib/typescript/module/{src/components → components}/sources/raster-source/RasterSourceNativeComponent.d.ts +0 -0
  692. /package/lib/typescript/module/{src/components → components}/sources/vector-source/NativeVectorSourceModule.d.ts +0 -0
  693. /package/lib/typescript/module/{src/components → components}/sources/vector-source/VectorSourceNativeComponent.d.ts +0 -0
  694. /package/lib/typescript/module/{src/components → components}/user-location/UserLocationNativeComponent.d.ts +0 -0
  695. /package/lib/typescript/module/{src/components → components}/user-location/UserLocationPuck.d.ts +0 -0
  696. /package/lib/typescript/module/{src/components → components}/user-location/UserLocationPuckHeading.d.ts +0 -0
  697. /package/lib/typescript/module/{src/hooks → hooks}/useFrozenId.d.ts +0 -0
  698. /package/lib/typescript/module/{src/hooks → hooks}/useNativeBridge.d.ts +0 -0
  699. /package/lib/typescript/module/{src/modules → modules}/location/LocationManager.d.ts +0 -0
  700. /package/lib/typescript/module/{src/modules → modules}/location/NativeLocationModule.d.ts +0 -0
  701. /package/lib/typescript/module/{src/modules → modules}/log/NativeLogModule.d.ts +0 -0
  702. /package/lib/typescript/module/{src/modules → modules}/offline/NativeOfflineModule.d.ts +0 -0
  703. /package/lib/typescript/module/{src/modules → modules}/offline/OfflinePack.d.ts +0 -0
  704. /package/lib/typescript/module/{src/modules → modules}/static-map/NativeStaticMapModule.d.ts +0 -0
  705. /package/lib/typescript/module/{src/plugin → plugin}/android.d.ts +0 -0
  706. /package/lib/typescript/module/{src/plugin → plugin}/withMapLibre.d.ts +0 -0
  707. /package/lib/typescript/module/{src/types → types}/LngLat.d.ts +0 -0
  708. /package/lib/typescript/module/{src/types → types}/PixelPoint.d.ts +0 -0
  709. /package/lib/typescript/module/{src/types → types}/PixelPointBounds.d.ts +0 -0
  710. /package/lib/typescript/module/{src/types → types}/codegen/UnsafeMixed.d.ts +0 -0
  711. /package/lib/typescript/module/{src/utils → utils}/BridgeValue.d.ts +0 -0
  712. /package/lib/typescript/module/{src/utils → utils}/StyleValue.d.ts +0 -0
  713. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedExtractCoordinateFromArray.d.ts +0 -0
  714. /package/lib/typescript/module/{src/utils → utils}/animated/AnimatedPoint.d.ts +0 -0
  715. /package/lib/typescript/module/{src/utils → utils}/findNodeHandle.d.ts +0 -0
  716. /package/lib/typescript/module/{src/utils → utils}/getNativeFilter.d.ts +0 -0
  717. /package/lib/typescript/module/{src/utils → utils}/getStylePropertyType.d.ts +0 -0
  718. /package/lib/typescript/module/{src/utils → utils}/index.d.ts +0 -0
@@ -0,0 +1,3005 @@
1
+ // DO NOT MODIFY
2
+ // This file is auto-generated from scripts/src/templates/renderMLRNStyleFactory.ts
3
+ package org.maplibre.reactnative.components.layer.style
4
+
5
+ import org.maplibre.android.style.layers.BackgroundLayer
6
+ import org.maplibre.android.style.layers.CircleLayer
7
+ import org.maplibre.android.style.layers.FillExtrusionLayer
8
+ import org.maplibre.android.style.layers.FillLayer
9
+ import org.maplibre.android.style.layers.HeatmapLayer
10
+ import org.maplibre.android.style.layers.HillshadeLayer
11
+ import org.maplibre.android.style.layers.LineLayer
12
+ import org.maplibre.android.style.layers.PropertyFactory
13
+ import org.maplibre.android.style.layers.RasterLayer
14
+ import org.maplibre.android.style.layers.SymbolLayer
15
+ import org.maplibre.android.style.light.Light
16
+ import org.maplibre.android.style.light.Position
17
+
18
+ object MLRNStyleFactory {
19
+ const val VALUE_KEY: String = "value"
20
+
21
+ fun setFillLayerStyle(
22
+ layer: FillLayer,
23
+ style: MLRNStyle,
24
+ ) {
25
+ val styleKeys = style.allStyleKeys
26
+
27
+ if (styleKeys.isEmpty()) {
28
+ return
29
+ }
30
+
31
+ for (styleKey in styleKeys) {
32
+ val styleValue = style.getStyleValueForKey(styleKey)
33
+
34
+ when (styleKey) {
35
+ "fillSortKey" -> {
36
+ setFillSortKey(layer, styleValue)
37
+ }
38
+
39
+ "visibility" -> {
40
+ setVisibility(layer, styleValue)
41
+ }
42
+
43
+ "fillAntialias" -> {
44
+ setFillAntialias(layer, styleValue)
45
+ }
46
+
47
+ "fillOpacity" -> {
48
+ setFillOpacity(layer, styleValue)
49
+ }
50
+
51
+ "fillOpacityTransition" -> {
52
+ setFillOpacityTransition(layer, styleValue)
53
+ }
54
+
55
+ "fillColor" -> {
56
+ setFillColor(layer, styleValue)
57
+ }
58
+
59
+ "fillColorTransition" -> {
60
+ setFillColorTransition(layer, styleValue)
61
+ }
62
+
63
+ "fillOutlineColor" -> {
64
+ setFillOutlineColor(layer, styleValue)
65
+ }
66
+
67
+ "fillOutlineColorTransition" -> {
68
+ setFillOutlineColorTransition(layer, styleValue)
69
+ }
70
+
71
+ "fillTranslate" -> {
72
+ setFillTranslate(layer, styleValue)
73
+ }
74
+
75
+ "fillTranslateTransition" -> {
76
+ setFillTranslateTransition(layer, styleValue)
77
+ }
78
+
79
+ "fillTranslateAnchor" -> {
80
+ setFillTranslateAnchor(layer, styleValue)
81
+ }
82
+
83
+ "fillPattern" -> {
84
+ style.addImage(
85
+ styleValue,
86
+ ) { setFillPattern(layer, styleValue) }
87
+ }
88
+
89
+ "fillPatternTransition" -> {
90
+ setFillPatternTransition(layer, styleValue)
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ fun setLineLayerStyle(
97
+ layer: LineLayer,
98
+ style: MLRNStyle,
99
+ ) {
100
+ val styleKeys = style.allStyleKeys
101
+
102
+ if (styleKeys.isEmpty()) {
103
+ return
104
+ }
105
+
106
+ for (styleKey in styleKeys) {
107
+ val styleValue = style.getStyleValueForKey(styleKey)
108
+
109
+ when (styleKey) {
110
+ "lineCap" -> {
111
+ setLineCap(layer, styleValue)
112
+ }
113
+
114
+ "lineJoin" -> {
115
+ setLineJoin(layer, styleValue)
116
+ }
117
+
118
+ "lineMiterLimit" -> {
119
+ setLineMiterLimit(layer, styleValue)
120
+ }
121
+
122
+ "lineRoundLimit" -> {
123
+ setLineRoundLimit(layer, styleValue)
124
+ }
125
+
126
+ "lineSortKey" -> {
127
+ setLineSortKey(layer, styleValue)
128
+ }
129
+
130
+ "visibility" -> {
131
+ setVisibility(layer, styleValue)
132
+ }
133
+
134
+ "lineOpacity" -> {
135
+ setLineOpacity(layer, styleValue)
136
+ }
137
+
138
+ "lineOpacityTransition" -> {
139
+ setLineOpacityTransition(layer, styleValue)
140
+ }
141
+
142
+ "lineColor" -> {
143
+ setLineColor(layer, styleValue)
144
+ }
145
+
146
+ "lineColorTransition" -> {
147
+ setLineColorTransition(layer, styleValue)
148
+ }
149
+
150
+ "lineTranslate" -> {
151
+ setLineTranslate(layer, styleValue)
152
+ }
153
+
154
+ "lineTranslateTransition" -> {
155
+ setLineTranslateTransition(layer, styleValue)
156
+ }
157
+
158
+ "lineTranslateAnchor" -> {
159
+ setLineTranslateAnchor(layer, styleValue)
160
+ }
161
+
162
+ "lineWidth" -> {
163
+ setLineWidth(layer, styleValue)
164
+ }
165
+
166
+ "lineWidthTransition" -> {
167
+ setLineWidthTransition(layer, styleValue)
168
+ }
169
+
170
+ "lineGapWidth" -> {
171
+ setLineGapWidth(layer, styleValue)
172
+ }
173
+
174
+ "lineGapWidthTransition" -> {
175
+ setLineGapWidthTransition(layer, styleValue)
176
+ }
177
+
178
+ "lineOffset" -> {
179
+ setLineOffset(layer, styleValue)
180
+ }
181
+
182
+ "lineOffsetTransition" -> {
183
+ setLineOffsetTransition(layer, styleValue)
184
+ }
185
+
186
+ "lineBlur" -> {
187
+ setLineBlur(layer, styleValue)
188
+ }
189
+
190
+ "lineBlurTransition" -> {
191
+ setLineBlurTransition(layer, styleValue)
192
+ }
193
+
194
+ "lineDasharray" -> {
195
+ setLineDasharray(layer, styleValue)
196
+ }
197
+
198
+ "lineDasharrayTransition" -> {
199
+ setLineDasharrayTransition(layer, styleValue)
200
+ }
201
+
202
+ "linePattern" -> {
203
+ style.addImage(
204
+ styleValue,
205
+ ) { setLinePattern(layer, styleValue) }
206
+ }
207
+
208
+ "linePatternTransition" -> {
209
+ setLinePatternTransition(layer, styleValue)
210
+ }
211
+
212
+ "lineGradient" -> {
213
+ setLineGradient(layer, styleValue)
214
+ }
215
+ }
216
+ }
217
+ }
218
+
219
+ fun setSymbolLayerStyle(
220
+ layer: SymbolLayer,
221
+ style: MLRNStyle,
222
+ ) {
223
+ val styleKeys = style.allStyleKeys
224
+
225
+ if (styleKeys.isEmpty()) {
226
+ return
227
+ }
228
+
229
+ for (styleKey in styleKeys) {
230
+ val styleValue = style.getStyleValueForKey(styleKey)
231
+
232
+ when (styleKey) {
233
+ "symbolPlacement" -> {
234
+ setSymbolPlacement(layer, styleValue)
235
+ }
236
+
237
+ "symbolSpacing" -> {
238
+ setSymbolSpacing(layer, styleValue)
239
+ }
240
+
241
+ "symbolAvoidEdges" -> {
242
+ setSymbolAvoidEdges(layer, styleValue)
243
+ }
244
+
245
+ "symbolSortKey" -> {
246
+ setSymbolSortKey(layer, styleValue)
247
+ }
248
+
249
+ "symbolZOrder" -> {
250
+ setSymbolZOrder(layer, styleValue)
251
+ }
252
+
253
+ "iconAllowOverlap" -> {
254
+ setIconAllowOverlap(layer, styleValue)
255
+ }
256
+
257
+ "iconIgnorePlacement" -> {
258
+ setIconIgnorePlacement(layer, styleValue)
259
+ }
260
+
261
+ "iconOptional" -> {
262
+ setIconOptional(layer, styleValue)
263
+ }
264
+
265
+ "iconRotationAlignment" -> {
266
+ setIconRotationAlignment(layer, styleValue)
267
+ }
268
+
269
+ "iconSize" -> {
270
+ setIconSize(layer, styleValue)
271
+ }
272
+
273
+ "iconTextFit" -> {
274
+ setIconTextFit(layer, styleValue)
275
+ }
276
+
277
+ "iconTextFitPadding" -> {
278
+ setIconTextFitPadding(layer, styleValue)
279
+ }
280
+
281
+ "iconImage" -> {
282
+ style.addImage(
283
+ styleValue,
284
+ ) { setIconImage(layer, styleValue) }
285
+ }
286
+
287
+ "iconRotate" -> {
288
+ setIconRotate(layer, styleValue)
289
+ }
290
+
291
+ "iconPadding" -> {
292
+ setIconPadding(layer, styleValue)
293
+ }
294
+
295
+ "iconKeepUpright" -> {
296
+ setIconKeepUpright(layer, styleValue)
297
+ }
298
+
299
+ "iconOffset" -> {
300
+ setIconOffset(layer, styleValue)
301
+ }
302
+
303
+ "iconAnchor" -> {
304
+ setIconAnchor(layer, styleValue)
305
+ }
306
+
307
+ "iconPitchAlignment" -> {
308
+ setIconPitchAlignment(layer, styleValue)
309
+ }
310
+
311
+ "textPitchAlignment" -> {
312
+ setTextPitchAlignment(layer, styleValue)
313
+ }
314
+
315
+ "textRotationAlignment" -> {
316
+ setTextRotationAlignment(layer, styleValue)
317
+ }
318
+
319
+ "textField" -> {
320
+ setTextField(layer, styleValue)
321
+ }
322
+
323
+ "textFont" -> {
324
+ setTextFont(layer, styleValue)
325
+ }
326
+
327
+ "textSize" -> {
328
+ setTextSize(layer, styleValue)
329
+ }
330
+
331
+ "textMaxWidth" -> {
332
+ setTextMaxWidth(layer, styleValue)
333
+ }
334
+
335
+ "textLineHeight" -> {
336
+ setTextLineHeight(layer, styleValue)
337
+ }
338
+
339
+ "textLetterSpacing" -> {
340
+ setTextLetterSpacing(layer, styleValue)
341
+ }
342
+
343
+ "textJustify" -> {
344
+ setTextJustify(layer, styleValue)
345
+ }
346
+
347
+ "textRadialOffset" -> {
348
+ setTextRadialOffset(layer, styleValue)
349
+ }
350
+
351
+ "textVariableAnchor" -> {
352
+ setTextVariableAnchor(layer, styleValue)
353
+ }
354
+
355
+ "textAnchor" -> {
356
+ setTextAnchor(layer, styleValue)
357
+ }
358
+
359
+ "textMaxAngle" -> {
360
+ setTextMaxAngle(layer, styleValue)
361
+ }
362
+
363
+ "textWritingMode" -> {
364
+ setTextWritingMode(layer, styleValue)
365
+ }
366
+
367
+ "textRotate" -> {
368
+ setTextRotate(layer, styleValue)
369
+ }
370
+
371
+ "textPadding" -> {
372
+ setTextPadding(layer, styleValue)
373
+ }
374
+
375
+ "textKeepUpright" -> {
376
+ setTextKeepUpright(layer, styleValue)
377
+ }
378
+
379
+ "textTransform" -> {
380
+ setTextTransform(layer, styleValue)
381
+ }
382
+
383
+ "textOffset" -> {
384
+ setTextOffset(layer, styleValue)
385
+ }
386
+
387
+ "textAllowOverlap" -> {
388
+ setTextAllowOverlap(layer, styleValue)
389
+ }
390
+
391
+ "textIgnorePlacement" -> {
392
+ setTextIgnorePlacement(layer, styleValue)
393
+ }
394
+
395
+ "textOptional" -> {
396
+ setTextOptional(layer, styleValue)
397
+ }
398
+
399
+ "visibility" -> {
400
+ setVisibility(layer, styleValue)
401
+ }
402
+
403
+ "iconOpacity" -> {
404
+ setIconOpacity(layer, styleValue)
405
+ }
406
+
407
+ "iconOpacityTransition" -> {
408
+ setIconOpacityTransition(layer, styleValue)
409
+ }
410
+
411
+ "iconColor" -> {
412
+ setIconColor(layer, styleValue)
413
+ }
414
+
415
+ "iconColorTransition" -> {
416
+ setIconColorTransition(layer, styleValue)
417
+ }
418
+
419
+ "iconHaloColor" -> {
420
+ setIconHaloColor(layer, styleValue)
421
+ }
422
+
423
+ "iconHaloColorTransition" -> {
424
+ setIconHaloColorTransition(layer, styleValue)
425
+ }
426
+
427
+ "iconHaloWidth" -> {
428
+ setIconHaloWidth(layer, styleValue)
429
+ }
430
+
431
+ "iconHaloWidthTransition" -> {
432
+ setIconHaloWidthTransition(layer, styleValue)
433
+ }
434
+
435
+ "iconHaloBlur" -> {
436
+ setIconHaloBlur(layer, styleValue)
437
+ }
438
+
439
+ "iconHaloBlurTransition" -> {
440
+ setIconHaloBlurTransition(layer, styleValue)
441
+ }
442
+
443
+ "iconTranslate" -> {
444
+ setIconTranslate(layer, styleValue)
445
+ }
446
+
447
+ "iconTranslateTransition" -> {
448
+ setIconTranslateTransition(layer, styleValue)
449
+ }
450
+
451
+ "iconTranslateAnchor" -> {
452
+ setIconTranslateAnchor(layer, styleValue)
453
+ }
454
+
455
+ "textOpacity" -> {
456
+ setTextOpacity(layer, styleValue)
457
+ }
458
+
459
+ "textOpacityTransition" -> {
460
+ setTextOpacityTransition(layer, styleValue)
461
+ }
462
+
463
+ "textColor" -> {
464
+ setTextColor(layer, styleValue)
465
+ }
466
+
467
+ "textColorTransition" -> {
468
+ setTextColorTransition(layer, styleValue)
469
+ }
470
+
471
+ "textHaloColor" -> {
472
+ setTextHaloColor(layer, styleValue)
473
+ }
474
+
475
+ "textHaloColorTransition" -> {
476
+ setTextHaloColorTransition(layer, styleValue)
477
+ }
478
+
479
+ "textHaloWidth" -> {
480
+ setTextHaloWidth(layer, styleValue)
481
+ }
482
+
483
+ "textHaloWidthTransition" -> {
484
+ setTextHaloWidthTransition(layer, styleValue)
485
+ }
486
+
487
+ "textHaloBlur" -> {
488
+ setTextHaloBlur(layer, styleValue)
489
+ }
490
+
491
+ "textHaloBlurTransition" -> {
492
+ setTextHaloBlurTransition(layer, styleValue)
493
+ }
494
+
495
+ "textTranslate" -> {
496
+ setTextTranslate(layer, styleValue)
497
+ }
498
+
499
+ "textTranslateTransition" -> {
500
+ setTextTranslateTransition(layer, styleValue)
501
+ }
502
+
503
+ "textTranslateAnchor" -> {
504
+ setTextTranslateAnchor(layer, styleValue)
505
+ }
506
+ }
507
+ }
508
+ }
509
+
510
+ fun setCircleLayerStyle(
511
+ layer: CircleLayer,
512
+ style: MLRNStyle,
513
+ ) {
514
+ val styleKeys = style.allStyleKeys
515
+
516
+ if (styleKeys.isEmpty()) {
517
+ return
518
+ }
519
+
520
+ for (styleKey in styleKeys) {
521
+ val styleValue = style.getStyleValueForKey(styleKey)
522
+
523
+ when (styleKey) {
524
+ "circleSortKey" -> {
525
+ setCircleSortKey(layer, styleValue)
526
+ }
527
+
528
+ "visibility" -> {
529
+ setVisibility(layer, styleValue)
530
+ }
531
+
532
+ "circleRadius" -> {
533
+ setCircleRadius(layer, styleValue)
534
+ }
535
+
536
+ "circleRadiusTransition" -> {
537
+ setCircleRadiusTransition(layer, styleValue)
538
+ }
539
+
540
+ "circleColor" -> {
541
+ setCircleColor(layer, styleValue)
542
+ }
543
+
544
+ "circleColorTransition" -> {
545
+ setCircleColorTransition(layer, styleValue)
546
+ }
547
+
548
+ "circleBlur" -> {
549
+ setCircleBlur(layer, styleValue)
550
+ }
551
+
552
+ "circleBlurTransition" -> {
553
+ setCircleBlurTransition(layer, styleValue)
554
+ }
555
+
556
+ "circleOpacity" -> {
557
+ setCircleOpacity(layer, styleValue)
558
+ }
559
+
560
+ "circleOpacityTransition" -> {
561
+ setCircleOpacityTransition(layer, styleValue)
562
+ }
563
+
564
+ "circleTranslate" -> {
565
+ setCircleTranslate(layer, styleValue)
566
+ }
567
+
568
+ "circleTranslateTransition" -> {
569
+ setCircleTranslateTransition(layer, styleValue)
570
+ }
571
+
572
+ "circleTranslateAnchor" -> {
573
+ setCircleTranslateAnchor(layer, styleValue)
574
+ }
575
+
576
+ "circlePitchScale" -> {
577
+ setCirclePitchScale(layer, styleValue)
578
+ }
579
+
580
+ "circlePitchAlignment" -> {
581
+ setCirclePitchAlignment(layer, styleValue)
582
+ }
583
+
584
+ "circleStrokeWidth" -> {
585
+ setCircleStrokeWidth(layer, styleValue)
586
+ }
587
+
588
+ "circleStrokeWidthTransition" -> {
589
+ setCircleStrokeWidthTransition(layer, styleValue)
590
+ }
591
+
592
+ "circleStrokeColor" -> {
593
+ setCircleStrokeColor(layer, styleValue)
594
+ }
595
+
596
+ "circleStrokeColorTransition" -> {
597
+ setCircleStrokeColorTransition(layer, styleValue)
598
+ }
599
+
600
+ "circleStrokeOpacity" -> {
601
+ setCircleStrokeOpacity(layer, styleValue)
602
+ }
603
+
604
+ "circleStrokeOpacityTransition" -> {
605
+ setCircleStrokeOpacityTransition(layer, styleValue)
606
+ }
607
+ }
608
+ }
609
+ }
610
+
611
+ fun setHeatmapLayerStyle(
612
+ layer: HeatmapLayer,
613
+ style: MLRNStyle,
614
+ ) {
615
+ val styleKeys = style.allStyleKeys
616
+
617
+ if (styleKeys.isEmpty()) {
618
+ return
619
+ }
620
+
621
+ for (styleKey in styleKeys) {
622
+ val styleValue = style.getStyleValueForKey(styleKey)
623
+
624
+ when (styleKey) {
625
+ "visibility" -> {
626
+ setVisibility(layer, styleValue)
627
+ }
628
+
629
+ "heatmapRadius" -> {
630
+ setHeatmapRadius(layer, styleValue)
631
+ }
632
+
633
+ "heatmapRadiusTransition" -> {
634
+ setHeatmapRadiusTransition(layer, styleValue)
635
+ }
636
+
637
+ "heatmapWeight" -> {
638
+ setHeatmapWeight(layer, styleValue)
639
+ }
640
+
641
+ "heatmapIntensity" -> {
642
+ setHeatmapIntensity(layer, styleValue)
643
+ }
644
+
645
+ "heatmapIntensityTransition" -> {
646
+ setHeatmapIntensityTransition(layer, styleValue)
647
+ }
648
+
649
+ "heatmapColor" -> {
650
+ setHeatmapColor(layer, styleValue)
651
+ }
652
+
653
+ "heatmapOpacity" -> {
654
+ setHeatmapOpacity(layer, styleValue)
655
+ }
656
+
657
+ "heatmapOpacityTransition" -> {
658
+ setHeatmapOpacityTransition(layer, styleValue)
659
+ }
660
+ }
661
+ }
662
+ }
663
+
664
+ fun setFillExtrusionLayerStyle(
665
+ layer: FillExtrusionLayer,
666
+ style: MLRNStyle,
667
+ ) {
668
+ val styleKeys = style.allStyleKeys
669
+
670
+ if (styleKeys.isEmpty()) {
671
+ return
672
+ }
673
+
674
+ for (styleKey in styleKeys) {
675
+ val styleValue = style.getStyleValueForKey(styleKey)
676
+
677
+ when (styleKey) {
678
+ "visibility" -> {
679
+ setVisibility(layer, styleValue)
680
+ }
681
+
682
+ "fillExtrusionOpacity" -> {
683
+ setFillExtrusionOpacity(layer, styleValue)
684
+ }
685
+
686
+ "fillExtrusionOpacityTransition" -> {
687
+ setFillExtrusionOpacityTransition(layer, styleValue)
688
+ }
689
+
690
+ "fillExtrusionColor" -> {
691
+ setFillExtrusionColor(layer, styleValue)
692
+ }
693
+
694
+ "fillExtrusionColorTransition" -> {
695
+ setFillExtrusionColorTransition(layer, styleValue)
696
+ }
697
+
698
+ "fillExtrusionTranslate" -> {
699
+ setFillExtrusionTranslate(layer, styleValue)
700
+ }
701
+
702
+ "fillExtrusionTranslateTransition" -> {
703
+ setFillExtrusionTranslateTransition(layer, styleValue)
704
+ }
705
+
706
+ "fillExtrusionTranslateAnchor" -> {
707
+ setFillExtrusionTranslateAnchor(layer, styleValue)
708
+ }
709
+
710
+ "fillExtrusionPattern" -> {
711
+ style.addImage(
712
+ styleValue,
713
+ ) { setFillExtrusionPattern(layer, styleValue) }
714
+ }
715
+
716
+ "fillExtrusionPatternTransition" -> {
717
+ setFillExtrusionPatternTransition(layer, styleValue)
718
+ }
719
+
720
+ "fillExtrusionHeight" -> {
721
+ setFillExtrusionHeight(layer, styleValue)
722
+ }
723
+
724
+ "fillExtrusionHeightTransition" -> {
725
+ setFillExtrusionHeightTransition(layer, styleValue)
726
+ }
727
+
728
+ "fillExtrusionBase" -> {
729
+ setFillExtrusionBase(layer, styleValue)
730
+ }
731
+
732
+ "fillExtrusionBaseTransition" -> {
733
+ setFillExtrusionBaseTransition(layer, styleValue)
734
+ }
735
+
736
+ "fillExtrusionVerticalGradient" -> {
737
+ setFillExtrusionVerticalGradient(layer, styleValue)
738
+ }
739
+ }
740
+ }
741
+ }
742
+
743
+ fun setRasterLayerStyle(
744
+ layer: RasterLayer,
745
+ style: MLRNStyle,
746
+ ) {
747
+ val styleKeys = style.allStyleKeys
748
+
749
+ if (styleKeys.isEmpty()) {
750
+ return
751
+ }
752
+
753
+ for (styleKey in styleKeys) {
754
+ val styleValue = style.getStyleValueForKey(styleKey)
755
+
756
+ when (styleKey) {
757
+ "visibility" -> {
758
+ setVisibility(layer, styleValue)
759
+ }
760
+
761
+ "rasterOpacity" -> {
762
+ setRasterOpacity(layer, styleValue)
763
+ }
764
+
765
+ "rasterOpacityTransition" -> {
766
+ setRasterOpacityTransition(layer, styleValue)
767
+ }
768
+
769
+ "rasterHueRotate" -> {
770
+ setRasterHueRotate(layer, styleValue)
771
+ }
772
+
773
+ "rasterHueRotateTransition" -> {
774
+ setRasterHueRotateTransition(layer, styleValue)
775
+ }
776
+
777
+ "rasterBrightnessMin" -> {
778
+ setRasterBrightnessMin(layer, styleValue)
779
+ }
780
+
781
+ "rasterBrightnessMinTransition" -> {
782
+ setRasterBrightnessMinTransition(layer, styleValue)
783
+ }
784
+
785
+ "rasterBrightnessMax" -> {
786
+ setRasterBrightnessMax(layer, styleValue)
787
+ }
788
+
789
+ "rasterBrightnessMaxTransition" -> {
790
+ setRasterBrightnessMaxTransition(layer, styleValue)
791
+ }
792
+
793
+ "rasterSaturation" -> {
794
+ setRasterSaturation(layer, styleValue)
795
+ }
796
+
797
+ "rasterSaturationTransition" -> {
798
+ setRasterSaturationTransition(layer, styleValue)
799
+ }
800
+
801
+ "rasterContrast" -> {
802
+ setRasterContrast(layer, styleValue)
803
+ }
804
+
805
+ "rasterContrastTransition" -> {
806
+ setRasterContrastTransition(layer, styleValue)
807
+ }
808
+
809
+ "rasterResampling" -> {
810
+ setRasterResampling(layer, styleValue)
811
+ }
812
+
813
+ "rasterFadeDuration" -> {
814
+ setRasterFadeDuration(layer, styleValue)
815
+ }
816
+ }
817
+ }
818
+ }
819
+
820
+ fun setHillshadeLayerStyle(
821
+ layer: HillshadeLayer,
822
+ style: MLRNStyle,
823
+ ) {
824
+ val styleKeys = style.allStyleKeys
825
+
826
+ if (styleKeys.isEmpty()) {
827
+ return
828
+ }
829
+
830
+ for (styleKey in styleKeys) {
831
+ val styleValue = style.getStyleValueForKey(styleKey)
832
+
833
+ when (styleKey) {
834
+ "visibility" -> {
835
+ setVisibility(layer, styleValue)
836
+ }
837
+
838
+ "hillshadeIlluminationDirection" -> {
839
+ setHillshadeIlluminationDirection(layer, styleValue)
840
+ }
841
+
842
+ "hillshadeIlluminationAnchor" -> {
843
+ setHillshadeIlluminationAnchor(layer, styleValue)
844
+ }
845
+
846
+ "hillshadeExaggeration" -> {
847
+ setHillshadeExaggeration(layer, styleValue)
848
+ }
849
+
850
+ "hillshadeExaggerationTransition" -> {
851
+ setHillshadeExaggerationTransition(layer, styleValue)
852
+ }
853
+
854
+ "hillshadeShadowColor" -> {
855
+ setHillshadeShadowColor(layer, styleValue)
856
+ }
857
+
858
+ "hillshadeShadowColorTransition" -> {
859
+ setHillshadeShadowColorTransition(layer, styleValue)
860
+ }
861
+
862
+ "hillshadeHighlightColor" -> {
863
+ setHillshadeHighlightColor(layer, styleValue)
864
+ }
865
+
866
+ "hillshadeHighlightColorTransition" -> {
867
+ setHillshadeHighlightColorTransition(layer, styleValue)
868
+ }
869
+
870
+ "hillshadeAccentColor" -> {
871
+ setHillshadeAccentColor(layer, styleValue)
872
+ }
873
+
874
+ "hillshadeAccentColorTransition" -> {
875
+ setHillshadeAccentColorTransition(layer, styleValue)
876
+ }
877
+ }
878
+ }
879
+ }
880
+
881
+ fun setBackgroundLayerStyle(
882
+ layer: BackgroundLayer,
883
+ style: MLRNStyle,
884
+ ) {
885
+ val styleKeys = style.allStyleKeys
886
+
887
+ if (styleKeys.isEmpty()) {
888
+ return
889
+ }
890
+
891
+ for (styleKey in styleKeys) {
892
+ val styleValue = style.getStyleValueForKey(styleKey)
893
+
894
+ when (styleKey) {
895
+ "visibility" -> {
896
+ setVisibility(layer, styleValue)
897
+ }
898
+
899
+ "backgroundColor" -> {
900
+ setBackgroundColor(layer, styleValue)
901
+ }
902
+
903
+ "backgroundColorTransition" -> {
904
+ setBackgroundColorTransition(layer, styleValue)
905
+ }
906
+
907
+ "backgroundPattern" -> {
908
+ style.addImage(
909
+ styleValue,
910
+ ) { setBackgroundPattern(layer, styleValue) }
911
+ }
912
+
913
+ "backgroundPatternTransition" -> {
914
+ setBackgroundPatternTransition(layer, styleValue)
915
+ }
916
+
917
+ "backgroundOpacity" -> {
918
+ setBackgroundOpacity(layer, styleValue)
919
+ }
920
+
921
+ "backgroundOpacityTransition" -> {
922
+ setBackgroundOpacityTransition(layer, styleValue)
923
+ }
924
+ }
925
+ }
926
+ }
927
+
928
+ fun setLightLayerStyle(
929
+ layer: Light,
930
+ style: MLRNStyle,
931
+ ) {
932
+ val styleKeys = style.allStyleKeys
933
+
934
+ if (styleKeys.isEmpty()) {
935
+ return
936
+ }
937
+
938
+ for (styleKey in styleKeys) {
939
+ val styleValue = style.getStyleValueForKey(styleKey)
940
+
941
+ when (styleKey) {
942
+ "anchor" -> {
943
+ setAnchor(layer, styleValue)
944
+ }
945
+
946
+ "position" -> {
947
+ setPosition(layer, styleValue)
948
+ }
949
+
950
+ "positionTransition" -> {
951
+ setPositionTransition(layer, styleValue)
952
+ }
953
+
954
+ "color" -> {
955
+ setColor(layer, styleValue)
956
+ }
957
+
958
+ "colorTransition" -> {
959
+ setColorTransition(layer, styleValue)
960
+ }
961
+
962
+ "intensity" -> {
963
+ setIntensity(layer, styleValue)
964
+ }
965
+
966
+ "intensityTransition" -> {
967
+ setIntensityTransition(layer, styleValue)
968
+ }
969
+ }
970
+ }
971
+ }
972
+
973
+ fun setFillSortKey(
974
+ layer: FillLayer,
975
+ styleValue: MLRNStyleValue,
976
+ ) {
977
+ if (styleValue.isExpression()) {
978
+ layer.setProperties(PropertyFactory.fillSortKey(styleValue.getExpression()))
979
+ } else {
980
+ layer.setProperties(PropertyFactory.fillSortKey(styleValue.getFloat(VALUE_KEY)))
981
+ }
982
+ }
983
+
984
+ fun setVisibility(
985
+ layer: FillLayer,
986
+ styleValue: MLRNStyleValue,
987
+ ) {
988
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
989
+ }
990
+
991
+ fun setFillAntialias(
992
+ layer: FillLayer,
993
+ styleValue: MLRNStyleValue,
994
+ ) {
995
+ if (styleValue.isExpression()) {
996
+ layer.setProperties(PropertyFactory.fillAntialias(styleValue.getExpression()))
997
+ } else {
998
+ layer.setProperties(PropertyFactory.fillAntialias(styleValue.getBoolean(VALUE_KEY)))
999
+ }
1000
+ }
1001
+
1002
+ fun setFillOpacity(
1003
+ layer: FillLayer,
1004
+ styleValue: MLRNStyleValue,
1005
+ ) {
1006
+ if (styleValue.isExpression()) {
1007
+ layer.setProperties(PropertyFactory.fillOpacity(styleValue.getExpression()))
1008
+ } else {
1009
+ layer.setProperties(PropertyFactory.fillOpacity(styleValue.getFloat(VALUE_KEY)))
1010
+ }
1011
+ }
1012
+
1013
+ fun setFillOpacityTransition(
1014
+ layer: FillLayer,
1015
+ styleValue: MLRNStyleValue,
1016
+ ) {
1017
+ val transition = styleValue.transition
1018
+ if (transition != null) {
1019
+ layer.fillOpacityTransition = transition
1020
+ }
1021
+ }
1022
+
1023
+ fun setFillColor(
1024
+ layer: FillLayer,
1025
+ styleValue: MLRNStyleValue,
1026
+ ) {
1027
+ if (styleValue.isExpression()) {
1028
+ layer.setProperties(PropertyFactory.fillColor(styleValue.getExpression()))
1029
+ } else {
1030
+ layer.setProperties(PropertyFactory.fillColor(styleValue.getInt(VALUE_KEY)))
1031
+ }
1032
+ }
1033
+
1034
+ fun setFillColorTransition(
1035
+ layer: FillLayer,
1036
+ styleValue: MLRNStyleValue,
1037
+ ) {
1038
+ val transition = styleValue.transition
1039
+ if (transition != null) {
1040
+ layer.fillColorTransition = transition
1041
+ }
1042
+ }
1043
+
1044
+ fun setFillOutlineColor(
1045
+ layer: FillLayer,
1046
+ styleValue: MLRNStyleValue,
1047
+ ) {
1048
+ if (styleValue.isExpression()) {
1049
+ layer.setProperties(PropertyFactory.fillOutlineColor(styleValue.getExpression()))
1050
+ } else {
1051
+ layer.setProperties(PropertyFactory.fillOutlineColor(styleValue.getInt(VALUE_KEY)))
1052
+ }
1053
+ }
1054
+
1055
+ fun setFillOutlineColorTransition(
1056
+ layer: FillLayer,
1057
+ styleValue: MLRNStyleValue,
1058
+ ) {
1059
+ val transition = styleValue.transition
1060
+ if (transition != null) {
1061
+ layer.fillOutlineColorTransition = transition
1062
+ }
1063
+ }
1064
+
1065
+ fun setFillTranslate(
1066
+ layer: FillLayer,
1067
+ styleValue: MLRNStyleValue,
1068
+ ) {
1069
+ if (styleValue.isExpression()) {
1070
+ layer.setProperties(PropertyFactory.fillTranslate(styleValue.getExpression()))
1071
+ } else {
1072
+ layer.setProperties(PropertyFactory.fillTranslate(styleValue.getFloatArray(VALUE_KEY)))
1073
+ }
1074
+ }
1075
+
1076
+ fun setFillTranslateTransition(
1077
+ layer: FillLayer,
1078
+ styleValue: MLRNStyleValue,
1079
+ ) {
1080
+ val transition = styleValue.transition
1081
+ if (transition != null) {
1082
+ layer.fillTranslateTransition = transition
1083
+ }
1084
+ }
1085
+
1086
+ fun setFillTranslateAnchor(
1087
+ layer: FillLayer,
1088
+ styleValue: MLRNStyleValue,
1089
+ ) {
1090
+ if (styleValue.isExpression()) {
1091
+ layer.setProperties(PropertyFactory.fillTranslateAnchor(styleValue.getExpression()))
1092
+ } else {
1093
+ layer.setProperties(PropertyFactory.fillTranslateAnchor(styleValue.getString(VALUE_KEY)))
1094
+ }
1095
+ }
1096
+
1097
+ fun setFillPattern(
1098
+ layer: FillLayer,
1099
+ styleValue: MLRNStyleValue,
1100
+ ) {
1101
+ if (styleValue.isExpression()) {
1102
+ if (styleValue.isImageStringValue) {
1103
+ layer.setProperties(PropertyFactory.fillPattern(styleValue.getImageStringValue()))
1104
+ } else {
1105
+ layer.setProperties(PropertyFactory.fillPattern(styleValue.getExpression()))
1106
+ }
1107
+ } else {
1108
+ layer.setProperties(PropertyFactory.fillPattern(styleValue.imageURI))
1109
+ }
1110
+ }
1111
+
1112
+ fun setFillPatternTransition(
1113
+ layer: FillLayer,
1114
+ styleValue: MLRNStyleValue,
1115
+ ) {
1116
+ val transition = styleValue.transition
1117
+ if (transition != null) {
1118
+ layer.fillPatternTransition = transition
1119
+ }
1120
+ }
1121
+
1122
+ fun setLineCap(
1123
+ layer: LineLayer,
1124
+ styleValue: MLRNStyleValue,
1125
+ ) {
1126
+ if (styleValue.isExpression()) {
1127
+ layer.setProperties(PropertyFactory.lineCap(styleValue.getExpression()))
1128
+ } else {
1129
+ layer.setProperties(PropertyFactory.lineCap(styleValue.getString(VALUE_KEY)))
1130
+ }
1131
+ }
1132
+
1133
+ fun setLineJoin(
1134
+ layer: LineLayer,
1135
+ styleValue: MLRNStyleValue,
1136
+ ) {
1137
+ if (styleValue.isExpression()) {
1138
+ layer.setProperties(PropertyFactory.lineJoin(styleValue.getExpression()))
1139
+ } else {
1140
+ layer.setProperties(PropertyFactory.lineJoin(styleValue.getString(VALUE_KEY)))
1141
+ }
1142
+ }
1143
+
1144
+ fun setLineMiterLimit(
1145
+ layer: LineLayer,
1146
+ styleValue: MLRNStyleValue,
1147
+ ) {
1148
+ if (styleValue.isExpression()) {
1149
+ layer.setProperties(PropertyFactory.lineMiterLimit(styleValue.getExpression()))
1150
+ } else {
1151
+ layer.setProperties(PropertyFactory.lineMiterLimit(styleValue.getFloat(VALUE_KEY)))
1152
+ }
1153
+ }
1154
+
1155
+ fun setLineRoundLimit(
1156
+ layer: LineLayer,
1157
+ styleValue: MLRNStyleValue,
1158
+ ) {
1159
+ if (styleValue.isExpression()) {
1160
+ layer.setProperties(PropertyFactory.lineRoundLimit(styleValue.getExpression()))
1161
+ } else {
1162
+ layer.setProperties(PropertyFactory.lineRoundLimit(styleValue.getFloat(VALUE_KEY)))
1163
+ }
1164
+ }
1165
+
1166
+ fun setLineSortKey(
1167
+ layer: LineLayer,
1168
+ styleValue: MLRNStyleValue,
1169
+ ) {
1170
+ if (styleValue.isExpression()) {
1171
+ layer.setProperties(PropertyFactory.lineSortKey(styleValue.getExpression()))
1172
+ } else {
1173
+ layer.setProperties(PropertyFactory.lineSortKey(styleValue.getFloat(VALUE_KEY)))
1174
+ }
1175
+ }
1176
+
1177
+ fun setVisibility(
1178
+ layer: LineLayer,
1179
+ styleValue: MLRNStyleValue,
1180
+ ) {
1181
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
1182
+ }
1183
+
1184
+ fun setLineOpacity(
1185
+ layer: LineLayer,
1186
+ styleValue: MLRNStyleValue,
1187
+ ) {
1188
+ if (styleValue.isExpression()) {
1189
+ layer.setProperties(PropertyFactory.lineOpacity(styleValue.getExpression()))
1190
+ } else {
1191
+ layer.setProperties(PropertyFactory.lineOpacity(styleValue.getFloat(VALUE_KEY)))
1192
+ }
1193
+ }
1194
+
1195
+ fun setLineOpacityTransition(
1196
+ layer: LineLayer,
1197
+ styleValue: MLRNStyleValue,
1198
+ ) {
1199
+ val transition = styleValue.transition
1200
+ if (transition != null) {
1201
+ layer.lineOpacityTransition = transition
1202
+ }
1203
+ }
1204
+
1205
+ fun setLineColor(
1206
+ layer: LineLayer,
1207
+ styleValue: MLRNStyleValue,
1208
+ ) {
1209
+ if (styleValue.isExpression()) {
1210
+ layer.setProperties(PropertyFactory.lineColor(styleValue.getExpression()))
1211
+ } else {
1212
+ layer.setProperties(PropertyFactory.lineColor(styleValue.getInt(VALUE_KEY)))
1213
+ }
1214
+ }
1215
+
1216
+ fun setLineColorTransition(
1217
+ layer: LineLayer,
1218
+ styleValue: MLRNStyleValue,
1219
+ ) {
1220
+ val transition = styleValue.transition
1221
+ if (transition != null) {
1222
+ layer.lineColorTransition = transition
1223
+ }
1224
+ }
1225
+
1226
+ fun setLineTranslate(
1227
+ layer: LineLayer,
1228
+ styleValue: MLRNStyleValue,
1229
+ ) {
1230
+ if (styleValue.isExpression()) {
1231
+ layer.setProperties(PropertyFactory.lineTranslate(styleValue.getExpression()))
1232
+ } else {
1233
+ layer.setProperties(PropertyFactory.lineTranslate(styleValue.getFloatArray(VALUE_KEY)))
1234
+ }
1235
+ }
1236
+
1237
+ fun setLineTranslateTransition(
1238
+ layer: LineLayer,
1239
+ styleValue: MLRNStyleValue,
1240
+ ) {
1241
+ val transition = styleValue.transition
1242
+ if (transition != null) {
1243
+ layer.lineTranslateTransition = transition
1244
+ }
1245
+ }
1246
+
1247
+ fun setLineTranslateAnchor(
1248
+ layer: LineLayer,
1249
+ styleValue: MLRNStyleValue,
1250
+ ) {
1251
+ if (styleValue.isExpression()) {
1252
+ layer.setProperties(PropertyFactory.lineTranslateAnchor(styleValue.getExpression()))
1253
+ } else {
1254
+ layer.setProperties(PropertyFactory.lineTranslateAnchor(styleValue.getString(VALUE_KEY)))
1255
+ }
1256
+ }
1257
+
1258
+ fun setLineWidth(
1259
+ layer: LineLayer,
1260
+ styleValue: MLRNStyleValue,
1261
+ ) {
1262
+ if (styleValue.isExpression()) {
1263
+ layer.setProperties(PropertyFactory.lineWidth(styleValue.getExpression()))
1264
+ } else {
1265
+ layer.setProperties(PropertyFactory.lineWidth(styleValue.getFloat(VALUE_KEY)))
1266
+ }
1267
+ }
1268
+
1269
+ fun setLineWidthTransition(
1270
+ layer: LineLayer,
1271
+ styleValue: MLRNStyleValue,
1272
+ ) {
1273
+ val transition = styleValue.transition
1274
+ if (transition != null) {
1275
+ layer.lineWidthTransition = transition
1276
+ }
1277
+ }
1278
+
1279
+ fun setLineGapWidth(
1280
+ layer: LineLayer,
1281
+ styleValue: MLRNStyleValue,
1282
+ ) {
1283
+ if (styleValue.isExpression()) {
1284
+ layer.setProperties(PropertyFactory.lineGapWidth(styleValue.getExpression()))
1285
+ } else {
1286
+ layer.setProperties(PropertyFactory.lineGapWidth(styleValue.getFloat(VALUE_KEY)))
1287
+ }
1288
+ }
1289
+
1290
+ fun setLineGapWidthTransition(
1291
+ layer: LineLayer,
1292
+ styleValue: MLRNStyleValue,
1293
+ ) {
1294
+ val transition = styleValue.transition
1295
+ if (transition != null) {
1296
+ layer.lineGapWidthTransition = transition
1297
+ }
1298
+ }
1299
+
1300
+ fun setLineOffset(
1301
+ layer: LineLayer,
1302
+ styleValue: MLRNStyleValue,
1303
+ ) {
1304
+ if (styleValue.isExpression()) {
1305
+ layer.setProperties(PropertyFactory.lineOffset(styleValue.getExpression()))
1306
+ } else {
1307
+ layer.setProperties(PropertyFactory.lineOffset(styleValue.getFloat(VALUE_KEY)))
1308
+ }
1309
+ }
1310
+
1311
+ fun setLineOffsetTransition(
1312
+ layer: LineLayer,
1313
+ styleValue: MLRNStyleValue,
1314
+ ) {
1315
+ val transition = styleValue.transition
1316
+ if (transition != null) {
1317
+ layer.lineOffsetTransition = transition
1318
+ }
1319
+ }
1320
+
1321
+ fun setLineBlur(
1322
+ layer: LineLayer,
1323
+ styleValue: MLRNStyleValue,
1324
+ ) {
1325
+ if (styleValue.isExpression()) {
1326
+ layer.setProperties(PropertyFactory.lineBlur(styleValue.getExpression()))
1327
+ } else {
1328
+ layer.setProperties(PropertyFactory.lineBlur(styleValue.getFloat(VALUE_KEY)))
1329
+ }
1330
+ }
1331
+
1332
+ fun setLineBlurTransition(
1333
+ layer: LineLayer,
1334
+ styleValue: MLRNStyleValue,
1335
+ ) {
1336
+ val transition = styleValue.transition
1337
+ if (transition != null) {
1338
+ layer.lineBlurTransition = transition
1339
+ }
1340
+ }
1341
+
1342
+ fun setLineDasharray(
1343
+ layer: LineLayer,
1344
+ styleValue: MLRNStyleValue,
1345
+ ) {
1346
+ if (styleValue.isExpression()) {
1347
+ layer.setProperties(PropertyFactory.lineDasharray(styleValue.getExpression()))
1348
+ } else {
1349
+ layer.setProperties(PropertyFactory.lineDasharray(styleValue.getFloatArray(VALUE_KEY)))
1350
+ }
1351
+ }
1352
+
1353
+ fun setLineDasharrayTransition(
1354
+ layer: LineLayer,
1355
+ styleValue: MLRNStyleValue,
1356
+ ) {
1357
+ val transition = styleValue.transition
1358
+ if (transition != null) {
1359
+ layer.lineDasharrayTransition = transition
1360
+ }
1361
+ }
1362
+
1363
+ fun setLinePattern(
1364
+ layer: LineLayer,
1365
+ styleValue: MLRNStyleValue,
1366
+ ) {
1367
+ if (styleValue.isExpression()) {
1368
+ if (styleValue.isImageStringValue) {
1369
+ layer.setProperties(PropertyFactory.linePattern(styleValue.getImageStringValue()))
1370
+ } else {
1371
+ layer.setProperties(PropertyFactory.linePattern(styleValue.getExpression()))
1372
+ }
1373
+ } else {
1374
+ layer.setProperties(PropertyFactory.linePattern(styleValue.imageURI))
1375
+ }
1376
+ }
1377
+
1378
+ fun setLinePatternTransition(
1379
+ layer: LineLayer,
1380
+ styleValue: MLRNStyleValue,
1381
+ ) {
1382
+ val transition = styleValue.transition
1383
+ if (transition != null) {
1384
+ layer.linePatternTransition = transition
1385
+ }
1386
+ }
1387
+
1388
+ fun setLineGradient(
1389
+ layer: LineLayer,
1390
+ styleValue: MLRNStyleValue,
1391
+ ) {
1392
+ if (styleValue.isExpression()) {
1393
+ layer.setProperties(PropertyFactory.lineGradient(styleValue.getExpression()))
1394
+ } else {
1395
+ layer.setProperties(PropertyFactory.lineGradient(styleValue.getInt(VALUE_KEY)))
1396
+ }
1397
+ }
1398
+
1399
+ fun setSymbolPlacement(
1400
+ layer: SymbolLayer,
1401
+ styleValue: MLRNStyleValue,
1402
+ ) {
1403
+ if (styleValue.isExpression()) {
1404
+ layer.setProperties(PropertyFactory.symbolPlacement(styleValue.getExpression()))
1405
+ } else {
1406
+ layer.setProperties(PropertyFactory.symbolPlacement(styleValue.getString(VALUE_KEY)))
1407
+ }
1408
+ }
1409
+
1410
+ fun setSymbolSpacing(
1411
+ layer: SymbolLayer,
1412
+ styleValue: MLRNStyleValue,
1413
+ ) {
1414
+ if (styleValue.isExpression()) {
1415
+ layer.setProperties(PropertyFactory.symbolSpacing(styleValue.getExpression()))
1416
+ } else {
1417
+ layer.setProperties(PropertyFactory.symbolSpacing(styleValue.getFloat(VALUE_KEY)))
1418
+ }
1419
+ }
1420
+
1421
+ fun setSymbolAvoidEdges(
1422
+ layer: SymbolLayer,
1423
+ styleValue: MLRNStyleValue,
1424
+ ) {
1425
+ if (styleValue.isExpression()) {
1426
+ layer.setProperties(PropertyFactory.symbolAvoidEdges(styleValue.getExpression()))
1427
+ } else {
1428
+ layer.setProperties(PropertyFactory.symbolAvoidEdges(styleValue.getBoolean(VALUE_KEY)))
1429
+ }
1430
+ }
1431
+
1432
+ fun setSymbolSortKey(
1433
+ layer: SymbolLayer,
1434
+ styleValue: MLRNStyleValue,
1435
+ ) {
1436
+ if (styleValue.isExpression()) {
1437
+ layer.setProperties(PropertyFactory.symbolSortKey(styleValue.getExpression()))
1438
+ } else {
1439
+ layer.setProperties(PropertyFactory.symbolSortKey(styleValue.getFloat(VALUE_KEY)))
1440
+ }
1441
+ }
1442
+
1443
+ fun setSymbolZOrder(
1444
+ layer: SymbolLayer,
1445
+ styleValue: MLRNStyleValue,
1446
+ ) {
1447
+ if (styleValue.isExpression()) {
1448
+ layer.setProperties(PropertyFactory.symbolZOrder(styleValue.getExpression()))
1449
+ } else {
1450
+ layer.setProperties(PropertyFactory.symbolZOrder(styleValue.getString(VALUE_KEY)))
1451
+ }
1452
+ }
1453
+
1454
+ fun setIconAllowOverlap(
1455
+ layer: SymbolLayer,
1456
+ styleValue: MLRNStyleValue,
1457
+ ) {
1458
+ if (styleValue.isExpression()) {
1459
+ layer.setProperties(PropertyFactory.iconAllowOverlap(styleValue.getExpression()))
1460
+ } else {
1461
+ layer.setProperties(PropertyFactory.iconAllowOverlap(styleValue.getBoolean(VALUE_KEY)))
1462
+ }
1463
+ }
1464
+
1465
+ fun setIconIgnorePlacement(
1466
+ layer: SymbolLayer,
1467
+ styleValue: MLRNStyleValue,
1468
+ ) {
1469
+ if (styleValue.isExpression()) {
1470
+ layer.setProperties(PropertyFactory.iconIgnorePlacement(styleValue.getExpression()))
1471
+ } else {
1472
+ layer.setProperties(PropertyFactory.iconIgnorePlacement(styleValue.getBoolean(VALUE_KEY)))
1473
+ }
1474
+ }
1475
+
1476
+ fun setIconOptional(
1477
+ layer: SymbolLayer,
1478
+ styleValue: MLRNStyleValue,
1479
+ ) {
1480
+ if (styleValue.isExpression()) {
1481
+ layer.setProperties(PropertyFactory.iconOptional(styleValue.getExpression()))
1482
+ } else {
1483
+ layer.setProperties(PropertyFactory.iconOptional(styleValue.getBoolean(VALUE_KEY)))
1484
+ }
1485
+ }
1486
+
1487
+ fun setIconRotationAlignment(
1488
+ layer: SymbolLayer,
1489
+ styleValue: MLRNStyleValue,
1490
+ ) {
1491
+ if (styleValue.isExpression()) {
1492
+ layer.setProperties(PropertyFactory.iconRotationAlignment(styleValue.getExpression()))
1493
+ } else {
1494
+ layer.setProperties(PropertyFactory.iconRotationAlignment(styleValue.getString(VALUE_KEY)))
1495
+ }
1496
+ }
1497
+
1498
+ fun setIconSize(
1499
+ layer: SymbolLayer,
1500
+ styleValue: MLRNStyleValue,
1501
+ ) {
1502
+ if (styleValue.isExpression()) {
1503
+ layer.setProperties(PropertyFactory.iconSize(styleValue.getExpression()))
1504
+ } else {
1505
+ layer.setProperties(PropertyFactory.iconSize(styleValue.getFloat(VALUE_KEY)))
1506
+ }
1507
+ }
1508
+
1509
+ fun setIconTextFit(
1510
+ layer: SymbolLayer,
1511
+ styleValue: MLRNStyleValue,
1512
+ ) {
1513
+ if (styleValue.isExpression()) {
1514
+ layer.setProperties(PropertyFactory.iconTextFit(styleValue.getExpression()))
1515
+ } else {
1516
+ layer.setProperties(PropertyFactory.iconTextFit(styleValue.getString(VALUE_KEY)))
1517
+ }
1518
+ }
1519
+
1520
+ fun setIconTextFitPadding(
1521
+ layer: SymbolLayer,
1522
+ styleValue: MLRNStyleValue,
1523
+ ) {
1524
+ if (styleValue.isExpression()) {
1525
+ layer.setProperties(PropertyFactory.iconTextFitPadding(styleValue.getExpression()))
1526
+ } else {
1527
+ layer.setProperties(PropertyFactory.iconTextFitPadding(styleValue.getFloatArray(VALUE_KEY)))
1528
+ }
1529
+ }
1530
+
1531
+ fun setIconImage(
1532
+ layer: SymbolLayer,
1533
+ styleValue: MLRNStyleValue,
1534
+ ) {
1535
+ if (styleValue.isExpression()) {
1536
+ if (styleValue.isImageStringValue) {
1537
+ layer.setProperties(PropertyFactory.iconImage(styleValue.getImageStringValue()))
1538
+ } else {
1539
+ layer.setProperties(PropertyFactory.iconImage(styleValue.getExpression()))
1540
+ }
1541
+ } else {
1542
+ layer.setProperties(PropertyFactory.iconImage(styleValue.imageURI))
1543
+ }
1544
+ }
1545
+
1546
+ fun setIconRotate(
1547
+ layer: SymbolLayer,
1548
+ styleValue: MLRNStyleValue,
1549
+ ) {
1550
+ if (styleValue.isExpression()) {
1551
+ layer.setProperties(PropertyFactory.iconRotate(styleValue.getExpression()))
1552
+ } else {
1553
+ layer.setProperties(PropertyFactory.iconRotate(styleValue.getFloat(VALUE_KEY)))
1554
+ }
1555
+ }
1556
+
1557
+ fun setIconPadding(
1558
+ layer: SymbolLayer,
1559
+ styleValue: MLRNStyleValue,
1560
+ ) {
1561
+ if (styleValue.isExpression()) {
1562
+ layer.setProperties(PropertyFactory.iconPadding(styleValue.getExpression()))
1563
+ } else {
1564
+ layer.setProperties(PropertyFactory.iconPadding(styleValue.getFloatArray(VALUE_KEY)))
1565
+ }
1566
+ }
1567
+
1568
+ fun setIconKeepUpright(
1569
+ layer: SymbolLayer,
1570
+ styleValue: MLRNStyleValue,
1571
+ ) {
1572
+ if (styleValue.isExpression()) {
1573
+ layer.setProperties(PropertyFactory.iconKeepUpright(styleValue.getExpression()))
1574
+ } else {
1575
+ layer.setProperties(PropertyFactory.iconKeepUpright(styleValue.getBoolean(VALUE_KEY)))
1576
+ }
1577
+ }
1578
+
1579
+ fun setIconOffset(
1580
+ layer: SymbolLayer,
1581
+ styleValue: MLRNStyleValue,
1582
+ ) {
1583
+ if (styleValue.isExpression()) {
1584
+ layer.setProperties(PropertyFactory.iconOffset(styleValue.getExpression()))
1585
+ } else {
1586
+ layer.setProperties(PropertyFactory.iconOffset(styleValue.getFloatArray(VALUE_KEY)))
1587
+ }
1588
+ }
1589
+
1590
+ fun setIconAnchor(
1591
+ layer: SymbolLayer,
1592
+ styleValue: MLRNStyleValue,
1593
+ ) {
1594
+ if (styleValue.isExpression()) {
1595
+ layer.setProperties(PropertyFactory.iconAnchor(styleValue.getExpression()))
1596
+ } else {
1597
+ layer.setProperties(PropertyFactory.iconAnchor(styleValue.getString(VALUE_KEY)))
1598
+ }
1599
+ }
1600
+
1601
+ fun setIconPitchAlignment(
1602
+ layer: SymbolLayer,
1603
+ styleValue: MLRNStyleValue,
1604
+ ) {
1605
+ if (styleValue.isExpression()) {
1606
+ layer.setProperties(PropertyFactory.iconPitchAlignment(styleValue.getExpression()))
1607
+ } else {
1608
+ layer.setProperties(PropertyFactory.iconPitchAlignment(styleValue.getString(VALUE_KEY)))
1609
+ }
1610
+ }
1611
+
1612
+ fun setTextPitchAlignment(
1613
+ layer: SymbolLayer,
1614
+ styleValue: MLRNStyleValue,
1615
+ ) {
1616
+ if (styleValue.isExpression()) {
1617
+ layer.setProperties(PropertyFactory.textPitchAlignment(styleValue.getExpression()))
1618
+ } else {
1619
+ layer.setProperties(PropertyFactory.textPitchAlignment(styleValue.getString(VALUE_KEY)))
1620
+ }
1621
+ }
1622
+
1623
+ fun setTextRotationAlignment(
1624
+ layer: SymbolLayer,
1625
+ styleValue: MLRNStyleValue,
1626
+ ) {
1627
+ if (styleValue.isExpression()) {
1628
+ layer.setProperties(PropertyFactory.textRotationAlignment(styleValue.getExpression()))
1629
+ } else {
1630
+ layer.setProperties(PropertyFactory.textRotationAlignment(styleValue.getString(VALUE_KEY)))
1631
+ }
1632
+ }
1633
+
1634
+ fun setTextField(
1635
+ layer: SymbolLayer,
1636
+ styleValue: MLRNStyleValue,
1637
+ ) {
1638
+ if (styleValue.isExpression()) {
1639
+ layer.setProperties(PropertyFactory.textField(styleValue.getExpression()))
1640
+ } else {
1641
+ layer.setProperties(PropertyFactory.textField(styleValue.getString(VALUE_KEY)))
1642
+ }
1643
+ }
1644
+
1645
+ fun setTextFont(
1646
+ layer: SymbolLayer,
1647
+ styleValue: MLRNStyleValue,
1648
+ ) {
1649
+ if (styleValue.isExpression()) {
1650
+ layer.setProperties(PropertyFactory.textFont(styleValue.getExpression()))
1651
+ } else {
1652
+ layer.setProperties(PropertyFactory.textFont(styleValue.getStringArray(VALUE_KEY)))
1653
+ }
1654
+ }
1655
+
1656
+ fun setTextSize(
1657
+ layer: SymbolLayer,
1658
+ styleValue: MLRNStyleValue,
1659
+ ) {
1660
+ if (styleValue.isExpression()) {
1661
+ layer.setProperties(PropertyFactory.textSize(styleValue.getExpression()))
1662
+ } else {
1663
+ layer.setProperties(PropertyFactory.textSize(styleValue.getFloat(VALUE_KEY)))
1664
+ }
1665
+ }
1666
+
1667
+ fun setTextMaxWidth(
1668
+ layer: SymbolLayer,
1669
+ styleValue: MLRNStyleValue,
1670
+ ) {
1671
+ if (styleValue.isExpression()) {
1672
+ layer.setProperties(PropertyFactory.textMaxWidth(styleValue.getExpression()))
1673
+ } else {
1674
+ layer.setProperties(PropertyFactory.textMaxWidth(styleValue.getFloat(VALUE_KEY)))
1675
+ }
1676
+ }
1677
+
1678
+ fun setTextLineHeight(
1679
+ layer: SymbolLayer,
1680
+ styleValue: MLRNStyleValue,
1681
+ ) {
1682
+ if (styleValue.isExpression()) {
1683
+ layer.setProperties(PropertyFactory.textLineHeight(styleValue.getExpression()))
1684
+ } else {
1685
+ layer.setProperties(PropertyFactory.textLineHeight(styleValue.getFloat(VALUE_KEY)))
1686
+ }
1687
+ }
1688
+
1689
+ fun setTextLetterSpacing(
1690
+ layer: SymbolLayer,
1691
+ styleValue: MLRNStyleValue,
1692
+ ) {
1693
+ if (styleValue.isExpression()) {
1694
+ layer.setProperties(PropertyFactory.textLetterSpacing(styleValue.getExpression()))
1695
+ } else {
1696
+ layer.setProperties(PropertyFactory.textLetterSpacing(styleValue.getFloat(VALUE_KEY)))
1697
+ }
1698
+ }
1699
+
1700
+ fun setTextJustify(
1701
+ layer: SymbolLayer,
1702
+ styleValue: MLRNStyleValue,
1703
+ ) {
1704
+ if (styleValue.isExpression()) {
1705
+ layer.setProperties(PropertyFactory.textJustify(styleValue.getExpression()))
1706
+ } else {
1707
+ layer.setProperties(PropertyFactory.textJustify(styleValue.getString(VALUE_KEY)))
1708
+ }
1709
+ }
1710
+
1711
+ fun setTextRadialOffset(
1712
+ layer: SymbolLayer,
1713
+ styleValue: MLRNStyleValue,
1714
+ ) {
1715
+ if (styleValue.isExpression()) {
1716
+ layer.setProperties(PropertyFactory.textRadialOffset(styleValue.getExpression()))
1717
+ } else {
1718
+ layer.setProperties(PropertyFactory.textRadialOffset(styleValue.getFloat(VALUE_KEY)))
1719
+ }
1720
+ }
1721
+
1722
+ fun setTextVariableAnchor(
1723
+ layer: SymbolLayer,
1724
+ styleValue: MLRNStyleValue,
1725
+ ) {
1726
+ if (styleValue.isExpression()) {
1727
+ layer.setProperties(PropertyFactory.textVariableAnchor(styleValue.getExpression()))
1728
+ } else {
1729
+ layer.setProperties(PropertyFactory.textVariableAnchor(styleValue.getStringArray(VALUE_KEY)))
1730
+ }
1731
+ }
1732
+
1733
+ fun setTextAnchor(
1734
+ layer: SymbolLayer,
1735
+ styleValue: MLRNStyleValue,
1736
+ ) {
1737
+ if (styleValue.isExpression()) {
1738
+ layer.setProperties(PropertyFactory.textAnchor(styleValue.getExpression()))
1739
+ } else {
1740
+ layer.setProperties(PropertyFactory.textAnchor(styleValue.getString(VALUE_KEY)))
1741
+ }
1742
+ }
1743
+
1744
+ fun setTextMaxAngle(
1745
+ layer: SymbolLayer,
1746
+ styleValue: MLRNStyleValue,
1747
+ ) {
1748
+ if (styleValue.isExpression()) {
1749
+ layer.setProperties(PropertyFactory.textMaxAngle(styleValue.getExpression()))
1750
+ } else {
1751
+ layer.setProperties(PropertyFactory.textMaxAngle(styleValue.getFloat(VALUE_KEY)))
1752
+ }
1753
+ }
1754
+
1755
+ fun setTextWritingMode(
1756
+ layer: SymbolLayer,
1757
+ styleValue: MLRNStyleValue,
1758
+ ) {
1759
+ if (styleValue.isExpression()) {
1760
+ layer.setProperties(PropertyFactory.textWritingMode(styleValue.getExpression()))
1761
+ } else {
1762
+ layer.setProperties(PropertyFactory.textWritingMode(styleValue.getStringArray(VALUE_KEY)))
1763
+ }
1764
+ }
1765
+
1766
+ fun setTextRotate(
1767
+ layer: SymbolLayer,
1768
+ styleValue: MLRNStyleValue,
1769
+ ) {
1770
+ if (styleValue.isExpression()) {
1771
+ layer.setProperties(PropertyFactory.textRotate(styleValue.getExpression()))
1772
+ } else {
1773
+ layer.setProperties(PropertyFactory.textRotate(styleValue.getFloat(VALUE_KEY)))
1774
+ }
1775
+ }
1776
+
1777
+ fun setTextPadding(
1778
+ layer: SymbolLayer,
1779
+ styleValue: MLRNStyleValue,
1780
+ ) {
1781
+ if (styleValue.isExpression()) {
1782
+ layer.setProperties(PropertyFactory.textPadding(styleValue.getExpression()))
1783
+ } else {
1784
+ layer.setProperties(PropertyFactory.textPadding(styleValue.getFloat(VALUE_KEY)))
1785
+ }
1786
+ }
1787
+
1788
+ fun setTextKeepUpright(
1789
+ layer: SymbolLayer,
1790
+ styleValue: MLRNStyleValue,
1791
+ ) {
1792
+ if (styleValue.isExpression()) {
1793
+ layer.setProperties(PropertyFactory.textKeepUpright(styleValue.getExpression()))
1794
+ } else {
1795
+ layer.setProperties(PropertyFactory.textKeepUpright(styleValue.getBoolean(VALUE_KEY)))
1796
+ }
1797
+ }
1798
+
1799
+ fun setTextTransform(
1800
+ layer: SymbolLayer,
1801
+ styleValue: MLRNStyleValue,
1802
+ ) {
1803
+ if (styleValue.isExpression()) {
1804
+ layer.setProperties(PropertyFactory.textTransform(styleValue.getExpression()))
1805
+ } else {
1806
+ layer.setProperties(PropertyFactory.textTransform(styleValue.getString(VALUE_KEY)))
1807
+ }
1808
+ }
1809
+
1810
+ fun setTextOffset(
1811
+ layer: SymbolLayer,
1812
+ styleValue: MLRNStyleValue,
1813
+ ) {
1814
+ if (styleValue.isExpression()) {
1815
+ layer.setProperties(PropertyFactory.textOffset(styleValue.getExpression()))
1816
+ } else {
1817
+ layer.setProperties(PropertyFactory.textOffset(styleValue.getFloatArray(VALUE_KEY)))
1818
+ }
1819
+ }
1820
+
1821
+ fun setTextAllowOverlap(
1822
+ layer: SymbolLayer,
1823
+ styleValue: MLRNStyleValue,
1824
+ ) {
1825
+ if (styleValue.isExpression()) {
1826
+ layer.setProperties(PropertyFactory.textAllowOverlap(styleValue.getExpression()))
1827
+ } else {
1828
+ layer.setProperties(PropertyFactory.textAllowOverlap(styleValue.getBoolean(VALUE_KEY)))
1829
+ }
1830
+ }
1831
+
1832
+ fun setTextIgnorePlacement(
1833
+ layer: SymbolLayer,
1834
+ styleValue: MLRNStyleValue,
1835
+ ) {
1836
+ if (styleValue.isExpression()) {
1837
+ layer.setProperties(PropertyFactory.textIgnorePlacement(styleValue.getExpression()))
1838
+ } else {
1839
+ layer.setProperties(PropertyFactory.textIgnorePlacement(styleValue.getBoolean(VALUE_KEY)))
1840
+ }
1841
+ }
1842
+
1843
+ fun setTextOptional(
1844
+ layer: SymbolLayer,
1845
+ styleValue: MLRNStyleValue,
1846
+ ) {
1847
+ if (styleValue.isExpression()) {
1848
+ layer.setProperties(PropertyFactory.textOptional(styleValue.getExpression()))
1849
+ } else {
1850
+ layer.setProperties(PropertyFactory.textOptional(styleValue.getBoolean(VALUE_KEY)))
1851
+ }
1852
+ }
1853
+
1854
+ fun setVisibility(
1855
+ layer: SymbolLayer,
1856
+ styleValue: MLRNStyleValue,
1857
+ ) {
1858
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
1859
+ }
1860
+
1861
+ fun setIconOpacity(
1862
+ layer: SymbolLayer,
1863
+ styleValue: MLRNStyleValue,
1864
+ ) {
1865
+ if (styleValue.isExpression()) {
1866
+ layer.setProperties(PropertyFactory.iconOpacity(styleValue.getExpression()))
1867
+ } else {
1868
+ layer.setProperties(PropertyFactory.iconOpacity(styleValue.getFloat(VALUE_KEY)))
1869
+ }
1870
+ }
1871
+
1872
+ fun setIconOpacityTransition(
1873
+ layer: SymbolLayer,
1874
+ styleValue: MLRNStyleValue,
1875
+ ) {
1876
+ val transition = styleValue.transition
1877
+ if (transition != null) {
1878
+ layer.iconOpacityTransition = transition
1879
+ }
1880
+ }
1881
+
1882
+ fun setIconColor(
1883
+ layer: SymbolLayer,
1884
+ styleValue: MLRNStyleValue,
1885
+ ) {
1886
+ if (styleValue.isExpression()) {
1887
+ layer.setProperties(PropertyFactory.iconColor(styleValue.getExpression()))
1888
+ } else {
1889
+ layer.setProperties(PropertyFactory.iconColor(styleValue.getInt(VALUE_KEY)))
1890
+ }
1891
+ }
1892
+
1893
+ fun setIconColorTransition(
1894
+ layer: SymbolLayer,
1895
+ styleValue: MLRNStyleValue,
1896
+ ) {
1897
+ val transition = styleValue.transition
1898
+ if (transition != null) {
1899
+ layer.iconColorTransition = transition
1900
+ }
1901
+ }
1902
+
1903
+ fun setIconHaloColor(
1904
+ layer: SymbolLayer,
1905
+ styleValue: MLRNStyleValue,
1906
+ ) {
1907
+ if (styleValue.isExpression()) {
1908
+ layer.setProperties(PropertyFactory.iconHaloColor(styleValue.getExpression()))
1909
+ } else {
1910
+ layer.setProperties(PropertyFactory.iconHaloColor(styleValue.getInt(VALUE_KEY)))
1911
+ }
1912
+ }
1913
+
1914
+ fun setIconHaloColorTransition(
1915
+ layer: SymbolLayer,
1916
+ styleValue: MLRNStyleValue,
1917
+ ) {
1918
+ val transition = styleValue.transition
1919
+ if (transition != null) {
1920
+ layer.iconHaloColorTransition = transition
1921
+ }
1922
+ }
1923
+
1924
+ fun setIconHaloWidth(
1925
+ layer: SymbolLayer,
1926
+ styleValue: MLRNStyleValue,
1927
+ ) {
1928
+ if (styleValue.isExpression()) {
1929
+ layer.setProperties(PropertyFactory.iconHaloWidth(styleValue.getExpression()))
1930
+ } else {
1931
+ layer.setProperties(PropertyFactory.iconHaloWidth(styleValue.getFloat(VALUE_KEY)))
1932
+ }
1933
+ }
1934
+
1935
+ fun setIconHaloWidthTransition(
1936
+ layer: SymbolLayer,
1937
+ styleValue: MLRNStyleValue,
1938
+ ) {
1939
+ val transition = styleValue.transition
1940
+ if (transition != null) {
1941
+ layer.iconHaloWidthTransition = transition
1942
+ }
1943
+ }
1944
+
1945
+ fun setIconHaloBlur(
1946
+ layer: SymbolLayer,
1947
+ styleValue: MLRNStyleValue,
1948
+ ) {
1949
+ if (styleValue.isExpression()) {
1950
+ layer.setProperties(PropertyFactory.iconHaloBlur(styleValue.getExpression()))
1951
+ } else {
1952
+ layer.setProperties(PropertyFactory.iconHaloBlur(styleValue.getFloat(VALUE_KEY)))
1953
+ }
1954
+ }
1955
+
1956
+ fun setIconHaloBlurTransition(
1957
+ layer: SymbolLayer,
1958
+ styleValue: MLRNStyleValue,
1959
+ ) {
1960
+ val transition = styleValue.transition
1961
+ if (transition != null) {
1962
+ layer.iconHaloBlurTransition = transition
1963
+ }
1964
+ }
1965
+
1966
+ fun setIconTranslate(
1967
+ layer: SymbolLayer,
1968
+ styleValue: MLRNStyleValue,
1969
+ ) {
1970
+ if (styleValue.isExpression()) {
1971
+ layer.setProperties(PropertyFactory.iconTranslate(styleValue.getExpression()))
1972
+ } else {
1973
+ layer.setProperties(PropertyFactory.iconTranslate(styleValue.getFloatArray(VALUE_KEY)))
1974
+ }
1975
+ }
1976
+
1977
+ fun setIconTranslateTransition(
1978
+ layer: SymbolLayer,
1979
+ styleValue: MLRNStyleValue,
1980
+ ) {
1981
+ val transition = styleValue.transition
1982
+ if (transition != null) {
1983
+ layer.iconTranslateTransition = transition
1984
+ }
1985
+ }
1986
+
1987
+ fun setIconTranslateAnchor(
1988
+ layer: SymbolLayer,
1989
+ styleValue: MLRNStyleValue,
1990
+ ) {
1991
+ if (styleValue.isExpression()) {
1992
+ layer.setProperties(PropertyFactory.iconTranslateAnchor(styleValue.getExpression()))
1993
+ } else {
1994
+ layer.setProperties(PropertyFactory.iconTranslateAnchor(styleValue.getString(VALUE_KEY)))
1995
+ }
1996
+ }
1997
+
1998
+ fun setTextOpacity(
1999
+ layer: SymbolLayer,
2000
+ styleValue: MLRNStyleValue,
2001
+ ) {
2002
+ if (styleValue.isExpression()) {
2003
+ layer.setProperties(PropertyFactory.textOpacity(styleValue.getExpression()))
2004
+ } else {
2005
+ layer.setProperties(PropertyFactory.textOpacity(styleValue.getFloat(VALUE_KEY)))
2006
+ }
2007
+ }
2008
+
2009
+ fun setTextOpacityTransition(
2010
+ layer: SymbolLayer,
2011
+ styleValue: MLRNStyleValue,
2012
+ ) {
2013
+ val transition = styleValue.transition
2014
+ if (transition != null) {
2015
+ layer.textOpacityTransition = transition
2016
+ }
2017
+ }
2018
+
2019
+ fun setTextColor(
2020
+ layer: SymbolLayer,
2021
+ styleValue: MLRNStyleValue,
2022
+ ) {
2023
+ if (styleValue.isExpression()) {
2024
+ layer.setProperties(PropertyFactory.textColor(styleValue.getExpression()))
2025
+ } else {
2026
+ layer.setProperties(PropertyFactory.textColor(styleValue.getInt(VALUE_KEY)))
2027
+ }
2028
+ }
2029
+
2030
+ fun setTextColorTransition(
2031
+ layer: SymbolLayer,
2032
+ styleValue: MLRNStyleValue,
2033
+ ) {
2034
+ val transition = styleValue.transition
2035
+ if (transition != null) {
2036
+ layer.textColorTransition = transition
2037
+ }
2038
+ }
2039
+
2040
+ fun setTextHaloColor(
2041
+ layer: SymbolLayer,
2042
+ styleValue: MLRNStyleValue,
2043
+ ) {
2044
+ if (styleValue.isExpression()) {
2045
+ layer.setProperties(PropertyFactory.textHaloColor(styleValue.getExpression()))
2046
+ } else {
2047
+ layer.setProperties(PropertyFactory.textHaloColor(styleValue.getInt(VALUE_KEY)))
2048
+ }
2049
+ }
2050
+
2051
+ fun setTextHaloColorTransition(
2052
+ layer: SymbolLayer,
2053
+ styleValue: MLRNStyleValue,
2054
+ ) {
2055
+ val transition = styleValue.transition
2056
+ if (transition != null) {
2057
+ layer.textHaloColorTransition = transition
2058
+ }
2059
+ }
2060
+
2061
+ fun setTextHaloWidth(
2062
+ layer: SymbolLayer,
2063
+ styleValue: MLRNStyleValue,
2064
+ ) {
2065
+ if (styleValue.isExpression()) {
2066
+ layer.setProperties(PropertyFactory.textHaloWidth(styleValue.getExpression()))
2067
+ } else {
2068
+ layer.setProperties(PropertyFactory.textHaloWidth(styleValue.getFloat(VALUE_KEY)))
2069
+ }
2070
+ }
2071
+
2072
+ fun setTextHaloWidthTransition(
2073
+ layer: SymbolLayer,
2074
+ styleValue: MLRNStyleValue,
2075
+ ) {
2076
+ val transition = styleValue.transition
2077
+ if (transition != null) {
2078
+ layer.textHaloWidthTransition = transition
2079
+ }
2080
+ }
2081
+
2082
+ fun setTextHaloBlur(
2083
+ layer: SymbolLayer,
2084
+ styleValue: MLRNStyleValue,
2085
+ ) {
2086
+ if (styleValue.isExpression()) {
2087
+ layer.setProperties(PropertyFactory.textHaloBlur(styleValue.getExpression()))
2088
+ } else {
2089
+ layer.setProperties(PropertyFactory.textHaloBlur(styleValue.getFloat(VALUE_KEY)))
2090
+ }
2091
+ }
2092
+
2093
+ fun setTextHaloBlurTransition(
2094
+ layer: SymbolLayer,
2095
+ styleValue: MLRNStyleValue,
2096
+ ) {
2097
+ val transition = styleValue.transition
2098
+ if (transition != null) {
2099
+ layer.textHaloBlurTransition = transition
2100
+ }
2101
+ }
2102
+
2103
+ fun setTextTranslate(
2104
+ layer: SymbolLayer,
2105
+ styleValue: MLRNStyleValue,
2106
+ ) {
2107
+ if (styleValue.isExpression()) {
2108
+ layer.setProperties(PropertyFactory.textTranslate(styleValue.getExpression()))
2109
+ } else {
2110
+ layer.setProperties(PropertyFactory.textTranslate(styleValue.getFloatArray(VALUE_KEY)))
2111
+ }
2112
+ }
2113
+
2114
+ fun setTextTranslateTransition(
2115
+ layer: SymbolLayer,
2116
+ styleValue: MLRNStyleValue,
2117
+ ) {
2118
+ val transition = styleValue.transition
2119
+ if (transition != null) {
2120
+ layer.textTranslateTransition = transition
2121
+ }
2122
+ }
2123
+
2124
+ fun setTextTranslateAnchor(
2125
+ layer: SymbolLayer,
2126
+ styleValue: MLRNStyleValue,
2127
+ ) {
2128
+ if (styleValue.isExpression()) {
2129
+ layer.setProperties(PropertyFactory.textTranslateAnchor(styleValue.getExpression()))
2130
+ } else {
2131
+ layer.setProperties(PropertyFactory.textTranslateAnchor(styleValue.getString(VALUE_KEY)))
2132
+ }
2133
+ }
2134
+
2135
+ fun setCircleSortKey(
2136
+ layer: CircleLayer,
2137
+ styleValue: MLRNStyleValue,
2138
+ ) {
2139
+ if (styleValue.isExpression()) {
2140
+ layer.setProperties(PropertyFactory.circleSortKey(styleValue.getExpression()))
2141
+ } else {
2142
+ layer.setProperties(PropertyFactory.circleSortKey(styleValue.getFloat(VALUE_KEY)))
2143
+ }
2144
+ }
2145
+
2146
+ fun setVisibility(
2147
+ layer: CircleLayer,
2148
+ styleValue: MLRNStyleValue,
2149
+ ) {
2150
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
2151
+ }
2152
+
2153
+ fun setCircleRadius(
2154
+ layer: CircleLayer,
2155
+ styleValue: MLRNStyleValue,
2156
+ ) {
2157
+ if (styleValue.isExpression()) {
2158
+ layer.setProperties(PropertyFactory.circleRadius(styleValue.getExpression()))
2159
+ } else {
2160
+ layer.setProperties(PropertyFactory.circleRadius(styleValue.getFloat(VALUE_KEY)))
2161
+ }
2162
+ }
2163
+
2164
+ fun setCircleRadiusTransition(
2165
+ layer: CircleLayer,
2166
+ styleValue: MLRNStyleValue,
2167
+ ) {
2168
+ val transition = styleValue.transition
2169
+ if (transition != null) {
2170
+ layer.circleRadiusTransition = transition
2171
+ }
2172
+ }
2173
+
2174
+ fun setCircleColor(
2175
+ layer: CircleLayer,
2176
+ styleValue: MLRNStyleValue,
2177
+ ) {
2178
+ if (styleValue.isExpression()) {
2179
+ layer.setProperties(PropertyFactory.circleColor(styleValue.getExpression()))
2180
+ } else {
2181
+ layer.setProperties(PropertyFactory.circleColor(styleValue.getInt(VALUE_KEY)))
2182
+ }
2183
+ }
2184
+
2185
+ fun setCircleColorTransition(
2186
+ layer: CircleLayer,
2187
+ styleValue: MLRNStyleValue,
2188
+ ) {
2189
+ val transition = styleValue.transition
2190
+ if (transition != null) {
2191
+ layer.circleColorTransition = transition
2192
+ }
2193
+ }
2194
+
2195
+ fun setCircleBlur(
2196
+ layer: CircleLayer,
2197
+ styleValue: MLRNStyleValue,
2198
+ ) {
2199
+ if (styleValue.isExpression()) {
2200
+ layer.setProperties(PropertyFactory.circleBlur(styleValue.getExpression()))
2201
+ } else {
2202
+ layer.setProperties(PropertyFactory.circleBlur(styleValue.getFloat(VALUE_KEY)))
2203
+ }
2204
+ }
2205
+
2206
+ fun setCircleBlurTransition(
2207
+ layer: CircleLayer,
2208
+ styleValue: MLRNStyleValue,
2209
+ ) {
2210
+ val transition = styleValue.transition
2211
+ if (transition != null) {
2212
+ layer.circleBlurTransition = transition
2213
+ }
2214
+ }
2215
+
2216
+ fun setCircleOpacity(
2217
+ layer: CircleLayer,
2218
+ styleValue: MLRNStyleValue,
2219
+ ) {
2220
+ if (styleValue.isExpression()) {
2221
+ layer.setProperties(PropertyFactory.circleOpacity(styleValue.getExpression()))
2222
+ } else {
2223
+ layer.setProperties(PropertyFactory.circleOpacity(styleValue.getFloat(VALUE_KEY)))
2224
+ }
2225
+ }
2226
+
2227
+ fun setCircleOpacityTransition(
2228
+ layer: CircleLayer,
2229
+ styleValue: MLRNStyleValue,
2230
+ ) {
2231
+ val transition = styleValue.transition
2232
+ if (transition != null) {
2233
+ layer.circleOpacityTransition = transition
2234
+ }
2235
+ }
2236
+
2237
+ fun setCircleTranslate(
2238
+ layer: CircleLayer,
2239
+ styleValue: MLRNStyleValue,
2240
+ ) {
2241
+ if (styleValue.isExpression()) {
2242
+ layer.setProperties(PropertyFactory.circleTranslate(styleValue.getExpression()))
2243
+ } else {
2244
+ layer.setProperties(PropertyFactory.circleTranslate(styleValue.getFloatArray(VALUE_KEY)))
2245
+ }
2246
+ }
2247
+
2248
+ fun setCircleTranslateTransition(
2249
+ layer: CircleLayer,
2250
+ styleValue: MLRNStyleValue,
2251
+ ) {
2252
+ val transition = styleValue.transition
2253
+ if (transition != null) {
2254
+ layer.circleTranslateTransition = transition
2255
+ }
2256
+ }
2257
+
2258
+ fun setCircleTranslateAnchor(
2259
+ layer: CircleLayer,
2260
+ styleValue: MLRNStyleValue,
2261
+ ) {
2262
+ if (styleValue.isExpression()) {
2263
+ layer.setProperties(PropertyFactory.circleTranslateAnchor(styleValue.getExpression()))
2264
+ } else {
2265
+ layer.setProperties(PropertyFactory.circleTranslateAnchor(styleValue.getString(VALUE_KEY)))
2266
+ }
2267
+ }
2268
+
2269
+ fun setCirclePitchScale(
2270
+ layer: CircleLayer,
2271
+ styleValue: MLRNStyleValue,
2272
+ ) {
2273
+ if (styleValue.isExpression()) {
2274
+ layer.setProperties(PropertyFactory.circlePitchScale(styleValue.getExpression()))
2275
+ } else {
2276
+ layer.setProperties(PropertyFactory.circlePitchScale(styleValue.getString(VALUE_KEY)))
2277
+ }
2278
+ }
2279
+
2280
+ fun setCirclePitchAlignment(
2281
+ layer: CircleLayer,
2282
+ styleValue: MLRNStyleValue,
2283
+ ) {
2284
+ if (styleValue.isExpression()) {
2285
+ layer.setProperties(PropertyFactory.circlePitchAlignment(styleValue.getExpression()))
2286
+ } else {
2287
+ layer.setProperties(PropertyFactory.circlePitchAlignment(styleValue.getString(VALUE_KEY)))
2288
+ }
2289
+ }
2290
+
2291
+ fun setCircleStrokeWidth(
2292
+ layer: CircleLayer,
2293
+ styleValue: MLRNStyleValue,
2294
+ ) {
2295
+ if (styleValue.isExpression()) {
2296
+ layer.setProperties(PropertyFactory.circleStrokeWidth(styleValue.getExpression()))
2297
+ } else {
2298
+ layer.setProperties(PropertyFactory.circleStrokeWidth(styleValue.getFloat(VALUE_KEY)))
2299
+ }
2300
+ }
2301
+
2302
+ fun setCircleStrokeWidthTransition(
2303
+ layer: CircleLayer,
2304
+ styleValue: MLRNStyleValue,
2305
+ ) {
2306
+ val transition = styleValue.transition
2307
+ if (transition != null) {
2308
+ layer.circleStrokeWidthTransition = transition
2309
+ }
2310
+ }
2311
+
2312
+ fun setCircleStrokeColor(
2313
+ layer: CircleLayer,
2314
+ styleValue: MLRNStyleValue,
2315
+ ) {
2316
+ if (styleValue.isExpression()) {
2317
+ layer.setProperties(PropertyFactory.circleStrokeColor(styleValue.getExpression()))
2318
+ } else {
2319
+ layer.setProperties(PropertyFactory.circleStrokeColor(styleValue.getInt(VALUE_KEY)))
2320
+ }
2321
+ }
2322
+
2323
+ fun setCircleStrokeColorTransition(
2324
+ layer: CircleLayer,
2325
+ styleValue: MLRNStyleValue,
2326
+ ) {
2327
+ val transition = styleValue.transition
2328
+ if (transition != null) {
2329
+ layer.circleStrokeColorTransition = transition
2330
+ }
2331
+ }
2332
+
2333
+ fun setCircleStrokeOpacity(
2334
+ layer: CircleLayer,
2335
+ styleValue: MLRNStyleValue,
2336
+ ) {
2337
+ if (styleValue.isExpression()) {
2338
+ layer.setProperties(PropertyFactory.circleStrokeOpacity(styleValue.getExpression()))
2339
+ } else {
2340
+ layer.setProperties(PropertyFactory.circleStrokeOpacity(styleValue.getFloat(VALUE_KEY)))
2341
+ }
2342
+ }
2343
+
2344
+ fun setCircleStrokeOpacityTransition(
2345
+ layer: CircleLayer,
2346
+ styleValue: MLRNStyleValue,
2347
+ ) {
2348
+ val transition = styleValue.transition
2349
+ if (transition != null) {
2350
+ layer.circleStrokeOpacityTransition = transition
2351
+ }
2352
+ }
2353
+
2354
+ fun setVisibility(
2355
+ layer: HeatmapLayer,
2356
+ styleValue: MLRNStyleValue,
2357
+ ) {
2358
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
2359
+ }
2360
+
2361
+ fun setHeatmapRadius(
2362
+ layer: HeatmapLayer,
2363
+ styleValue: MLRNStyleValue,
2364
+ ) {
2365
+ if (styleValue.isExpression()) {
2366
+ layer.setProperties(PropertyFactory.heatmapRadius(styleValue.getExpression()))
2367
+ } else {
2368
+ layer.setProperties(PropertyFactory.heatmapRadius(styleValue.getFloat(VALUE_KEY)))
2369
+ }
2370
+ }
2371
+
2372
+ fun setHeatmapRadiusTransition(
2373
+ layer: HeatmapLayer,
2374
+ styleValue: MLRNStyleValue,
2375
+ ) {
2376
+ val transition = styleValue.transition
2377
+ if (transition != null) {
2378
+ layer.heatmapRadiusTransition = transition
2379
+ }
2380
+ }
2381
+
2382
+ fun setHeatmapWeight(
2383
+ layer: HeatmapLayer,
2384
+ styleValue: MLRNStyleValue,
2385
+ ) {
2386
+ if (styleValue.isExpression()) {
2387
+ layer.setProperties(PropertyFactory.heatmapWeight(styleValue.getExpression()))
2388
+ } else {
2389
+ layer.setProperties(PropertyFactory.heatmapWeight(styleValue.getFloat(VALUE_KEY)))
2390
+ }
2391
+ }
2392
+
2393
+ fun setHeatmapIntensity(
2394
+ layer: HeatmapLayer,
2395
+ styleValue: MLRNStyleValue,
2396
+ ) {
2397
+ if (styleValue.isExpression()) {
2398
+ layer.setProperties(PropertyFactory.heatmapIntensity(styleValue.getExpression()))
2399
+ } else {
2400
+ layer.setProperties(PropertyFactory.heatmapIntensity(styleValue.getFloat(VALUE_KEY)))
2401
+ }
2402
+ }
2403
+
2404
+ fun setHeatmapIntensityTransition(
2405
+ layer: HeatmapLayer,
2406
+ styleValue: MLRNStyleValue,
2407
+ ) {
2408
+ val transition = styleValue.transition
2409
+ if (transition != null) {
2410
+ layer.heatmapIntensityTransition = transition
2411
+ }
2412
+ }
2413
+
2414
+ fun setHeatmapColor(
2415
+ layer: HeatmapLayer,
2416
+ styleValue: MLRNStyleValue,
2417
+ ) {
2418
+ if (styleValue.isExpression()) {
2419
+ layer.setProperties(PropertyFactory.heatmapColor(styleValue.getExpression()))
2420
+ } else {
2421
+ layer.setProperties(PropertyFactory.heatmapColor(styleValue.getInt(VALUE_KEY)))
2422
+ }
2423
+ }
2424
+
2425
+ fun setHeatmapOpacity(
2426
+ layer: HeatmapLayer,
2427
+ styleValue: MLRNStyleValue,
2428
+ ) {
2429
+ if (styleValue.isExpression()) {
2430
+ layer.setProperties(PropertyFactory.heatmapOpacity(styleValue.getExpression()))
2431
+ } else {
2432
+ layer.setProperties(PropertyFactory.heatmapOpacity(styleValue.getFloat(VALUE_KEY)))
2433
+ }
2434
+ }
2435
+
2436
+ fun setHeatmapOpacityTransition(
2437
+ layer: HeatmapLayer,
2438
+ styleValue: MLRNStyleValue,
2439
+ ) {
2440
+ val transition = styleValue.transition
2441
+ if (transition != null) {
2442
+ layer.heatmapOpacityTransition = transition
2443
+ }
2444
+ }
2445
+
2446
+ fun setVisibility(
2447
+ layer: FillExtrusionLayer,
2448
+ styleValue: MLRNStyleValue,
2449
+ ) {
2450
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
2451
+ }
2452
+
2453
+ fun setFillExtrusionOpacity(
2454
+ layer: FillExtrusionLayer,
2455
+ styleValue: MLRNStyleValue,
2456
+ ) {
2457
+ if (styleValue.isExpression()) {
2458
+ layer.setProperties(PropertyFactory.fillExtrusionOpacity(styleValue.getExpression()))
2459
+ } else {
2460
+ layer.setProperties(PropertyFactory.fillExtrusionOpacity(styleValue.getFloat(VALUE_KEY)))
2461
+ }
2462
+ }
2463
+
2464
+ fun setFillExtrusionOpacityTransition(
2465
+ layer: FillExtrusionLayer,
2466
+ styleValue: MLRNStyleValue,
2467
+ ) {
2468
+ val transition = styleValue.transition
2469
+ if (transition != null) {
2470
+ layer.fillExtrusionOpacityTransition = transition
2471
+ }
2472
+ }
2473
+
2474
+ fun setFillExtrusionColor(
2475
+ layer: FillExtrusionLayer,
2476
+ styleValue: MLRNStyleValue,
2477
+ ) {
2478
+ if (styleValue.isExpression()) {
2479
+ layer.setProperties(PropertyFactory.fillExtrusionColor(styleValue.getExpression()))
2480
+ } else {
2481
+ layer.setProperties(PropertyFactory.fillExtrusionColor(styleValue.getInt(VALUE_KEY)))
2482
+ }
2483
+ }
2484
+
2485
+ fun setFillExtrusionColorTransition(
2486
+ layer: FillExtrusionLayer,
2487
+ styleValue: MLRNStyleValue,
2488
+ ) {
2489
+ val transition = styleValue.transition
2490
+ if (transition != null) {
2491
+ layer.fillExtrusionColorTransition = transition
2492
+ }
2493
+ }
2494
+
2495
+ fun setFillExtrusionTranslate(
2496
+ layer: FillExtrusionLayer,
2497
+ styleValue: MLRNStyleValue,
2498
+ ) {
2499
+ if (styleValue.isExpression()) {
2500
+ layer.setProperties(PropertyFactory.fillExtrusionTranslate(styleValue.getExpression()))
2501
+ } else {
2502
+ layer.setProperties(PropertyFactory.fillExtrusionTranslate(styleValue.getFloatArray(VALUE_KEY)))
2503
+ }
2504
+ }
2505
+
2506
+ fun setFillExtrusionTranslateTransition(
2507
+ layer: FillExtrusionLayer,
2508
+ styleValue: MLRNStyleValue,
2509
+ ) {
2510
+ val transition = styleValue.transition
2511
+ if (transition != null) {
2512
+ layer.fillExtrusionTranslateTransition = transition
2513
+ }
2514
+ }
2515
+
2516
+ fun setFillExtrusionTranslateAnchor(
2517
+ layer: FillExtrusionLayer,
2518
+ styleValue: MLRNStyleValue,
2519
+ ) {
2520
+ if (styleValue.isExpression()) {
2521
+ layer.setProperties(PropertyFactory.fillExtrusionTranslateAnchor(styleValue.getExpression()))
2522
+ } else {
2523
+ layer.setProperties(PropertyFactory.fillExtrusionTranslateAnchor(styleValue.getString(VALUE_KEY)))
2524
+ }
2525
+ }
2526
+
2527
+ fun setFillExtrusionPattern(
2528
+ layer: FillExtrusionLayer,
2529
+ styleValue: MLRNStyleValue,
2530
+ ) {
2531
+ if (styleValue.isExpression()) {
2532
+ if (styleValue.isImageStringValue) {
2533
+ layer.setProperties(PropertyFactory.fillExtrusionPattern(styleValue.getImageStringValue()))
2534
+ } else {
2535
+ layer.setProperties(PropertyFactory.fillExtrusionPattern(styleValue.getExpression()))
2536
+ }
2537
+ } else {
2538
+ layer.setProperties(PropertyFactory.fillExtrusionPattern(styleValue.imageURI))
2539
+ }
2540
+ }
2541
+
2542
+ fun setFillExtrusionPatternTransition(
2543
+ layer: FillExtrusionLayer,
2544
+ styleValue: MLRNStyleValue,
2545
+ ) {
2546
+ val transition = styleValue.transition
2547
+ if (transition != null) {
2548
+ layer.fillExtrusionPatternTransition = transition
2549
+ }
2550
+ }
2551
+
2552
+ fun setFillExtrusionHeight(
2553
+ layer: FillExtrusionLayer,
2554
+ styleValue: MLRNStyleValue,
2555
+ ) {
2556
+ if (styleValue.isExpression()) {
2557
+ layer.setProperties(PropertyFactory.fillExtrusionHeight(styleValue.getExpression()))
2558
+ } else {
2559
+ layer.setProperties(PropertyFactory.fillExtrusionHeight(styleValue.getFloat(VALUE_KEY)))
2560
+ }
2561
+ }
2562
+
2563
+ fun setFillExtrusionHeightTransition(
2564
+ layer: FillExtrusionLayer,
2565
+ styleValue: MLRNStyleValue,
2566
+ ) {
2567
+ val transition = styleValue.transition
2568
+ if (transition != null) {
2569
+ layer.fillExtrusionHeightTransition = transition
2570
+ }
2571
+ }
2572
+
2573
+ fun setFillExtrusionBase(
2574
+ layer: FillExtrusionLayer,
2575
+ styleValue: MLRNStyleValue,
2576
+ ) {
2577
+ if (styleValue.isExpression()) {
2578
+ layer.setProperties(PropertyFactory.fillExtrusionBase(styleValue.getExpression()))
2579
+ } else {
2580
+ layer.setProperties(PropertyFactory.fillExtrusionBase(styleValue.getFloat(VALUE_KEY)))
2581
+ }
2582
+ }
2583
+
2584
+ fun setFillExtrusionBaseTransition(
2585
+ layer: FillExtrusionLayer,
2586
+ styleValue: MLRNStyleValue,
2587
+ ) {
2588
+ val transition = styleValue.transition
2589
+ if (transition != null) {
2590
+ layer.fillExtrusionBaseTransition = transition
2591
+ }
2592
+ }
2593
+
2594
+ fun setFillExtrusionVerticalGradient(
2595
+ layer: FillExtrusionLayer,
2596
+ styleValue: MLRNStyleValue,
2597
+ ) {
2598
+ if (styleValue.isExpression()) {
2599
+ layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getExpression()))
2600
+ } else {
2601
+ layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getBoolean(VALUE_KEY)))
2602
+ }
2603
+ }
2604
+
2605
+ fun setVisibility(
2606
+ layer: RasterLayer,
2607
+ styleValue: MLRNStyleValue,
2608
+ ) {
2609
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
2610
+ }
2611
+
2612
+ fun setRasterOpacity(
2613
+ layer: RasterLayer,
2614
+ styleValue: MLRNStyleValue,
2615
+ ) {
2616
+ if (styleValue.isExpression()) {
2617
+ layer.setProperties(PropertyFactory.rasterOpacity(styleValue.getExpression()))
2618
+ } else {
2619
+ layer.setProperties(PropertyFactory.rasterOpacity(styleValue.getFloat(VALUE_KEY)))
2620
+ }
2621
+ }
2622
+
2623
+ fun setRasterOpacityTransition(
2624
+ layer: RasterLayer,
2625
+ styleValue: MLRNStyleValue,
2626
+ ) {
2627
+ val transition = styleValue.transition
2628
+ if (transition != null) {
2629
+ layer.rasterOpacityTransition = transition
2630
+ }
2631
+ }
2632
+
2633
+ fun setRasterHueRotate(
2634
+ layer: RasterLayer,
2635
+ styleValue: MLRNStyleValue,
2636
+ ) {
2637
+ if (styleValue.isExpression()) {
2638
+ layer.setProperties(PropertyFactory.rasterHueRotate(styleValue.getExpression()))
2639
+ } else {
2640
+ layer.setProperties(PropertyFactory.rasterHueRotate(styleValue.getFloat(VALUE_KEY)))
2641
+ }
2642
+ }
2643
+
2644
+ fun setRasterHueRotateTransition(
2645
+ layer: RasterLayer,
2646
+ styleValue: MLRNStyleValue,
2647
+ ) {
2648
+ val transition = styleValue.transition
2649
+ if (transition != null) {
2650
+ layer.rasterHueRotateTransition = transition
2651
+ }
2652
+ }
2653
+
2654
+ fun setRasterBrightnessMin(
2655
+ layer: RasterLayer,
2656
+ styleValue: MLRNStyleValue,
2657
+ ) {
2658
+ if (styleValue.isExpression()) {
2659
+ layer.setProperties(PropertyFactory.rasterBrightnessMin(styleValue.getExpression()))
2660
+ } else {
2661
+ layer.setProperties(PropertyFactory.rasterBrightnessMin(styleValue.getFloat(VALUE_KEY)))
2662
+ }
2663
+ }
2664
+
2665
+ fun setRasterBrightnessMinTransition(
2666
+ layer: RasterLayer,
2667
+ styleValue: MLRNStyleValue,
2668
+ ) {
2669
+ val transition = styleValue.transition
2670
+ if (transition != null) {
2671
+ layer.rasterBrightnessMinTransition = transition
2672
+ }
2673
+ }
2674
+
2675
+ fun setRasterBrightnessMax(
2676
+ layer: RasterLayer,
2677
+ styleValue: MLRNStyleValue,
2678
+ ) {
2679
+ if (styleValue.isExpression()) {
2680
+ layer.setProperties(PropertyFactory.rasterBrightnessMax(styleValue.getExpression()))
2681
+ } else {
2682
+ layer.setProperties(PropertyFactory.rasterBrightnessMax(styleValue.getFloat(VALUE_KEY)))
2683
+ }
2684
+ }
2685
+
2686
+ fun setRasterBrightnessMaxTransition(
2687
+ layer: RasterLayer,
2688
+ styleValue: MLRNStyleValue,
2689
+ ) {
2690
+ val transition = styleValue.transition
2691
+ if (transition != null) {
2692
+ layer.rasterBrightnessMaxTransition = transition
2693
+ }
2694
+ }
2695
+
2696
+ fun setRasterSaturation(
2697
+ layer: RasterLayer,
2698
+ styleValue: MLRNStyleValue,
2699
+ ) {
2700
+ if (styleValue.isExpression()) {
2701
+ layer.setProperties(PropertyFactory.rasterSaturation(styleValue.getExpression()))
2702
+ } else {
2703
+ layer.setProperties(PropertyFactory.rasterSaturation(styleValue.getFloat(VALUE_KEY)))
2704
+ }
2705
+ }
2706
+
2707
+ fun setRasterSaturationTransition(
2708
+ layer: RasterLayer,
2709
+ styleValue: MLRNStyleValue,
2710
+ ) {
2711
+ val transition = styleValue.transition
2712
+ if (transition != null) {
2713
+ layer.rasterSaturationTransition = transition
2714
+ }
2715
+ }
2716
+
2717
+ fun setRasterContrast(
2718
+ layer: RasterLayer,
2719
+ styleValue: MLRNStyleValue,
2720
+ ) {
2721
+ if (styleValue.isExpression()) {
2722
+ layer.setProperties(PropertyFactory.rasterContrast(styleValue.getExpression()))
2723
+ } else {
2724
+ layer.setProperties(PropertyFactory.rasterContrast(styleValue.getFloat(VALUE_KEY)))
2725
+ }
2726
+ }
2727
+
2728
+ fun setRasterContrastTransition(
2729
+ layer: RasterLayer,
2730
+ styleValue: MLRNStyleValue,
2731
+ ) {
2732
+ val transition = styleValue.transition
2733
+ if (transition != null) {
2734
+ layer.rasterContrastTransition = transition
2735
+ }
2736
+ }
2737
+
2738
+ fun setRasterResampling(
2739
+ layer: RasterLayer,
2740
+ styleValue: MLRNStyleValue,
2741
+ ) {
2742
+ if (styleValue.isExpression()) {
2743
+ layer.setProperties(PropertyFactory.rasterResampling(styleValue.getExpression()))
2744
+ } else {
2745
+ layer.setProperties(PropertyFactory.rasterResampling(styleValue.getString(VALUE_KEY)))
2746
+ }
2747
+ }
2748
+
2749
+ fun setRasterFadeDuration(
2750
+ layer: RasterLayer,
2751
+ styleValue: MLRNStyleValue,
2752
+ ) {
2753
+ if (styleValue.isExpression()) {
2754
+ layer.setProperties(PropertyFactory.rasterFadeDuration(styleValue.getExpression()))
2755
+ } else {
2756
+ layer.setProperties(PropertyFactory.rasterFadeDuration(styleValue.getFloat(VALUE_KEY)))
2757
+ }
2758
+ }
2759
+
2760
+ fun setVisibility(
2761
+ layer: HillshadeLayer,
2762
+ styleValue: MLRNStyleValue,
2763
+ ) {
2764
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
2765
+ }
2766
+
2767
+ fun setHillshadeIlluminationDirection(
2768
+ layer: HillshadeLayer,
2769
+ styleValue: MLRNStyleValue,
2770
+ ) {
2771
+ if (styleValue.isExpression()) {
2772
+ layer.setProperties(PropertyFactory.hillshadeIlluminationDirection(styleValue.getExpression()))
2773
+ } else {
2774
+ layer.setProperties(PropertyFactory.hillshadeIlluminationDirection(styleValue.getFloatArray(VALUE_KEY)))
2775
+ }
2776
+ }
2777
+
2778
+ fun setHillshadeIlluminationAnchor(
2779
+ layer: HillshadeLayer,
2780
+ styleValue: MLRNStyleValue,
2781
+ ) {
2782
+ if (styleValue.isExpression()) {
2783
+ layer.setProperties(PropertyFactory.hillshadeIlluminationAnchor(styleValue.getExpression()))
2784
+ } else {
2785
+ layer.setProperties(PropertyFactory.hillshadeIlluminationAnchor(styleValue.getString(VALUE_KEY)))
2786
+ }
2787
+ }
2788
+
2789
+ fun setHillshadeExaggeration(
2790
+ layer: HillshadeLayer,
2791
+ styleValue: MLRNStyleValue,
2792
+ ) {
2793
+ if (styleValue.isExpression()) {
2794
+ layer.setProperties(PropertyFactory.hillshadeExaggeration(styleValue.getExpression()))
2795
+ } else {
2796
+ layer.setProperties(PropertyFactory.hillshadeExaggeration(styleValue.getFloat(VALUE_KEY)))
2797
+ }
2798
+ }
2799
+
2800
+ fun setHillshadeExaggerationTransition(
2801
+ layer: HillshadeLayer,
2802
+ styleValue: MLRNStyleValue,
2803
+ ) {
2804
+ val transition = styleValue.transition
2805
+ if (transition != null) {
2806
+ layer.hillshadeExaggerationTransition = transition
2807
+ }
2808
+ }
2809
+
2810
+ fun setHillshadeShadowColor(
2811
+ layer: HillshadeLayer,
2812
+ styleValue: MLRNStyleValue,
2813
+ ) {
2814
+ if (styleValue.isExpression()) {
2815
+ layer.setProperties(PropertyFactory.hillshadeShadowColor(styleValue.getExpression()))
2816
+ } else {
2817
+ layer.setProperties(PropertyFactory.hillshadeShadowColor(styleValue.getStringArray(VALUE_KEY)))
2818
+ }
2819
+ }
2820
+
2821
+ fun setHillshadeShadowColorTransition(
2822
+ layer: HillshadeLayer,
2823
+ styleValue: MLRNStyleValue,
2824
+ ) {
2825
+ val transition = styleValue.transition
2826
+ if (transition != null) {
2827
+ layer.hillshadeShadowColorTransition = transition
2828
+ }
2829
+ }
2830
+
2831
+ fun setHillshadeHighlightColor(
2832
+ layer: HillshadeLayer,
2833
+ styleValue: MLRNStyleValue,
2834
+ ) {
2835
+ if (styleValue.isExpression()) {
2836
+ layer.setProperties(PropertyFactory.hillshadeHighlightColor(styleValue.getExpression()))
2837
+ } else {
2838
+ layer.setProperties(PropertyFactory.hillshadeHighlightColor(styleValue.getStringArray(VALUE_KEY)))
2839
+ }
2840
+ }
2841
+
2842
+ fun setHillshadeHighlightColorTransition(
2843
+ layer: HillshadeLayer,
2844
+ styleValue: MLRNStyleValue,
2845
+ ) {
2846
+ val transition = styleValue.transition
2847
+ if (transition != null) {
2848
+ layer.hillshadeHighlightColorTransition = transition
2849
+ }
2850
+ }
2851
+
2852
+ fun setHillshadeAccentColor(
2853
+ layer: HillshadeLayer,
2854
+ styleValue: MLRNStyleValue,
2855
+ ) {
2856
+ if (styleValue.isExpression()) {
2857
+ layer.setProperties(PropertyFactory.hillshadeAccentColor(styleValue.getExpression()))
2858
+ } else {
2859
+ layer.setProperties(PropertyFactory.hillshadeAccentColor(styleValue.getInt(VALUE_KEY)))
2860
+ }
2861
+ }
2862
+
2863
+ fun setHillshadeAccentColorTransition(
2864
+ layer: HillshadeLayer,
2865
+ styleValue: MLRNStyleValue,
2866
+ ) {
2867
+ val transition = styleValue.transition
2868
+ if (transition != null) {
2869
+ layer.hillshadeAccentColorTransition = transition
2870
+ }
2871
+ }
2872
+
2873
+ fun setVisibility(
2874
+ layer: BackgroundLayer,
2875
+ styleValue: MLRNStyleValue,
2876
+ ) {
2877
+ layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)))
2878
+ }
2879
+
2880
+ fun setBackgroundColor(
2881
+ layer: BackgroundLayer,
2882
+ styleValue: MLRNStyleValue,
2883
+ ) {
2884
+ if (styleValue.isExpression()) {
2885
+ layer.setProperties(PropertyFactory.backgroundColor(styleValue.getExpression()))
2886
+ } else {
2887
+ layer.setProperties(PropertyFactory.backgroundColor(styleValue.getInt(VALUE_KEY)))
2888
+ }
2889
+ }
2890
+
2891
+ fun setBackgroundColorTransition(
2892
+ layer: BackgroundLayer,
2893
+ styleValue: MLRNStyleValue,
2894
+ ) {
2895
+ val transition = styleValue.transition
2896
+ if (transition != null) {
2897
+ layer.backgroundColorTransition = transition
2898
+ }
2899
+ }
2900
+
2901
+ fun setBackgroundPattern(
2902
+ layer: BackgroundLayer,
2903
+ styleValue: MLRNStyleValue,
2904
+ ) {
2905
+ if (styleValue.isExpression()) {
2906
+ if (styleValue.isImageStringValue) {
2907
+ layer.setProperties(PropertyFactory.backgroundPattern(styleValue.getImageStringValue()))
2908
+ } else {
2909
+ layer.setProperties(PropertyFactory.backgroundPattern(styleValue.getExpression()))
2910
+ }
2911
+ } else {
2912
+ layer.setProperties(PropertyFactory.backgroundPattern(styleValue.imageURI))
2913
+ }
2914
+ }
2915
+
2916
+ fun setBackgroundPatternTransition(
2917
+ layer: BackgroundLayer,
2918
+ styleValue: MLRNStyleValue,
2919
+ ) {
2920
+ val transition = styleValue.transition
2921
+ if (transition != null) {
2922
+ layer.backgroundPatternTransition = transition
2923
+ }
2924
+ }
2925
+
2926
+ fun setBackgroundOpacity(
2927
+ layer: BackgroundLayer,
2928
+ styleValue: MLRNStyleValue,
2929
+ ) {
2930
+ if (styleValue.isExpression()) {
2931
+ layer.setProperties(PropertyFactory.backgroundOpacity(styleValue.getExpression()))
2932
+ } else {
2933
+ layer.setProperties(PropertyFactory.backgroundOpacity(styleValue.getFloat(VALUE_KEY)))
2934
+ }
2935
+ }
2936
+
2937
+ fun setBackgroundOpacityTransition(
2938
+ layer: BackgroundLayer,
2939
+ styleValue: MLRNStyleValue,
2940
+ ) {
2941
+ val transition = styleValue.transition
2942
+ if (transition != null) {
2943
+ layer.backgroundOpacityTransition = transition
2944
+ }
2945
+ }
2946
+
2947
+ fun setAnchor(
2948
+ layer: Light,
2949
+ styleValue: MLRNStyleValue,
2950
+ ) {
2951
+ layer.anchor = styleValue.getString(VALUE_KEY)
2952
+ }
2953
+
2954
+ fun setPosition(
2955
+ layer: Light,
2956
+ styleValue: MLRNStyleValue,
2957
+ ) {
2958
+ val values = styleValue.getFloatArray(VALUE_KEY)
2959
+ layer.position = Position.fromPosition(values[0]!!, values[1]!!, values[2]!!)
2960
+ }
2961
+
2962
+ fun setPositionTransition(
2963
+ layer: Light,
2964
+ styleValue: MLRNStyleValue,
2965
+ ) {
2966
+ val transition = styleValue.transition
2967
+ if (transition != null) {
2968
+ layer.positionTransition = transition
2969
+ }
2970
+ }
2971
+
2972
+ fun setColor(
2973
+ layer: Light,
2974
+ styleValue: MLRNStyleValue,
2975
+ ) {
2976
+ layer.setColor(styleValue.getInt(VALUE_KEY))
2977
+ }
2978
+
2979
+ fun setColorTransition(
2980
+ layer: Light,
2981
+ styleValue: MLRNStyleValue,
2982
+ ) {
2983
+ val transition = styleValue.transition
2984
+ if (transition != null) {
2985
+ layer.colorTransition = transition
2986
+ }
2987
+ }
2988
+
2989
+ fun setIntensity(
2990
+ layer: Light,
2991
+ styleValue: MLRNStyleValue,
2992
+ ) {
2993
+ layer.intensity = styleValue.getFloat(VALUE_KEY)
2994
+ }
2995
+
2996
+ fun setIntensityTransition(
2997
+ layer: Light,
2998
+ styleValue: MLRNStyleValue,
2999
+ ) {
3000
+ val transition = styleValue.transition
3001
+ if (transition != null) {
3002
+ layer.intensityTransition = transition
3003
+ }
3004
+ }
3005
+ }