react-native-maps 1.21.0-alpha.99 → 1.22.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 (234) hide show
  1. package/README.md +9 -4
  2. package/android/build.gradle +65 -72
  3. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  4. package/android/src/main/RCTAppDependencyProvider.h +25 -0
  5. package/android/src/main/RCTAppDependencyProvider.mm +55 -0
  6. package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
  7. package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
  8. package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
  9. package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
  10. package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
  11. package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
  14. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
  15. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
  16. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  17. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
  18. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +209 -0
  19. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
  20. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  21. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
  22. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +45 -0
  23. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +22 -0
  24. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  25. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
  26. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerDelegate.java +62 -0
  27. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +27 -0
  28. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerDelegate.java +56 -0
  29. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +25 -0
  30. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +5 -1
  31. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +1 -1
  32. package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +9 -3
  33. package/android/src/main/java/com/rnmaps/fabric/UrlTileManager.java +124 -0
  34. package/android/src/main/java/com/rnmaps/fabric/WMSTileManager.java +114 -0
  35. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +19 -3
  36. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +608 -603
  37. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
  38. package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +2 -22
  39. package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +23 -1
  40. package/android/src/main/java/com/rnmaps/maps/MapUrlTile.java +18 -18
  41. package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +10 -14
  42. package/android/src/main/java/com/rnmaps/maps/MapView.java +58 -49
  43. package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +3 -3
  44. package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +10 -10
  45. package/android/src/main/jni/CMakeLists.txt +36 -0
  46. package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
  47. package/android/src/main/jni/RNMapsSpecs.h +31 -0
  48. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +31 -0
  49. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +33 -0
  50. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +979 -0
  51. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +860 -0
  52. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +227 -0
  53. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1297 -0
  54. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  55. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  56. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +26 -0
  57. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +131 -0
  58. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  59. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +137 -0
  60. package/app.plugin.js +1 -0
  61. package/ios/AirGoogleMaps/AIRGoogleMap.h +13 -13
  62. package/ios/AirGoogleMaps/{AIRGoogleMap.m → AIRGoogleMap.mm} +32 -34
  63. package/ios/AirGoogleMaps/AIRGoogleMapManager.h +1 -0
  64. package/ios/AirGoogleMaps/AIRGoogleMapManager.mm +543 -0
  65. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +3 -3
  66. package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
  67. package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
  68. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
  69. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +5 -2
  70. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +41 -33
  71. package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
  72. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +23 -14
  73. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +1 -0
  74. package/ios/AirMaps/AIRMap.h +8 -9
  75. package/ios/AirMaps/{AIRMap.m → AIRMap.mm} +18 -14
  76. package/ios/AirMaps/AIRMapManager.m +8 -19
  77. package/ios/AirMaps/AIRMapMarker.m +57 -44
  78. package/ios/AirMaps/AIRMapOverlay.m +2 -2
  79. package/ios/AirMaps/AIRMapWMSTile.m +8 -8
  80. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +25 -0
  81. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +77 -0
  82. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
  83. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +51 -0
  84. package/ios/AirMaps/RNMapsAirModule.h +2 -3
  85. package/ios/AirMaps/RNMapsAirModule.mm +14 -0
  86. package/ios/AirMaps/RNMapsDefines.h +1 -0
  87. package/ios/AirMaps/RNMapsMapView.h +5 -2
  88. package/ios/AirMaps/RNMapsMapView.mm +16 -6
  89. package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
  90. package/ios/AirMaps/RNMapsMarkerView.mm +12 -4
  91. package/ios/AirMaps/RNMapsMarkerViewManager.mm +7 -0
  92. package/ios/AirMaps/module.modulemap +6 -0
  93. package/ios/AirMaps.xcodeproj/project.pbxproj +15 -55
  94. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  95. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  96. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  97. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  98. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  99. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  100. package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +1 -1
  101. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  102. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
  103. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
  104. package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
  105. package/ios/generated/RNMapsSpecs/Props.cpp +194 -0
  106. package/ios/generated/RNMapsSpecs/Props.h +1224 -0
  107. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
  108. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  109. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  110. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
  111. package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
  112. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  113. package/ios/generated/RNMapsSpecs/States.h +113 -0
  114. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  115. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  116. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  117. package/ios/generated/module.modulemap +15 -0
  118. package/package.json +34 -27
  119. package/plugin/build/android.js +58 -0
  120. package/plugin/build/index.js +10 -0
  121. package/plugin/build/ios.js +172 -0
  122. package/react-native-google-maps.podspec +27 -0
  123. package/react-native-maps-generated.podspec +31 -0
  124. package/react-native-maps.podspec +52 -46
  125. package/react-native.config.js +16 -0
  126. package/src/AnimatedRegion.ts +169 -0
  127. package/src/Geojson.tsx +541 -0
  128. package/src/MapCallout.tsx +77 -0
  129. package/src/MapCalloutSubview.tsx +64 -0
  130. package/src/MapCircle.tsx +162 -0
  131. package/src/MapHeatmap.tsx +125 -0
  132. package/src/MapLocalTile.tsx +60 -0
  133. package/src/MapMarker.tsx +531 -0
  134. package/src/MapMarkerNativeComponent.ts +51 -0
  135. package/src/MapOverlay.tsx +178 -0
  136. package/src/MapPolygon.tsx +188 -0
  137. package/src/MapPolygon.types.ts +25 -0
  138. package/src/MapPolyline.tsx +215 -0
  139. package/src/MapUrlTile.tsx +169 -0
  140. package/src/MapView.tsx +1230 -0
  141. package/src/MapView.types.ts +212 -0
  142. package/src/MapView.web.ts +2 -0
  143. package/src/MapViewNativeComponent.ts +86 -0
  144. package/src/MapWMSTile.tsx +148 -0
  145. package/src/ProviderConstants.ts +2 -0
  146. package/src/createFabricMap.tsx +253 -0
  147. package/src/decorateMapComponent.ts +229 -0
  148. package/src/fixImageProp.ts +17 -0
  149. package/src/index.ts +52 -0
  150. package/src/sharedTypes.ts +101 -0
  151. package/{specs → src/specs}/NativeComponentCircle.ts +3 -4
  152. package/{specs → src/specs}/NativeComponentGoogleMapView.ts +15 -9
  153. package/{specs → src/specs}/NativeComponentMapView.ts +61 -32
  154. package/{specs → src/specs}/NativeComponentOverlay.ts +11 -2
  155. package/{specs → src/specs}/NativeComponentPolyline.ts +1 -1
  156. package/src/specs/NativeComponentUrlTile.ts +128 -0
  157. package/src/specs/NativeComponentWMSTile.ts +107 -0
  158. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -533
  159. package/lib/AnimatedRegion.d.ts +0 -19
  160. package/lib/AnimatedRegion.js +0 -134
  161. package/lib/Geojson.d.ts +0 -204
  162. package/lib/Geojson.js +0 -166
  163. package/lib/MapCallout.d.ts +0 -40
  164. package/lib/MapCallout.js +0 -51
  165. package/lib/MapCalloutSubview.d.ts +0 -34
  166. package/lib/MapCalloutSubview.js +0 -48
  167. package/lib/MapCircle.d.ts +0 -117
  168. package/lib/MapCircle.js +0 -53
  169. package/lib/MapHeatmap.d.ts +0 -78
  170. package/lib/MapHeatmap.js +0 -59
  171. package/lib/MapLocalTile.d.ts +0 -35
  172. package/lib/MapLocalTile.js +0 -44
  173. package/lib/MapMarker.d.ts +0 -322
  174. package/lib/MapMarker.js +0 -158
  175. package/lib/MapMarkerNativeComponent.d.ts +0 -15
  176. package/lib/MapMarkerNativeComponent.js +0 -15
  177. package/lib/MapOverlay.d.ts +0 -88
  178. package/lib/MapOverlay.js +0 -65
  179. package/lib/MapPolygon.d.ts +0 -140
  180. package/lib/MapPolygon.js +0 -53
  181. package/lib/MapPolygon.types.d.ts +0 -18
  182. package/lib/MapPolyline.d.ts +0 -156
  183. package/lib/MapPolyline.js +0 -53
  184. package/lib/MapUrlTile.d.ts +0 -134
  185. package/lib/MapUrlTile.js +0 -44
  186. package/lib/MapView.d.ts +0 -703
  187. package/lib/MapView.js +0 -427
  188. package/lib/MapView.types.d.ts +0 -161
  189. package/lib/MapView.types.js +0 -2
  190. package/lib/MapView.web.d.ts +0 -1
  191. package/lib/MapView.web.js +0 -9
  192. package/lib/MapViewNativeComponent.d.ts +0 -18
  193. package/lib/MapViewNativeComponent.js +0 -19
  194. package/lib/MapWMSTile.d.ts +0 -116
  195. package/lib/MapWMSTile.js +0 -44
  196. package/lib/ProviderConstants.d.ts +0 -2
  197. package/lib/ProviderConstants.js +0 -5
  198. package/lib/createFabricMap.d.ts +0 -24
  199. package/lib/createFabricMap.js +0 -188
  200. package/lib/decorateMapComponent.d.ts +0 -36
  201. package/lib/decorateMapComponent.js +0 -120
  202. package/lib/fixImageProp.d.ts +0 -4
  203. package/lib/fixImageProp.js +0 -16
  204. package/lib/index.d.ts +0 -38
  205. package/lib/index.js +0 -81
  206. package/lib/sharedTypes.d.ts +0 -81
  207. package/lib/sharedTypes.js +0 -2
  208. package/lib/sharedTypesInternal.js +0 -2
  209. package/lib/specs/NativeAirMapsModule.d.ts +0 -31
  210. package/lib/specs/NativeAirMapsModule.js +0 -4
  211. package/lib/specs/NativeComponentCallout.d.ts +0 -46
  212. package/lib/specs/NativeComponentCallout.js +0 -9
  213. package/lib/specs/NativeComponentCircle.d.ts +0 -74
  214. package/lib/specs/NativeComponentCircle.js +0 -7
  215. package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
  216. package/lib/specs/NativeComponentGoogleMapView.js +0 -22
  217. package/lib/specs/NativeComponentGooglePolygon.d.ts +0 -75
  218. package/lib/specs/NativeComponentGooglePolygon.js +0 -7
  219. package/lib/specs/NativeComponentMapView.d.ts +0 -847
  220. package/lib/specs/NativeComponentMapView.js +0 -20
  221. package/lib/specs/NativeComponentMarker.d.ts +0 -258
  222. package/lib/specs/NativeComponentMarker.js +0 -19
  223. package/lib/specs/NativeComponentOverlay.d.ts +0 -67
  224. package/lib/specs/NativeComponentOverlay.js +0 -7
  225. package/lib/specs/NativeComponentPolyline.d.ts +0 -101
  226. package/lib/specs/NativeComponentPolyline.js +0 -7
  227. /package/ios/AirMaps/{UIView +AirMap.m → UIView+AirMap.m} +0 -0
  228. /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
  229. /package/{lib/MapPolygon.types.js → plugin/build/types.js} +0 -0
  230. /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
  231. /package/{specs → src/specs}/NativeAirMapsModule.ts +0 -0
  232. /package/{specs → src/specs}/NativeComponentCallout.ts +0 -0
  233. /package/{specs → src/specs}/NativeComponentGooglePolygon.ts +0 -0
  234. /package/{specs → src/specs}/NativeComponentMarker.ts +0 -0
@@ -330,11 +330,12 @@ public class MapMarkerManager extends ViewGroupManager<MapMarker> {
330
330
  @Nullable
331
331
  public Map getExportedCustomDirectEventTypeConstants() {
332
332
  return MapBuilder.<String, Map<String, String>>builder()
333
- .put("onPress", MapBuilder.of("registrationName", "onPress"))
334
333
  .put("onCalloutPress", MapBuilder.of("registrationName", "onCalloutPress"))
335
334
  .put("onDragStart", MapBuilder.of("registrationName", "onDragStart"))
336
335
  .put("onDrag", MapBuilder.of("registrationName", "onDrag"))
337
336
  .put("onDragEnd", MapBuilder.of("registrationName", "onDragEnd"))
337
+ .put("onSelect", MapBuilder.of("registrationName", "onSelect"))
338
+ .put("onDeselect", MapBuilder.of("registrationName", "onDeselect"))
338
339
  .build();
339
340
  }
340
341
 
@@ -342,8 +343,7 @@ public class MapMarkerManager extends ViewGroupManager<MapMarker> {
342
343
  @Nullable
343
344
  public Map getExportedCustomBubblingEventTypeConstants() {
344
345
  return MapBuilder.<String, Map<String, Object>>builder()
345
- .put("onSelect", MapBuilder.of("phasedRegistrationNames", MapBuilder.of("bubbled", "onSelect")))
346
- .put("onDeselect", MapBuilder.of("phasedRegistrationNames", MapBuilder.of("bubbled", "onDeselect")))
346
+ .put("onPress", MapBuilder.of("phasedRegistrationNames", MapBuilder.of("bubbled", "onPress")))
347
347
  .build();
348
348
  }
349
349
 
@@ -68,29 +68,9 @@ public class MapOverlay extends MapFeature {
68
68
  }
69
69
 
70
70
 
71
- // seems like apple users north west, south east
72
- // google uses north east, south west
73
- private static LatLngBounds fixBoundsIfNecessary(ReadableArray bounds) {
74
- double lat1 = bounds.getArray(0).getDouble(0);
75
- double lon1 = bounds.getArray(0).getDouble(1);
76
- double lat2 = bounds.getArray(1).getDouble(0);
77
- double lon2 = bounds.getArray(1).getDouble(1);
78
-
79
- // Ensure lat1/lon1 is the SW corner and lat2/lon2 is the NE corner
80
- double southLat = Math.min(lat1, lat2);
81
- double northLat = Math.max(lat1, lat2);
82
- double westLon = Math.min(lon1, lon2);
83
- double eastLon = Math.max(lon1, lon2);
84
-
85
- // Create corrected LatLngs
86
- LatLng sw = new LatLng(southLat, westLon);
87
- LatLng ne = new LatLng(northLat, eastLon);
88
- return new LatLngBounds(sw, ne);
89
- }
90
-
91
- public void setBounds(ReadableArray bounds) {
92
71
 
93
- this.bounds = fixBoundsIfNecessary(bounds);
72
+ public void setBounds(LatLngBounds bounds) {
73
+ this.bounds = bounds;
94
74
  if (this.groundOverlay != null) {
95
75
  this.groundOverlay.setPositionFromBounds(this.bounds);
96
76
  }
@@ -12,6 +12,8 @@ import com.facebook.react.common.MapBuilder;
12
12
  import com.facebook.react.uimanager.ThemedReactContext;
13
13
  import com.facebook.react.uimanager.ViewGroupManager;
14
14
  import com.facebook.react.uimanager.annotations.ReactProp;
15
+ import com.google.android.gms.maps.model.LatLng;
16
+ import com.google.android.gms.maps.model.LatLngBounds;
15
17
 
16
18
  import java.util.Map;
17
19
 
@@ -37,7 +39,27 @@ public class MapOverlayManager extends ViewGroupManager<MapOverlay> {
37
39
 
38
40
  @ReactProp(name = "bounds")
39
41
  public void setBounds(MapOverlay view, ReadableArray bounds) {
40
- view.setBounds(bounds);
42
+ view.setBounds(fixBoundsIfNecessary(bounds));
43
+ }
44
+
45
+ // seems like apple users north west, south east
46
+ // google uses north east, south west
47
+ private static LatLngBounds fixBoundsIfNecessary(ReadableArray bounds) {
48
+ double lat1 = bounds.getArray(0).getDouble(0);
49
+ double lon1 = bounds.getArray(0).getDouble(1);
50
+ double lat2 = bounds.getArray(1).getDouble(0);
51
+ double lon2 = bounds.getArray(1).getDouble(1);
52
+
53
+ // Ensure lat1/lon1 is the SW corner and lat2/lon2 is the NE corner
54
+ double southLat = Math.min(lat1, lat2);
55
+ double northLat = Math.max(lat1, lat2);
56
+ double westLon = Math.min(lon1, lon2);
57
+ double eastLon = Math.max(lon1, lon2);
58
+
59
+ // Create corrected LatLngs
60
+ LatLng sw = new LatLng(southLat, westLon);
61
+ LatLng ne = new LatLng(northLat, eastLon);
62
+ return new LatLngBounds(sw, ne);
41
63
  }
42
64
 
43
65
  @ReactProp(name = "bearing")
@@ -18,14 +18,14 @@ public class MapUrlTile extends MapFeature {
18
18
 
19
19
  protected String urlTemplate;
20
20
  protected float zIndex;
21
- protected float maximumZ;
22
- protected float maximumNativeZ = 100;
23
- protected float minimumZ;
21
+ protected int maximumZ;
22
+ protected int maximumNativeZ = 100;
23
+ protected int minimumZ;
24
24
  protected boolean flipY = false;
25
- protected float tileSize = 256;
25
+ protected int tileSize = 256;
26
26
  protected boolean doubleTileSize = false;
27
27
  protected String tileCachePath;
28
- protected float tileCacheMaxAge;
28
+ protected int tileCacheMaxAge;
29
29
  protected boolean offlineMode = false;
30
30
  protected float opacity = 1;
31
31
  protected Context context;
@@ -53,20 +53,20 @@ public class MapUrlTile extends MapFeature {
53
53
  }
54
54
  }
55
55
 
56
- public void setMaximumZ(float maximumZ) {
56
+ public void setMaximumZ(int maximumZ) {
57
57
  this.maximumZ = maximumZ;
58
58
  if (tileProvider != null) {
59
- tileProvider.setMaximumZ((int)maximumZ);
59
+ tileProvider.setMaximumZ(maximumZ);
60
60
  }
61
61
  if (tileOverlay != null) {
62
62
  tileOverlay.clearTileCache();
63
63
  }
64
64
  }
65
65
 
66
- public void setMaximumNativeZ(float maximumNativeZ) {
66
+ public void setMaximumNativeZ(int maximumNativeZ) {
67
67
  this.maximumNativeZ = maximumNativeZ;
68
68
  if (tileProvider != null) {
69
- tileProvider.setMaximumNativeZ((int)maximumNativeZ);
69
+ tileProvider.setMaximumNativeZ(maximumNativeZ);
70
70
  }
71
71
  setCustomTileProviderMode();
72
72
  if (tileOverlay != null) {
@@ -74,10 +74,10 @@ public class MapUrlTile extends MapFeature {
74
74
  }
75
75
  }
76
76
 
77
- public void setMinimumZ(float minimumZ) {
77
+ public void setMinimumZ(int minimumZ) {
78
78
  this.minimumZ = minimumZ;
79
79
  if (tileProvider != null) {
80
- tileProvider.setMinimumZ((int)minimumZ);
80
+ tileProvider.setMinimumZ(minimumZ);
81
81
  }
82
82
  if (tileOverlay != null) {
83
83
  tileOverlay.clearTileCache();
@@ -105,10 +105,10 @@ public class MapUrlTile extends MapFeature {
105
105
  }
106
106
  }
107
107
 
108
- public void setTileSize(float tileSize) {
108
+ public void setTileSize(int tileSize) {
109
109
  this.tileSize = tileSize;
110
110
  if (tileProvider != null) {
111
- tileProvider.setTileSize((int)tileSize);
111
+ tileProvider.setTileSize(tileSize);
112
112
  }
113
113
  if (tileOverlay != null) {
114
114
  tileOverlay.clearTileCache();
@@ -136,10 +136,10 @@ public class MapUrlTile extends MapFeature {
136
136
  }
137
137
  }
138
138
 
139
- public void setTileCacheMaxAge(float tileCacheMaxAge) {
139
+ public void setTileCacheMaxAge(int tileCacheMaxAge) {
140
140
  this.tileCacheMaxAge = tileCacheMaxAge;
141
141
  if (tileProvider != null) {
142
- tileProvider.setTileCacheMaxAge((int)tileCacheMaxAge);
142
+ tileProvider.setTileCacheMaxAge(tileCacheMaxAge);
143
143
  }
144
144
  if (tileOverlay != null) {
145
145
  tileOverlay.clearTileCache();
@@ -176,7 +176,7 @@ public class MapUrlTile extends MapFeature {
176
176
  if (tileProvider != null) {
177
177
  tileProvider.setCustomMode();
178
178
  }
179
- }
179
+ }
180
180
 
181
181
  protected TileOverlayOptions createTileOverlayOptions() {
182
182
  Log.d("urlTile ", "creating TileProvider");
@@ -184,8 +184,8 @@ public class MapUrlTile extends MapFeature {
184
184
  options.zIndex(zIndex);
185
185
  options.transparency(1 - this.opacity);
186
186
  this.tileProvider = new MapTileProvider((int)this.tileSize, this.doubleTileSize, this.urlTemplate,
187
- (int)this.maximumZ, (int)this.maximumNativeZ, (int)this.minimumZ, this.flipY, this.tileCachePath,
188
- (int)this.tileCacheMaxAge, this.offlineMode, this.context, this.customTileProviderNeeded);
187
+ this.maximumZ, this.maximumNativeZ, this.minimumZ, this.flipY, this.tileCachePath,
188
+ this.tileCacheMaxAge, this.offlineMode, this.context, this.customTileProviderNeeded);
189
189
  options.tileProvider(this.tileProvider);
190
190
  return options;
191
191
  }
@@ -13,10 +13,6 @@ public class MapUrlTileManager extends ViewGroupManager<MapUrlTile> {
13
13
 
14
14
  public MapUrlTileManager(ReactApplicationContext reactContext) {
15
15
  super();
16
- DisplayMetrics metrics = new DisplayMetrics();
17
- ((WindowManager) reactContext.getSystemService(Context.WINDOW_SERVICE))
18
- .getDefaultDisplay()
19
- .getRealMetrics(metrics);
20
16
  }
21
17
 
22
18
  @Override
@@ -39,18 +35,18 @@ public class MapUrlTileManager extends ViewGroupManager<MapUrlTile> {
39
35
  view.setZIndex(zIndex);
40
36
  }
41
37
 
42
- @ReactProp(name = "minimumZ", defaultFloat = 0.0f)
43
- public void setMinimumZ(MapUrlTile view, float minimumZ) {
38
+ @ReactProp(name = "minimumZ", defaultInt = 0)
39
+ public void setMinimumZ(MapUrlTile view, int minimumZ) {
44
40
  view.setMinimumZ(minimumZ);
45
41
  }
46
42
 
47
- @ReactProp(name = "maximumZ", defaultFloat = 100.0f)
48
- public void setMaximumZ(MapUrlTile view, float maximumZ) {
43
+ @ReactProp(name = "maximumZ", defaultInt = 100)
44
+ public void setMaximumZ(MapUrlTile view, int maximumZ) {
49
45
  view.setMaximumZ(maximumZ);
50
46
  }
51
47
 
52
- @ReactProp(name = "maximumNativeZ", defaultFloat = 100.0f)
53
- public void setMaximumNativeZ(MapUrlTile view, float maximumNativeZ) {
48
+ @ReactProp(name = "maximumNativeZ", defaultInt = 100)
49
+ public void setMaximumNativeZ(MapUrlTile view, int maximumNativeZ) {
54
50
  view.setMaximumNativeZ(maximumNativeZ);
55
51
  }
56
52
 
@@ -59,8 +55,8 @@ public class MapUrlTileManager extends ViewGroupManager<MapUrlTile> {
59
55
  view.setFlipY(flipY);
60
56
  }
61
57
 
62
- @ReactProp(name = "tileSize", defaultFloat = 256.0f)
63
- public void setTileSize(MapUrlTile view, float tileSize) {
58
+ @ReactProp(name = "tileSize", defaultInt = 256)
59
+ public void setTileSize(MapUrlTile view, int tileSize) {
64
60
  view.setTileSize(tileSize);
65
61
  }
66
62
 
@@ -74,8 +70,8 @@ public class MapUrlTileManager extends ViewGroupManager<MapUrlTile> {
74
70
  view.setTileCachePath(tileCachePath);
75
71
  }
76
72
 
77
- @ReactProp(name = "tileCacheMaxAge", defaultFloat = 0.0f)
78
- public void setTileCacheMaxAge(MapUrlTile view, float tileCacheMaxAge) {
73
+ @ReactProp(name = "tileCacheMaxAge", defaultInt = 0)
74
+ public void setTileCacheMaxAge(MapUrlTile view, int tileCacheMaxAge) {
79
75
  view.setTileCacheMaxAge(tileCacheMaxAge);
80
76
  }
81
77
 
@@ -9,6 +9,7 @@ import android.graphics.Bitmap;
9
9
  import android.graphics.Color;
10
10
  import android.graphics.Point;
11
11
  import android.location.Location;
12
+
12
13
  import androidx.lifecycle.DefaultLifecycleObserver;
13
14
  import androidx.lifecycle.LifecycleOwner;
14
15
 
@@ -194,15 +195,16 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
194
195
  }
195
196
 
196
197
 
197
- @Override
198
- public void onCreate(LifecycleOwner owner) {
199
- super.onCreate(null);
200
- }
198
+ @Override
199
+ public void onCreate(LifecycleOwner owner) {
200
+ super.onCreate(null);
201
+ }
201
202
 
202
203
  @Override
203
204
  public void onStart(LifecycleOwner owner) {
204
205
  super.onStart();
205
206
  }
207
+
206
208
  @Override
207
209
  public void onResume(LifecycleOwner owner) {
208
210
  if (hasPermissions() && map != null) {
@@ -220,7 +222,7 @@ public void onCreate(LifecycleOwner owner) {
220
222
 
221
223
 
222
224
  @Override
223
- public void onPause(LifecycleOwner owner){
225
+ public void onPause(LifecycleOwner owner) {
224
226
  super.onPause();
225
227
  if (hasPermissions() && map != null) {
226
228
  //noinspection MissingPermission
@@ -240,7 +242,7 @@ public void onCreate(LifecycleOwner owner) {
240
242
  }
241
243
 
242
244
  @Override
243
- public void onDestroy(LifecycleOwner owner){
245
+ public void onDestroy(LifecycleOwner owner) {
244
246
  MapView.this.doDestroy();
245
247
  }
246
248
 
@@ -250,7 +252,7 @@ public void onCreate(LifecycleOwner owner) {
250
252
  this.context = context;
251
253
  Activity activity = context.getCurrentActivity();
252
254
  if (activity instanceof LifecycleOwner) {
253
- ((LifecycleOwner) activity).getLifecycle().addObserver(this);
255
+ ((LifecycleOwner) activity).getLifecycle().addObserver(this);
254
256
  }
255
257
  super.getMapAsync(this);
256
258
 
@@ -324,7 +326,7 @@ public void onCreate(LifecycleOwner owner) {
324
326
  }
325
327
  if (addedPosition) {
326
328
 
327
- LatLngBounds bounds = builder.build();
329
+ LatLngBounds bounds = builder.build();
328
330
  LatLng northEast = bounds.northeast;
329
331
  LatLng southWest = bounds.southwest;
330
332
 
@@ -338,7 +340,7 @@ public void onCreate(LifecycleOwner owner) {
338
340
 
339
341
  public void setShowsTraffic(boolean value) {
340
342
  showsTraffic = value;
341
- if (map != null){
343
+ if (map != null) {
342
344
  map.setTrafficEnabled(value);
343
345
  }
344
346
  }
@@ -554,8 +556,8 @@ public void onCreate(LifecycleOwner owner) {
554
556
  event.putString("action", "overlay-press");
555
557
 
556
558
  dispatchEvent(event, OnPressEvent::new);
557
- event = makeClickEventData(groundOverlay.getPosition());
558
- dispatchEvent(event, OnPressEvent::new,overlayMap.get(groundOverlay).getId(), context);
559
+ event = makeClickEventData(groundOverlay.getPosition());
560
+ dispatchEvent(event, OnPressEvent::new, overlayMap.get(groundOverlay).getId(), context);
559
561
  }
560
562
  });
561
563
 
@@ -599,7 +601,7 @@ public void onCreate(LifecycleOwner owner) {
599
601
 
600
602
 
601
603
  isMapReady = true;
602
- if (kmlSrc != null){
604
+ if (kmlSrc != null) {
603
605
  setKmlSrc(kmlSrc);
604
606
  kmlSrc = null;
605
607
  }
@@ -647,32 +649,36 @@ public void onCreate(LifecycleOwner owner) {
647
649
 
648
650
  public static Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
649
651
  MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
650
- builder.put(OnMarkerPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerPressEvent.EVENT_NAME));
651
652
  builder.put(OnPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnPressEvent.EVENT_NAME));
652
- builder.put(OnMarkerSelectEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerSelectEvent.EVENT_NAME));
653
- builder.put(OnMarkerDeselectEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerDeselectEvent.EVENT_NAME));
653
+ builder.put(OnLongPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnLongPressEvent.EVENT_NAME));
654
+ return builder.build();
655
+ }
656
+
657
+ // , ,
658
+ public static Map<String, Object> getExportedCustomDirectEventTypeConstants() {
659
+ MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
660
+ builder.put(OnMarkerPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerPressEvent.EVENT_NAME));
661
+ builder.put(OnCalloutPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnCalloutPressEvent.EVENT_NAME));
654
662
  builder.put(OnMarkerDragEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerDragEvent.EVENT_NAME));
655
663
  builder.put(OnMarkerDragStartEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerDragStartEvent.EVENT_NAME));
656
664
  builder.put(OnMarkerDragEndEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerDragEndEvent.EVENT_NAME));
657
665
  builder.put(OnPoiClickEvent.EVENT_NAME, MapBuilder.of("registrationName", OnPoiClickEvent.EVENT_NAME));
658
- builder.put(OnLongPressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnLongPressEvent.EVENT_NAME));
659
- builder.put(OnRegionChangeStartEvent.EVENT_NAME, MapBuilder.of("registrationName", OnRegionChangeStartEvent.EVENT_NAME));
660
666
  builder.put(OnDoublePressEvent.EVENT_NAME, MapBuilder.of("registrationName", OnDoublePressEvent.EVENT_NAME));
661
667
  builder.put(OnPanDragEvent.EVENT_NAME, MapBuilder.of("registrationName", OnPanDragEvent.EVENT_NAME));
668
+ builder.put(OnMarkerSelectEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerSelectEvent.EVENT_NAME));
669
+ builder.put(OnMarkerDeselectEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMarkerDeselectEvent.EVENT_NAME));
670
+ builder.put(OnMapLoadedEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMapLoadedEvent.EVENT_NAME));
671
+ builder.put(OnMapReadyEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMapReadyEvent.EVENT_NAME));
672
+ builder.put(OnUserLocationChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", OnUserLocationChangeEvent.EVENT_NAME));
673
+ builder.put(OnRegionChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", OnRegionChangeEvent.EVENT_NAME));
674
+ builder.put(OnRegionChangeStartEvent.EVENT_NAME, MapBuilder.of("registrationName", OnRegionChangeStartEvent.EVENT_NAME));
675
+ builder.put(OnRegionChangeCompleteEvent.EVENT_NAME, MapBuilder.of("registrationName", OnRegionChangeCompleteEvent.EVENT_NAME));
676
+ builder.put(OnIndoorBuildingFocusedEvent.EVENT_NAME, MapBuilder.of("registrationName", OnIndoorBuildingFocusedEvent.EVENT_NAME));
677
+ builder.put(OnIndoorLevelActivatedEvent.EVENT_NAME, MapBuilder.of("registrationName", OnIndoorLevelActivatedEvent.EVENT_NAME));
678
+ builder.put(OnKmlReadyEvent.EVENT_NAME, MapBuilder.of("registrationName", OnKmlReadyEvent.EVENT_NAME));
662
679
  return builder.build();
663
680
  }
664
681
 
665
- public static Map<String, Object> getExportedCustomDirectEventTypeConstants() {
666
- return MapBuilder.of(
667
- OnMapReadyEvent.EVENT_NAME, MapBuilder.of("registrationName", OnMapReadyEvent.EVENT_NAME),
668
- OnUserLocationChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", OnUserLocationChangeEvent.EVENT_NAME),
669
- OnRegionChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", OnRegionChangeEvent.EVENT_NAME),
670
- OnIndoorBuildingFocusedEvent.EVENT_NAME, MapBuilder.of("registrationName", OnIndoorBuildingFocusedEvent.EVENT_NAME),
671
- OnIndoorLevelActivatedEvent.EVENT_NAME, MapBuilder.of("registrationName", OnIndoorLevelActivatedEvent.EVENT_NAME),
672
- OnKmlReadyEvent.EVENT_NAME, MapBuilder.of("registrationName", OnKmlReadyEvent.EVENT_NAME)
673
- );
674
- }
675
-
676
682
 
677
683
  /*
678
684
  onDestroy is final method so I can't override it.
@@ -732,6 +738,13 @@ public void onCreate(LifecycleOwner owner) {
732
738
  map.setMapStyle(new MapStyleOptions(customMapStyleString));
733
739
  }
734
740
  this.setPoiClickEnabled(poiClickEnabled);
741
+ if (setPaddingDeferred &&
742
+ (baseLeftMapPadding != 0 ||
743
+ baseTopMapPadding != 0 ||
744
+ baseRightMapPadding != 0 ||
745
+ baseBottomMapPadding != 0)) {
746
+ applyBaseMapPadding(baseLeftMapPadding, baseTopMapPadding, baseRightMapPadding, baseBottomMapPadding);
747
+ }
735
748
  }
736
749
 
737
750
  public static LatLngBounds latLngBoundsFromRegion(ReadableMap region) {
@@ -862,7 +875,7 @@ public void onCreate(LifecycleOwner owner) {
862
875
 
863
876
  public void setShowsUserLocation(boolean showUserLocation) {
864
877
  this.showUserLocation = showUserLocation; // hold onto this for lifecycle handling
865
- if (hasPermissions()) {
878
+ if (hasPermissions() && map != null) {
866
879
  map.setLocationSource(fusedLocationSource);
867
880
  //noinspection MissingPermission
868
881
  map.setMyLocationEnabled(showUserLocation);
@@ -1216,6 +1229,7 @@ public void onCreate(LifecycleOwner owner) {
1216
1229
  cameraToSet = null;
1217
1230
  }
1218
1231
  }
1232
+
1219
1233
  public void animateToCamera(CameraPosition position, int duration) {
1220
1234
  if (map == null) return;
1221
1235
  CameraUpdate update = CameraUpdateFactory.newCameraPosition(position);
@@ -1260,16 +1274,16 @@ public void onCreate(LifecycleOwner owner) {
1260
1274
  LatLngBounds.Builder builder = new LatLngBounds.Builder();
1261
1275
 
1262
1276
  boolean addedPosition = false;
1263
- if (features.size() > 0) {
1264
- for (MapFeature feature : features) {
1265
- if (feature instanceof MapMarker) {
1266
- Marker marker = (Marker) feature.getFeature();
1267
- builder.include(marker.getPosition());
1268
- addedPosition = true;
1269
- }
1270
- // TODO(lmr): may want to include shapes / etc.
1271
- }
1272
- }
1277
+ if (features.size() > 0) {
1278
+ for (MapFeature feature : features) {
1279
+ if (feature instanceof MapMarker) {
1280
+ Marker marker = (Marker) feature.getFeature();
1281
+ builder.include(marker.getPosition());
1282
+ addedPosition = true;
1283
+ }
1284
+ // TODO(lmr): may want to include shapes / etc.
1285
+ }
1286
+ }
1273
1287
  if (addedPosition) {
1274
1288
  LatLngBounds bounds = builder.build();
1275
1289
  CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, 0);
@@ -1376,6 +1390,7 @@ public void onCreate(LifecycleOwner owner) {
1376
1390
 
1377
1391
  // Move the google logo to the default base padding value.
1378
1392
  map.setPadding(left, top, right, bottom);
1393
+ setPaddingDeferred = false;
1379
1394
  }
1380
1395
 
1381
1396
  public void fitToCoordinates(ReadableArray coordinatesArray, ReadableMap edgePadding,
@@ -1725,7 +1740,7 @@ public void onCreate(LifecycleOwner owner) {
1725
1740
  e.printStackTrace();
1726
1741
  }
1727
1742
  } else {
1728
- this.kmlSrc = kmlSrc;
1743
+ this.kmlSrc = kmlSrc;
1729
1744
  }
1730
1745
  }
1731
1746
 
@@ -1744,24 +1759,20 @@ public void onCreate(LifecycleOwner owner) {
1744
1759
  levelsArray.pushMap(levelMap);
1745
1760
  index++;
1746
1761
  }
1747
- WritableMap event = Arguments.createMap();
1748
1762
  WritableMap indoorBuilding = Arguments.createMap();
1749
1763
  indoorBuilding.putArray("levels", levelsArray);
1750
1764
  indoorBuilding.putInt("activeLevelIndex", building.getActiveLevelIndex());
1751
1765
  indoorBuilding.putBoolean("underground", building.isUnderground());
1752
1766
 
1753
- event.putMap("indoorBuilding", indoorBuilding);
1754
- dispatchEvent(event, OnIndoorBuildingFocusedEvent::new);
1767
+ dispatchEvent(indoorBuilding, OnIndoorBuildingFocusedEvent::new);
1755
1768
  } else {
1756
- WritableMap event = Arguments.createMap();
1757
1769
  WritableArray levelsArray = Arguments.createArray();
1758
1770
  WritableMap indoorBuilding = Arguments.createMap();
1759
1771
  indoorBuilding.putArray("levels", levelsArray);
1760
1772
  indoorBuilding.putInt("activeLevelIndex", 0);
1761
1773
  indoorBuilding.putBoolean("underground", false);
1762
1774
 
1763
- event.putMap("indoorBuilding", indoorBuilding);
1764
- dispatchEvent(event, OnIndoorBuildingFocusedEvent::new);
1775
+ dispatchEvent(indoorBuilding, OnIndoorBuildingFocusedEvent::new);
1765
1776
  }
1766
1777
  }
1767
1778
 
@@ -1776,15 +1787,13 @@ public void onCreate(LifecycleOwner owner) {
1776
1787
  }
1777
1788
  IndoorLevel level = building.getLevels().get(activeLevelIndex);
1778
1789
 
1779
- WritableMap event = Arguments.createMap();
1780
1790
  WritableMap indoorlevel = Arguments.createMap();
1781
1791
 
1782
1792
  indoorlevel.putInt("activeLevelIndex", activeLevelIndex);
1783
1793
  indoorlevel.putString("name", level.getName());
1784
1794
  indoorlevel.putString("shortName", level.getShortName());
1785
1795
 
1786
- event.putMap("indoorLevel", indoorlevel);
1787
- dispatchEvent(event, OnIndoorLevelActivatedEvent::new);
1796
+ dispatchEvent(indoorlevel, OnIndoorLevelActivatedEvent::new);
1788
1797
  }
1789
1798
 
1790
1799
  public void setIndoorActiveLevelIndex(int activeLevelIndex) {
@@ -85,9 +85,9 @@ public class MapWMSTile extends MapUrlTile {
85
85
  TileOverlayOptions options = new TileOverlayOptions();
86
86
  options.zIndex(zIndex);
87
87
  options.transparency(1 - this.opacity);
88
- AIRMapGSUrlTileProvider tileProvider = new AIRMapGSUrlTileProvider((int) this.tileSize, this.urlTemplate,
89
- (int) this.maximumZ, (int) this.maximumNativeZ, (int) this.minimumZ, this.tileCachePath,
90
- (int) this.tileCacheMaxAge, this.offlineMode, this.context, this.customTileProviderNeeded);
88
+ AIRMapGSUrlTileProvider tileProvider = new AIRMapGSUrlTileProvider(this.tileSize, this.urlTemplate,
89
+ this.maximumZ, this.maximumNativeZ, this.minimumZ, this.tileCachePath,
90
+ this.tileCacheMaxAge, this.offlineMode, this.context, this.customTileProviderNeeded);
91
91
  options.tileProvider(tileProvider);
92
92
  return options;
93
93
  }
@@ -39,23 +39,23 @@ public class MapWMSTileManager extends ViewGroupManager<MapWMSTile> {
39
39
  view.setZIndex(zIndex);
40
40
  }
41
41
 
42
- @ReactProp(name = "minimumZ", defaultFloat = 0.0f)
43
- public void setMinimumZ(MapWMSTile view, float minimumZ) {
42
+ @ReactProp(name = "minimumZ", defaultInt = 0)
43
+ public void setMinimumZ(MapWMSTile view, int minimumZ) {
44
44
  view.setMinimumZ(minimumZ);
45
45
  }
46
46
 
47
- @ReactProp(name = "maximumZ", defaultFloat = 100.0f)
48
- public void setMaximumZ(MapWMSTile view, float maximumZ) {
47
+ @ReactProp(name = "maximumZ", defaultInt = 100)
48
+ public void setMaximumZ(MapWMSTile view, int maximumZ) {
49
49
  view.setMaximumZ(maximumZ);
50
50
  }
51
51
 
52
- @ReactProp(name = "maximumNativeZ", defaultFloat = 100.0f)
53
- public void setMaximumNativeZ(MapWMSTile view, float maximumNativeZ) {
52
+ @ReactProp(name = "maximumNativeZ", defaultInt= 100)
53
+ public void setMaximumNativeZ(MapWMSTile view, int maximumNativeZ) {
54
54
  view.setMaximumNativeZ(maximumNativeZ);
55
55
  }
56
56
 
57
- @ReactProp(name = "tileSize", defaultFloat = 256.0f)
58
- public void setTileSize(MapWMSTile view, float tileSize) {
57
+ @ReactProp(name = "tileSize", defaultInt = 256)
58
+ public void setTileSize(MapWMSTile view, int tileSize) {
59
59
  view.setTileSize(tileSize);
60
60
  }
61
61
 
@@ -64,8 +64,8 @@ public class MapWMSTileManager extends ViewGroupManager<MapWMSTile> {
64
64
  view.setTileCachePath(tileCachePath);
65
65
  }
66
66
 
67
- @ReactProp(name = "tileCacheMaxAge", defaultFloat = 0.0f)
68
- public void setTileCacheMaxAge(MapWMSTile view, float tileCacheMaxAge) {
67
+ @ReactProp(name = "tileCacheMaxAge", defaultInt = 0)
68
+ public void setTileCacheMaxAge(MapWMSTile view, int tileCacheMaxAge) {
69
69
  view.setTileCacheMaxAge(tileCacheMaxAge);
70
70
  }
71
71
 
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNMapsSpecs/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNMapsSpecs
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNMapsSpecs PUBLIC . react/renderer/components/RNMapsSpecs)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNMapsSpecs
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_options(
29
+ react_codegen_RNMapsSpecs
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )