@maydon_tech/react-native-nitro-maps 0.1.2 → 0.1.4

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.
@@ -19,12 +19,12 @@ enum ClusterIconRenderer {
19
19
  ) -> UIImage {
20
20
  let diameter = size ?? clusterDiameter(for: count)
21
21
 
22
- let bgColor = resolveColor(config?.backgroundColor.toMarkerColor(),
22
+ let bgColor = resolveColor(config?.backgroundColor?.toMarkerColor(),
23
23
  fallback: MarkerColor(r: 0, g: 122, b: 255, a: 255))
24
- let textColor = resolveColor(config?.textColor.toMarkerColor(),
24
+ let textColor = resolveColor(config?.textColor?.toMarkerColor(),
25
25
  fallback: MarkerColor(r: 255, g: 255, b: 255, a: 255))
26
26
  let borderWidth = CGFloat(config?.borderWidth ?? 2)
27
- let borderUIColor = resolveColor(config?.borderColor.toMarkerColor(),
27
+ let borderUIColor = resolveColor(config?.borderColor?.toMarkerColor(),
28
28
  fallback: MarkerColor(r: 255, g: 255, b: 255, a: 255))
29
29
 
30
30
  let renderer = UIGraphicsImageRenderer(
@@ -278,9 +278,9 @@ class MarkerIconFactory {
278
278
  let width = CGFloat(config.width)
279
279
  let height = CGFloat(config.height)
280
280
  let cornerRadius = CGFloat(config.cornerRadius)
281
- let borderWidth = CGFloat(config.borderWidth)
281
+ let borderWidth = CGFloat(config.borderWidth ?? 0)
282
282
 
283
- let borderColorValue = config.borderColor.toMarkerColor()
283
+ let borderColorValue = (config.borderColor ?? .second(MarkerColor(r: 200, g: 200, b: 200, a: 255))).toMarkerColor()
284
284
  let borderColor = UIColor(
285
285
  red: CGFloat(borderColorValue.r) / 255,
286
286
  green: CGFloat(borderColorValue.g) / 255,
@@ -93,7 +93,7 @@ class GoogleMapProvider: MapProviderProtocol {
93
93
  didSet {
94
94
  #if DEBUG
95
95
  NSLog("[Clustering] didSet clusterConfig strategy=%@",
96
- clusterConfig?.strategy.stringValue ?? "nil")
96
+ clusterConfig?.strategy?.stringValue ?? "nil")
97
97
  #endif
98
98
  updateClusterConfig()
99
99
  }
@@ -68,9 +68,9 @@ final class ClusteringManager: ClusteringManagerProtocol {
68
68
  didSet {
69
69
  iconGenerator.updateConfig(clusterConfig)
70
70
  if let config = clusterConfig {
71
- engine.setClusterRadius(config.radius)
72
- engine.setMinClusterSize(Int(config.minimumClusterSize))
73
- engine.setMaxZoom(config.maxZoom)
71
+ engine.setClusterRadius(config.radius ?? 80)
72
+ engine.setMinClusterSize(Int(config.minimumClusterSize ?? 2))
73
+ engine.setMaxZoom(config.maxZoom ?? 20)
74
74
  }
75
75
  }
76
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maydon_tech/react-native-nitro-maps",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "A high-performance React Native map library powered by Nitro Modules with support for Apple Maps, Google Maps, and Yandex Maps. Features native clustering, custom markers, and seamless cross-platform integration.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",