react-native-maps 2.0.0-beta.1 → 2.0.0-beta.11

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 (186) hide show
  1. package/README.md +34 -11
  2. package/android/build.gradle +41 -10
  3. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  4. package/android/src/main/java/com/rnmaps/maps/MapCalloutManager.java +1 -1
  5. package/android/src/main/java/com/rnmaps/maps/MapCircleManager.java +1 -1
  6. package/android/src/main/java/com/rnmaps/maps/MapGradientPolyline.java +4 -4
  7. package/android/src/main/java/com/rnmaps/maps/MapGradientPolylineManager.java +1 -1
  8. package/android/src/main/java/com/rnmaps/maps/MapHeatmapManager.java +1 -1
  9. package/android/src/main/java/com/rnmaps/maps/MapLiteManager.java +1 -1
  10. package/android/src/main/java/com/rnmaps/maps/MapLocalTile.java +4 -4
  11. package/android/src/main/java/com/rnmaps/maps/MapLocalTileManager.java +1 -1
  12. package/android/src/main/java/com/rnmaps/maps/MapManager.java +9 -83
  13. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +2 -2
  14. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +10 -27
  15. package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +1 -1
  16. package/android/src/main/java/com/rnmaps/maps/MapPolygonManager.java +1 -1
  17. package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -1
  18. package/android/src/main/java/com/rnmaps/maps/MapTileProvider.java +7 -5
  19. package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +1 -1
  20. package/android/src/main/java/com/rnmaps/maps/MapView.java +66 -157
  21. package/android/src/main/java/com/rnmaps/maps/MapViewModule.java +598 -0
  22. package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +6 -6
  23. package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +1 -1
  24. package/android/src/main/java/com/rnmaps/maps/MapsPackage.java +1 -1
  25. package/android/src/main/java/com/rnmaps/maps/SizeReportingShadowNode.java +1 -1
  26. package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.m +8 -0
  27. package/ios/{AirGoogleMaps/AIRDummyView.h → GoogleMaps/RNMDummyView.h} +3 -3
  28. package/ios/{AirGoogleMaps/AIRDummyView.m → GoogleMaps/RNMDummyView.m} +4 -4
  29. package/ios/{AirGoogleMaps/AIRGMSMarker.h → GoogleMaps/RNMGMSMarker.h} +6 -6
  30. package/ios/{AirGoogleMaps/AIRGMSMarker.m → GoogleMaps/RNMGMSMarker.m} +4 -4
  31. package/ios/{AirGoogleMaps/AIRGMSPolygon.h → GoogleMaps/RNMGMSPolygon.h} +4 -4
  32. package/ios/{AirGoogleMaps/AIRGMSPolygon.m → GoogleMaps/RNMGMSPolygon.m} +4 -4
  33. package/ios/{AirGoogleMaps/AIRGMSPolyline.h → GoogleMaps/RNMGMSPolyline.h} +4 -4
  34. package/ios/{AirGoogleMaps/AIRGMSPolyline.m → GoogleMaps/RNMGMSPolyline.m} +4 -4
  35. package/ios/{AirGoogleMaps/AIRGoogleMap.h → GoogleMaps/RNMGoogleMap.h} +5 -5
  36. package/ios/{AirGoogleMaps/AIRGoogleMap.m → GoogleMaps/RNMGoogleMap.m} +90 -77
  37. package/ios/{AirGoogleMaps/AIRGoogleMapCallout.h → GoogleMaps/RNMGoogleMapCallout.h} +3 -3
  38. package/ios/{AirGoogleMaps/AIRGoogleMapCallout.m → GoogleMaps/RNMGoogleMapCallout.m} +4 -4
  39. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.h → GoogleMaps/RNMGoogleMapCalloutManager.h} +3 -3
  40. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.m → GoogleMaps/RNMGoogleMapCalloutManager.m} +7 -7
  41. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.h → GoogleMaps/RNMGoogleMapCalloutSubview.h} +3 -3
  42. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.m → GoogleMaps/RNMGoogleMapCalloutSubview.m} +4 -4
  43. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.h → GoogleMaps/RNMGoogleMapCalloutSubviewManager.h} +3 -3
  44. package/ios/GoogleMaps/RNMGoogleMapCalloutSubviewManager.m +28 -0
  45. package/ios/{AirGoogleMaps/AIRGoogleMapCircle.h → GoogleMaps/RNMGoogleMapCircle.h} +3 -3
  46. package/ios/{AirGoogleMaps/AIRGoogleMapCircle.m → GoogleMaps/RNMGoogleMapCircle.m} +3 -3
  47. package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.h → GoogleMaps/RNMGoogleMapCircleManager.h} +2 -2
  48. package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.m → GoogleMaps/RNMGoogleMapCircleManager.m} +7 -7
  49. package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.h → GoogleMaps/RNMGoogleMapHeatmap.h} +3 -3
  50. package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.m → GoogleMaps/RNMGoogleMapHeatmap.m} +4 -4
  51. package/ios/GoogleMaps/RNMGoogleMapHeatmapManager.h +11 -0
  52. package/ios/{AirGoogleMaps/AIRGoogleMapHeatmapManager.m → GoogleMaps/RNMGoogleMapHeatmapManager.m} +9 -9
  53. package/ios/{AirGoogleMaps/AIRGoogleMapManager.h → GoogleMaps/RNMGoogleMapManager.h} +3 -3
  54. package/ios/GoogleMaps/RNMGoogleMapManager.m +223 -0
  55. package/ios/{AirGoogleMaps/AIRGoogleMapMarker.h → GoogleMaps/RNMGoogleMapMarker.h} +15 -15
  56. package/ios/{AirGoogleMaps/AIRGoogleMapMarker.m → GoogleMaps/RNMGoogleMapMarker.m} +23 -23
  57. package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.h → GoogleMaps/RNMGoogleMapMarkerManager.h} +3 -3
  58. package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.m → GoogleMaps/RNMGoogleMapMarkerManager.m} +20 -20
  59. package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.h → GoogleMaps/RNMGoogleMapOverlay.h} +4 -4
  60. package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.m → GoogleMaps/RNMGoogleMapOverlay.m} +4 -4
  61. package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.h → GoogleMaps/RNMGoogleMapOverlayManager.h} +2 -2
  62. package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.m → GoogleMaps/RNMGoogleMapOverlayManager.m} +6 -6
  63. package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.h → GoogleMaps/RNMGoogleMapPolygon.h} +7 -7
  64. package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.m → GoogleMaps/RNMGoogleMapPolygon.m} +7 -7
  65. package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.h → GoogleMaps/RNMGoogleMapPolygonManager.h} +2 -2
  66. package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.m → GoogleMaps/RNMGoogleMapPolygonManager.m} +10 -10
  67. package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.h → GoogleMaps/RNMGoogleMapPolyline.h} +7 -7
  68. package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.m → GoogleMaps/RNMGoogleMapPolyline.m} +9 -9
  69. package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.h → GoogleMaps/RNMGoogleMapPolylineManager.h} +2 -2
  70. package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.m → GoogleMaps/RNMGoogleMapPolylineManager.m} +9 -9
  71. package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.h → GoogleMaps/RNMGoogleMapUrlTile.h} +2 -2
  72. package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.m → GoogleMaps/RNMGoogleMapUrlTile.m} +3 -3
  73. package/ios/{AirGoogleMaps/AIRGoogleMapUrlTileManager.h → GoogleMaps/RNMGoogleMapUrlTileManager.h} +2 -2
  74. package/ios/{AirGoogleMaps/AIRGoogleMapURLTileManager.m → GoogleMaps/RNMGoogleMapUrlTileManager.m} +7 -7
  75. package/ios/GoogleMaps/RNMGoogleMapViewModule.h +5 -0
  76. package/ios/GoogleMaps/RNMGoogleMapViewModule.m +385 -0
  77. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.h → GoogleMaps/RNMGoogleMapWMSTile.h} +3 -3
  78. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.m → GoogleMaps/RNMGoogleMapWMSTile.m} +4 -4
  79. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.h → GoogleMaps/RNMGoogleMapWMSTileManager.h} +3 -3
  80. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.m → GoogleMaps/RNMGoogleMapWMSTileManager.m} +8 -8
  81. package/ios/{AirMaps → Maps}/Callout/SMCalloutView.h +4 -4
  82. package/ios/{AirMaps/RCTConvert+AirMap.h → Maps/RCTConvert+RNMMap.h} +1 -1
  83. package/ios/{AirMaps/RCTConvert+AirMap.m → Maps/RCTConvert+RNMMap.m} +25 -8
  84. package/ios/{AirMaps/AIRMap.h → Maps/RNMMap.h} +8 -8
  85. package/ios/{AirMaps/AIRMap.m → Maps/RNMMap.m} +60 -56
  86. package/ios/{AirMaps/AIRMapCallout.h → Maps/RNMMapCallout.h} +1 -1
  87. package/ios/{AirMaps/AIRMapCallout.m → Maps/RNMMapCallout.m} +2 -2
  88. package/ios/{AirMaps/AIRMapCircleManager.h → Maps/RNMMapCalloutManager.h} +2 -2
  89. package/ios/{AirMaps/AIRMapCalloutManager.m → Maps/RNMMapCalloutManager.m} +7 -7
  90. package/ios/{AirMaps/AIRMapCalloutSubview.h → Maps/RNMMapCalloutSubview.h} +3 -3
  91. package/ios/{AirMaps/AIRMapCalloutSubview.m → Maps/RNMMapCalloutSubview.m} +4 -4
  92. package/ios/Maps/RNMMapCalloutSubviewManager.h +14 -0
  93. package/ios/Maps/RNMMapCalloutSubviewManager.m +24 -0
  94. package/ios/{AirMaps/AIRMapCircle.h → Maps/RNMMapCircle.h} +5 -5
  95. package/ios/{AirMaps/AIRMapCircle.m → Maps/RNMMapCircle.m} +3 -3
  96. package/ios/{AirMaps/AIRMapCalloutManager.h → Maps/RNMMapCircleManager.h} +2 -2
  97. package/ios/{AirMaps/AIRMapCircleManager.m → Maps/RNMMapCircleManager.m} +7 -7
  98. package/ios/{AirMaps/AIRMapCoordinate.h → Maps/RNMMapCoordinate.h} +2 -2
  99. package/ios/{AirMaps/AIRMapCoordinate.m → Maps/RNMMapCoordinate.m} +3 -3
  100. package/ios/{AirMaps/AIRMapLocalTile.h → Maps/RNMMapLocalTile.h} +7 -7
  101. package/ios/{AirMaps/AIRMapLocalTile.m → Maps/RNMMapLocalTile.m} +6 -6
  102. package/ios/{AirMaps/AIRMapLocalTileManager.h → Maps/RNMMapLocalTileManager.h} +3 -3
  103. package/ios/{AirMaps/AIRMapLocalTileManager.m → Maps/RNMMapLocalTileManager.m} +9 -9
  104. package/ios/{AirMaps/AIRMapLocalTileOverlay.h → Maps/RNMMapLocalTileOverlay.h} +2 -2
  105. package/ios/{AirMaps/AIRMapLocalTileOverlay.m → Maps/RNMMapLocalTileOverlay.m} +5 -5
  106. package/ios/{AirMaps/AIRMapManager.h → Maps/RNMMapManager.h} +6 -6
  107. package/ios/Maps/RNMMapManager.m +830 -0
  108. package/ios/{AirMaps/AIRMapMarker.h → Maps/RNMMapMarker.h} +8 -8
  109. package/ios/{AirMaps/AIRMapMarker.m → Maps/RNMMapMarker.m} +13 -13
  110. package/ios/{AirMaps/AIRMapMarkerManager.h → Maps/RNMMapMarkerManager.h} +1 -1
  111. package/ios/{AirMaps/AIRMapMarkerManager.m → Maps/RNMMapMarkerManager.m} +14 -14
  112. package/ios/{AirMaps/AIRMapOverlay.h → Maps/RNMMapOverlay.h} +7 -7
  113. package/ios/{AirMaps/AIRMapOverlay.m → Maps/RNMMapOverlay.m} +4 -4
  114. package/ios/Maps/RNMMapOverlayManager.h +5 -0
  115. package/ios/{AirMaps/AIRMapOverlayManager.m → Maps/RNMMapOverlayManager.m} +6 -6
  116. package/ios/{AirMaps/AIRMapOverlayRenderer.h → Maps/RNMMapOverlayRenderer.h} +1 -1
  117. package/ios/{AirMaps/AIRMapOverlayRenderer.m → Maps/RNMMapOverlayRenderer.m} +5 -5
  118. package/ios/{AirMaps/AIRMapPolygon.h → Maps/RNMMapPolygon.h} +7 -7
  119. package/ios/{AirMaps/AIRMapPolygon.m → Maps/RNMMapPolygon.m} +4 -4
  120. package/ios/{AirMaps/AIRMapPolygonManager.h → Maps/RNMMapPolygonManager.h} +2 -2
  121. package/ios/{AirMaps/AIRMapPolygonManager.m → Maps/RNMMapPolygonManager.m} +10 -10
  122. package/ios/{AirMaps/AIRMapPolyline.h → Maps/RNMMapPolyline.h} +6 -6
  123. package/ios/{AirMaps/AIRMapPolyline.m → Maps/RNMMapPolyline.m} +11 -11
  124. package/ios/{AirMaps/AIRMapPolylineManager.h → Maps/RNMMapPolylineManager.h} +2 -2
  125. package/ios/{AirMaps/AIRMapPolylineManager.m → Maps/RNMMapPolylineManager.m} +9 -9
  126. package/ios/{AirMaps/AIRMapPolylineRenderer.h → Maps/RNMMapPolylineRenderer.h} +2 -2
  127. package/ios/{AirMaps/AIRMapPolylineRenderer.m → Maps/RNMMapPolylineRenderer.m} +10 -10
  128. package/ios/{AirMaps/AIRMapSnapshot.h → Maps/RNMMapSnapshot.h} +6 -6
  129. package/ios/{AirMaps/AIRMapUrlTile.h → Maps/RNMMapUrlTile.h} +18 -18
  130. package/ios/{AirMaps/AIRMapUrlTile.m → Maps/RNMMapUrlTile.m} +7 -7
  131. package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.h → Maps/RNMMapUrlTileCachedOverlay.h} +3 -3
  132. package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.m → Maps/RNMMapUrlTileCachedOverlay.m} +10 -10
  133. package/ios/{AirMaps/AIRMapUrlTileManager.h → Maps/RNMMapUrlTileManager.h} +3 -3
  134. package/ios/{AirMaps/AIRMapUrlTileManager.m → Maps/RNMMapUrlTileManager.m} +9 -9
  135. package/ios/Maps/RNMMapViewModule.h +5 -0
  136. package/ios/Maps/RNMMapViewModule.m +465 -0
  137. package/ios/{AirMaps/AIRMapWMSTile.h → Maps/RNMMapWMSTile.h} +11 -11
  138. package/ios/{AirMaps/AIRMapWMSTile.m → Maps/RNMMapWMSTile.m} +15 -15
  139. package/ios/{AirMaps/AIRMapWMSTileManager.h → Maps/RNMMapWMSTileManager.h} +3 -3
  140. package/ios/{AirMaps/AIRMapWMSTileManager.m → Maps/RNMMapWMSTileManager.m} +9 -9
  141. package/ios/RNMaps.xcodeproj/project.pbxproj +647 -0
  142. package/lib/Geojson.d.ts +1 -1
  143. package/lib/MapCallout.js +2 -2
  144. package/lib/MapCalloutSubview.js +2 -2
  145. package/lib/MapCircle.js +2 -2
  146. package/lib/MapHeatmap.js +2 -2
  147. package/lib/MapLocalTile.js +2 -2
  148. package/lib/MapMarker.d.ts +2 -3
  149. package/lib/MapMarker.js +2 -4
  150. package/lib/MapOverlay.d.ts +1 -2
  151. package/lib/MapOverlay.js +2 -4
  152. package/lib/MapPolygon.js +2 -2
  153. package/lib/MapPolyline.js +2 -2
  154. package/lib/MapUrlTile.js +2 -2
  155. package/lib/MapView.d.ts +21 -16
  156. package/lib/MapView.js +92 -118
  157. package/lib/MapView.types.d.ts +8 -3
  158. package/lib/MapViewNativeComponent.d.ts +0 -15
  159. package/lib/MapViewNativeComponent.js +0 -17
  160. package/lib/MapWMSTile.js +2 -2
  161. package/lib/NativeGoogleMapViewModule.d.ts +25 -0
  162. package/lib/NativeGoogleMapViewModule.js +4 -0
  163. package/lib/NativeMapViewModule.d.ts +29 -0
  164. package/lib/NativeMapViewModule.js +4 -0
  165. package/lib/decorateMapComponent.d.ts +1 -1
  166. package/lib/decorateMapComponent.js +3 -3
  167. package/lib/index.d.ts +14 -21
  168. package/lib/index.js +10 -38
  169. package/package.json +6 -6
  170. package/react-native-google-maps.podspec +1 -1
  171. package/react-native-maps.podspec +2 -2
  172. package/android/src/main/java/com/rnmaps/maps/MapModule.java +0 -380
  173. package/ios/AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.m +0 -28
  174. package/ios/AirGoogleMaps/AIRGoogleMapHeatmapManager.h +0 -11
  175. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -597
  176. package/ios/AirMaps/AIRMapCalloutSubviewManager.h +0 -14
  177. package/ios/AirMaps/AIRMapCalloutSubviewManager.m +0 -24
  178. package/ios/AirMaps/AIRMapManager.m +0 -1253
  179. package/ios/AirMaps/AIRMapOverlayManager.h +0 -5
  180. package/ios/AirMaps/AIRWeakMapReference.h +0 -24
  181. package/ios/AirMaps/AIRWeakMapReference.m +0 -23
  182. package/ios/AirMaps/AIRWeakTimerReference.h +0 -21
  183. package/ios/AirMaps/AIRWeakTimerReference.m +0 -42
  184. package/ios/AirMaps.xcodeproj/project.pbxproj +0 -587
  185. /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.h +0 -0
  186. /package/ios/{AirMaps → Maps}/Callout/SMCalloutView.m +0 -0
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRDummyView.h
3
- // AirMapsExplorer
2
+ // RNMDummyView.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 10/4/16.
6
6
  //
@@ -10,7 +10,7 @@
10
10
  #import <UIKit/UIKit.h>
11
11
 
12
12
 
13
- @interface AIRDummyView : UIView
13
+ @interface RNMDummyView : UIView
14
14
  @property (nonatomic, weak) UIView *view;
15
15
  - (instancetype)initWithView:(UIView*)view;
16
16
  @end
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRDummyView.m
3
- // AirMapsExplorer
2
+ // RNMDummyView.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 10/4/16.
6
6
  //
@@ -8,9 +8,9 @@
8
8
  #ifdef HAVE_GOOGLE_MAPS
9
9
 
10
10
  #import <Foundation/Foundation.h>
11
- #import "AIRDummyView.h"
11
+ #import "RNMDummyView.h"
12
12
 
13
- @implementation AIRDummyView
13
+ @implementation RNMDummyView
14
14
  - (instancetype)initWithView:(UIView*)view
15
15
  {
16
16
  if ((self = [super init])) {
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGMSMarker.h
3
- // AirMaps
2
+ // RNMGMSMarker.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/5/16.
6
6
  //
@@ -10,16 +10,16 @@
10
10
  #import <GoogleMaps/GoogleMaps.h>
11
11
  #import <React/UIView+React.h>
12
12
 
13
- @class AIRGoogleMapMarker;
13
+ @class RNMGoogleMapMarker;
14
14
 
15
- @interface AIRGMSMarker : GMSMarker
15
+ @interface RNMGMSMarker : GMSMarker
16
16
  @property (nonatomic, strong) NSString *identifier;
17
- @property (nonatomic, weak) AIRGoogleMapMarker *fakeMarker;
17
+ @property (nonatomic, weak) RNMGoogleMapMarker *fakeMarker;
18
18
  @property (nonatomic, copy) RCTBubblingEventBlock onPress;
19
19
  @end
20
20
 
21
21
 
22
- @protocol AIRGMSMarkerDelegate <NSObject>
22
+ @protocol RNMGMSMarkerDelegate <NSObject>
23
23
  @required
24
24
  -(void)didTapMarker;
25
25
  @end
@@ -1,15 +1,15 @@
1
1
  //
2
- // AIRGMSMarker.m
3
- // AirMaps
2
+ // RNMGMSMarker.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/5/16.
6
6
  //
7
7
 
8
8
  #ifdef HAVE_GOOGLE_MAPS
9
9
 
10
- #import "AIRGMSMarker.h"
10
+ #import "RNMGMSMarker.h"
11
11
 
12
- @implementation AIRGMSMarker
12
+ @implementation RNMGMSMarker
13
13
 
14
14
  @end
15
15
 
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGMSPolygon.h
3
- // AirMaps
2
+ // RNMGMSPolygon.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gerardo Pacheco 02/05/2017.
6
6
  //
@@ -10,9 +10,9 @@
10
10
  #import <GoogleMaps/GoogleMaps.h>
11
11
  #import <React/UIView+React.h>
12
12
 
13
- @class AIRGoogleMapPolygon;
13
+ @class RNMGoogleMapPolygon;
14
14
 
15
- @interface AIRGMSPolygon : GMSPolygon
15
+ @interface RNMGMSPolygon : GMSPolygon
16
16
  @property (nonatomic, strong) NSString *identifier;
17
17
  @property (nonatomic, copy) RCTBubblingEventBlock onPress;
18
18
  @end
@@ -1,15 +1,15 @@
1
1
  //
2
- // AIRGMSPolygon.m
3
- // AirMaps
2
+ // RNMGMSPolygon.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gerardo Pacheco 02/05/2017.
6
6
  //
7
7
 
8
8
  #ifdef HAVE_GOOGLE_MAPS
9
9
 
10
- #import "AIRGMSPolygon.h"
10
+ #import "RNMGMSPolygon.h"
11
11
 
12
- @implementation AIRGMSPolygon
12
+ @implementation RNMGMSPolygon
13
13
 
14
14
  @end
15
15
 
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGMSPolyline.h
3
- // AirMaps
2
+ // RNMGMSPolyline.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Guilherme Pontes 04/05/2017.
6
6
  //
@@ -10,9 +10,9 @@
10
10
  #import <GoogleMaps/GoogleMaps.h>
11
11
  #import <React/UIView+React.h>
12
12
 
13
- @class AIRGoogleMapPolyline;
13
+ @class RNMGoogleMapPolyline;
14
14
 
15
- @interface AIRGMSPolyline : GMSPolyline
15
+ @interface RNMGMSPolyline : GMSPolyline
16
16
  @property (nonatomic, strong) NSString *identifier;
17
17
  @property (nonatomic, copy) RCTBubblingEventBlock onPress;
18
18
  @end
@@ -1,15 +1,15 @@
1
1
  //
2
- // AIRGMSPolyline.m
3
- // AirMaps
2
+ // RNMGMSPolyline.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Guilherme Pontes 04/05/2017.
6
6
  //
7
7
 
8
8
  #ifdef HAVE_GOOGLE_MAPS
9
9
 
10
- #import "AIRGMSPolyline.h"
10
+ #import "RNMGMSPolyline.h"
11
11
 
12
- @implementation AIRGMSPolyline
12
+ @implementation RNMGMSPolyline
13
13
  @end
14
14
 
15
15
  #endif
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGoogleMap.h
3
- // AirMaps
2
+ // RNMGoogleMap.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/1/16.
6
6
  //
@@ -12,10 +12,10 @@
12
12
  #import <React/RCTBridge.h>
13
13
  #import <GoogleMaps/GoogleMaps.h>
14
14
  #import <MapKit/MapKit.h>
15
- #import "AIRGMSMarker.h"
16
- #import "RCTConvert+AirMap.h"
15
+ #import "RNMGMSMarker.h"
16
+ #import "RCTConvert+RNMMap.h"
17
17
 
18
- @interface AIRGoogleMap : GMSMapView
18
+ @interface RNMGoogleMap : GMSMapView
19
19
 
20
20
  // TODO: don't use MK region?
21
21
  @property (nonatomic, weak) RCTBridge *bridge;
@@ -1,27 +1,27 @@
1
1
  //
2
- // AIRGoogleMap.m
3
- // AirMaps
2
+ // RNMGoogleMap.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/1/16.
6
6
  //
7
7
 
8
8
  #ifdef HAVE_GOOGLE_MAPS
9
9
 
10
- #import "AIRGoogleMap.h"
11
- #import "AIRGoogleMapMarker.h"
12
- #import "AIRGoogleMapMarkerManager.h"
13
- #import "AIRGoogleMapPolygon.h"
14
- #import "AIRGoogleMapPolyline.h"
15
- #import "AIRGoogleMapCircle.h"
16
- #import "AIRGoogleMapHeatmap.h"
17
- #import "AIRGoogleMapUrlTile.h"
18
- #import "AIRGoogleMapWMSTile.h"
19
- #import "AIRGoogleMapOverlay.h"
10
+ #import "RNMGoogleMap.h"
11
+ #import "RNMGoogleMapMarker.h"
12
+ #import "RNMGoogleMapMarkerManager.h"
13
+ #import "RNMGoogleMapPolygon.h"
14
+ #import "RNMGoogleMapPolyline.h"
15
+ #import "RNMGoogleMapCircle.h"
16
+ #import "RNMGoogleMapHeatmap.h"
17
+ #import "RNMGoogleMapUrlTile.h"
18
+ #import "RNMGoogleMapWMSTile.h"
19
+ #import "RNMGoogleMapOverlay.h"
20
20
  #import <GoogleMaps/GoogleMaps.h>
21
21
  #import <MapKit/MapKit.h>
22
22
  #import <React/UIView+React.h>
23
23
  #import <React/RCTBridge.h>
24
- #import "RCTConvert+AirMap.h"
24
+ #import "RCTConvert+RNMMap.h"
25
25
  #import <objc/runtime.h>
26
26
 
27
27
  #ifdef HAVE_GOOGLE_MAPS_UTILS
@@ -49,7 +49,7 @@ id regionAsJSON(MKCoordinateRegion region) {
49
49
  };
50
50
  }
51
51
 
52
- @interface AIRGoogleMap () <GMSIndoorDisplayDelegate>
52
+ @interface RNMGoogleMap () <GMSIndoorDisplayDelegate>
53
53
 
54
54
  - (id)eventFromCoordinate:(CLLocationCoordinate2D)coordinate;
55
55
 
@@ -57,7 +57,7 @@ id regionAsJSON(MKCoordinateRegion region) {
57
57
 
58
58
  @end
59
59
 
60
- @implementation AIRGoogleMap
60
+ @implementation RNMGoogleMap
61
61
  {
62
62
  NSMutableArray<UIView *> *_reactSubviews;
63
63
  MKCoordinateRegion _initialRegion;
@@ -132,36 +132,36 @@ id regionAsJSON(MKCoordinateRegion region) {
132
132
  - (void)insertReactSubview:(id<RCTComponent>)subview atIndex:(NSInteger)atIndex {
133
133
  // Our desired API is to pass up markers/overlays as children to the mapview component.
134
134
  // This is where we intercept them and do the appropriate underlying mapview action.
135
- if ([subview isKindOfClass:[AIRGoogleMapMarker class]]) {
136
- AIRGoogleMapMarker *marker = (AIRGoogleMapMarker*)subview;
135
+ if ([subview isKindOfClass:[RNMGoogleMapMarker class]]) {
136
+ RNMGoogleMapMarker *marker = (RNMGoogleMapMarker*)subview;
137
137
  marker.realMarker.map = self;
138
138
  [self.markers addObject:marker];
139
- } else if ([subview isKindOfClass:[AIRGoogleMapPolygon class]]) {
140
- AIRGoogleMapPolygon *polygon = (AIRGoogleMapPolygon*)subview;
139
+ } else if ([subview isKindOfClass:[RNMGoogleMapPolygon class]]) {
140
+ RNMGoogleMapPolygon *polygon = (RNMGoogleMapPolygon*)subview;
141
141
  polygon.polygon.map = self;
142
142
  [self.polygons addObject:polygon];
143
- } else if ([subview isKindOfClass:[AIRGoogleMapPolyline class]]) {
144
- AIRGoogleMapPolyline *polyline = (AIRGoogleMapPolyline*)subview;
143
+ } else if ([subview isKindOfClass:[RNMGoogleMapPolyline class]]) {
144
+ RNMGoogleMapPolyline *polyline = (RNMGoogleMapPolyline*)subview;
145
145
  polyline.polyline.map = self;
146
146
  [self.polylines addObject:polyline];
147
- } else if ([subview isKindOfClass:[AIRGoogleMapCircle class]]) {
148
- AIRGoogleMapCircle *circle = (AIRGoogleMapCircle*)subview;
147
+ } else if ([subview isKindOfClass:[RNMGoogleMapCircle class]]) {
148
+ RNMGoogleMapCircle *circle = (RNMGoogleMapCircle*)subview;
149
149
  circle.circle.map = self;
150
150
  [self.circles addObject:circle];
151
- } else if ([subview isKindOfClass:[AIRGoogleMapUrlTile class]]) {
152
- AIRGoogleMapUrlTile *tile = (AIRGoogleMapUrlTile*)subview;
151
+ } else if ([subview isKindOfClass:[RNMGoogleMapUrlTile class]]) {
152
+ RNMGoogleMapUrlTile *tile = (RNMGoogleMapUrlTile*)subview;
153
153
  tile.tileLayer.map = self;
154
154
  [self.tiles addObject:tile];
155
- } else if ([subview isKindOfClass:[AIRGoogleMapWMSTile class]]) {
156
- AIRGoogleMapWMSTile *tile = (AIRGoogleMapWMSTile*)subview;
155
+ } else if ([subview isKindOfClass:[RNMGoogleMapWMSTile class]]) {
156
+ RNMGoogleMapWMSTile *tile = (RNMGoogleMapWMSTile*)subview;
157
157
  tile.tileLayer.map = self;
158
158
  [self.tiles addObject:tile];
159
- } else if ([subview isKindOfClass:[AIRGoogleMapOverlay class]]) {
160
- AIRGoogleMapOverlay *overlay = (AIRGoogleMapOverlay*)subview;
159
+ } else if ([subview isKindOfClass:[RNMGoogleMapOverlay class]]) {
160
+ RNMGoogleMapOverlay *overlay = (RNMGoogleMapOverlay*)subview;
161
161
  overlay.overlay.map = self;
162
162
  [self.overlays addObject:overlay];
163
- } else if ([subview isKindOfClass:[AIRGoogleMapHeatmap class]]){
164
- AIRGoogleMapHeatmap *heatmap = (AIRGoogleMapHeatmap*)subview;
163
+ } else if ([subview isKindOfClass:[RNMGoogleMapHeatmap class]]){
164
+ RNMGoogleMapHeatmap *heatmap = (RNMGoogleMapHeatmap*)subview;
165
165
  heatmap.heatmap.map = self;
166
166
  [self.heatmaps addObject:heatmap];
167
167
  } else {
@@ -180,36 +180,36 @@ id regionAsJSON(MKCoordinateRegion region) {
180
180
  - (void)removeReactSubview:(id<RCTComponent>)subview {
181
181
  // similarly, when the children are being removed we have to do the appropriate
182
182
  // underlying mapview action here.
183
- if ([subview isKindOfClass:[AIRGoogleMapMarker class]]) {
184
- AIRGoogleMapMarker *marker = (AIRGoogleMapMarker*)subview;
183
+ if ([subview isKindOfClass:[RNMGoogleMapMarker class]]) {
184
+ RNMGoogleMapMarker *marker = (RNMGoogleMapMarker*)subview;
185
185
  marker.realMarker.map = nil;
186
186
  [self.markers removeObject:marker];
187
- } else if ([subview isKindOfClass:[AIRGoogleMapPolygon class]]) {
188
- AIRGoogleMapPolygon *polygon = (AIRGoogleMapPolygon*)subview;
187
+ } else if ([subview isKindOfClass:[RNMGoogleMapPolygon class]]) {
188
+ RNMGoogleMapPolygon *polygon = (RNMGoogleMapPolygon*)subview;
189
189
  polygon.polygon.map = nil;
190
190
  [self.polygons removeObject:polygon];
191
- } else if ([subview isKindOfClass:[AIRGoogleMapPolyline class]]) {
192
- AIRGoogleMapPolyline *polyline = (AIRGoogleMapPolyline*)subview;
191
+ } else if ([subview isKindOfClass:[RNMGoogleMapPolyline class]]) {
192
+ RNMGoogleMapPolyline *polyline = (RNMGoogleMapPolyline*)subview;
193
193
  polyline.polyline.map = nil;
194
194
  [self.polylines removeObject:polyline];
195
- } else if ([subview isKindOfClass:[AIRGoogleMapCircle class]]) {
196
- AIRGoogleMapCircle *circle = (AIRGoogleMapCircle*)subview;
195
+ } else if ([subview isKindOfClass:[RNMGoogleMapCircle class]]) {
196
+ RNMGoogleMapCircle *circle = (RNMGoogleMapCircle*)subview;
197
197
  circle.circle.map = nil;
198
198
  [self.circles removeObject:circle];
199
- } else if ([subview isKindOfClass:[AIRGoogleMapUrlTile class]]) {
200
- AIRGoogleMapUrlTile *tile = (AIRGoogleMapUrlTile*)subview;
199
+ } else if ([subview isKindOfClass:[RNMGoogleMapUrlTile class]]) {
200
+ RNMGoogleMapUrlTile *tile = (RNMGoogleMapUrlTile*)subview;
201
201
  tile.tileLayer.map = nil;
202
202
  [self.tiles removeObject:tile];
203
- } else if ([subview isKindOfClass:[AIRGoogleMapWMSTile class]]) {
204
- AIRGoogleMapWMSTile *tile = (AIRGoogleMapWMSTile*)subview;
203
+ } else if ([subview isKindOfClass:[RNMGoogleMapWMSTile class]]) {
204
+ RNMGoogleMapWMSTile *tile = (RNMGoogleMapWMSTile*)subview;
205
205
  tile.tileLayer.map = nil;
206
206
  [self.tiles removeObject:tile];
207
- } else if ([subview isKindOfClass:[AIRGoogleMapOverlay class]]) {
208
- AIRGoogleMapOverlay *overlay = (AIRGoogleMapOverlay*)subview;
207
+ } else if ([subview isKindOfClass:[RNMGoogleMapOverlay class]]) {
208
+ RNMGoogleMapOverlay *overlay = (RNMGoogleMapOverlay*)subview;
209
209
  overlay.overlay.map = nil;
210
210
  [self.overlays removeObject:overlay];
211
- } else if ([subview isKindOfClass:[AIRGoogleMapHeatmap class]]){
212
- AIRGoogleMapHeatmap *heatmap = (AIRGoogleMapHeatmap*)subview;
211
+ } else if ([subview isKindOfClass:[RNMGoogleMapHeatmap class]]){
212
+ RNMGoogleMapHeatmap *heatmap = (RNMGoogleMapHeatmap*)subview;
213
213
  heatmap.heatmap.map = nil;
214
214
  [self.heatmaps removeObject:heatmap];
215
215
  } else {
@@ -260,18 +260,18 @@ id regionAsJSON(MKCoordinateRegion region) {
260
260
  }
261
261
  else if (_initialRegion.span.latitudeDelta != 0.0 &&
262
262
  _initialRegion.span.longitudeDelta != 0.0) {
263
- self.camera = [AIRGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:_initialRegion];
263
+ self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:_initialRegion];
264
264
  _initialRegionSet = true;
265
265
  } else if (_region.span.latitudeDelta != 0.0 &&
266
266
  _region.span.longitudeDelta != 0.0) {
267
- self.camera = [AIRGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:_region];
267
+ self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:_region];
268
268
  }
269
269
  }
270
270
 
271
271
  - (void)setInitialRegion:(MKCoordinateRegion)initialRegion {
272
272
  _initialRegion = initialRegion;
273
273
  if(!_initialRegionSet && _didLayoutSubviews){
274
- self.camera = [AIRGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:initialRegion];
274
+ self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:initialRegion];
275
275
  _initialRegionSet = true;
276
276
  }
277
277
  }
@@ -288,7 +288,7 @@ id regionAsJSON(MKCoordinateRegion region) {
288
288
  // TODO: The JS component is repeatedly setting region unnecessarily. We might want to deal with that in here.
289
289
  _region = region;
290
290
  if(_didLayoutSubviews) {
291
- self.camera = [AIRGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:region];
291
+ self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:region];
292
292
  }
293
293
  }
294
294
 
@@ -305,6 +305,19 @@ id regionAsJSON(MKCoordinateRegion region) {
305
305
  }
306
306
  }
307
307
 
308
+ - (void)setBoundary:(GMSCoordinateBounds*)boundary {
309
+ self.cameraTargetBounds = boundary;
310
+ }
311
+
312
+ - (void)setIndoorActiveLevelIndex:(NSInteger)index {
313
+ if (!self.indoorDisplay) {
314
+ return;
315
+ }
316
+ if ( index < [self.indoorDisplay.activeBuilding.levels count]) {
317
+ self.indoorDisplay.activeLevel = self.indoorDisplay.activeBuilding.levels[index];
318
+ }
319
+ }
320
+
308
321
  - (void)didPrepareMap {
309
322
  UIView* mapView = [self valueForKey:@"mapView"]; //GMSVectorMapView
310
323
  [self overrideGestureRecognizersForView:mapView];
@@ -321,17 +334,17 @@ id regionAsJSON(MKCoordinateRegion region) {
321
334
  }
322
335
 
323
336
  - (BOOL)didTapMarker:(GMSMarker *)marker {
324
- AIRGMSMarker *airMarker = (AIRGMSMarker *)marker;
337
+ RNMGMSMarker *rnmMarker = (RNMGMSMarker *)marker;
325
338
 
326
339
  id event = @{@"action": @"marker-press",
327
- @"id": airMarker.identifier ?: @"unknown",
340
+ @"id": rnmMarker.identifier ?: @"unknown",
328
341
  @"coordinate": @{
329
- @"latitude": @(airMarker.position.latitude),
330
- @"longitude": @(airMarker.position.longitude)
342
+ @"latitude": @(rnmMarker.position.latitude),
343
+ @"longitude": @(rnmMarker.position.longitude)
331
344
  }
332
345
  };
333
346
 
334
- if (airMarker.onPress) airMarker.onPress(event);
347
+ if (rnmMarker.onPress) rnmMarker.onPress(event);
335
348
  if (self.onMarkerPress) self.onMarkerPress(event);
336
349
 
337
350
  // TODO: not sure why this is necessary
@@ -340,23 +353,23 @@ id regionAsJSON(MKCoordinateRegion region) {
340
353
  }
341
354
 
342
355
  - (void)didTapPolyline:(GMSOverlay *)polyline {
343
- AIRGMSPolyline *airPolyline = (AIRGMSPolyline *)polyline;
356
+ RNMGMSPolyline *rnmPolyline = (RNMGMSPolyline *)polyline;
344
357
 
345
358
  id event = @{@"action": @"polyline-press",
346
- @"id": airPolyline.identifier ?: @"unknown",
359
+ @"id": rnmPolyline.identifier ?: @"unknown",
347
360
  };
348
361
 
349
- if (airPolyline.onPress) airPolyline.onPress(event);
362
+ if (rnmPolyline.onPress) rnmPolyline.onPress(event);
350
363
  }
351
364
 
352
365
  - (void)didTapPolygon:(GMSOverlay *)polygon {
353
- AIRGMSPolygon *airPolygon = (AIRGMSPolygon *)polygon;
366
+ RNMGMSPolygon *rnmPolygon = (RNMGMSPolygon *)polygon;
354
367
 
355
368
  id event = @{@"action": @"polygon-press",
356
- @"id": airPolygon.identifier ?: @"unknown",
369
+ @"id": rnmPolygon.identifier ?: @"unknown",
357
370
  };
358
371
 
359
- if (airPolygon.onPress) airPolygon.onPress(event);
372
+ if (rnmPolygon.onPress) rnmPolygon.onPress(event);
360
373
  }
361
374
 
362
375
  - (void)didTapAtCoordinate:(CLLocationCoordinate2D)coordinate {
@@ -371,7 +384,7 @@ id regionAsJSON(MKCoordinateRegion region) {
371
384
 
372
385
  - (void)didChangeCameraPosition:(GMSCameraPosition *)position isGesture:(BOOL)isGesture{
373
386
  id event = @{@"continuous": @YES,
374
- @"region": regionAsJSON([AIRGoogleMap makeGMSCameraPositionFromMap:self andGMSCameraPosition:position]),
387
+ @"region": regionAsJSON([RNMGoogleMap makeGMSCameraPositionFromMap:self andGMSCameraPosition:position]),
375
388
  @"isGesture": [NSNumber numberWithBool:isGesture],
376
389
  };
377
390
 
@@ -394,7 +407,7 @@ id regionAsJSON(MKCoordinateRegion region) {
394
407
 
395
408
  - (void)idleAtCameraPosition:(GMSCameraPosition *)position isGesture:(BOOL)isGesture{
396
409
  id event = @{@"continuous": @NO,
397
- @"region": regionAsJSON([AIRGoogleMap makeGMSCameraPositionFromMap:self andGMSCameraPosition:position]),
410
+ @"region": regionAsJSON([RNMGoogleMap makeGMSCameraPositionFromMap:self andGMSCameraPosition:position]),
398
411
  @"isGesture": [NSNumber numberWithBool:isGesture],
399
412
  };
400
413
  if (self.onChange) self.onChange(event); // complete
@@ -601,7 +614,7 @@ id regionAsJSON(MKCoordinateRegion region) {
601
614
 
602
615
  #pragma mark - Utils
603
616
 
604
- - (CGRect) frameForMarker:(AIRGoogleMapMarker*) mrkView {
617
+ - (CGRect) frameForMarker:(RNMGoogleMapMarker*) mrkView {
605
618
  CGPoint mrkAnchor = mrkView.realMarker.groundAnchor;
606
619
  CGPoint mrkPoint = [self.projection pointForCoordinate:mrkView.coordinate];
607
620
  CGSize mrkSize = mrkView.realMarker.iconView ? mrkView.realMarker.iconView.bounds.size : CGSizeMake(20, 30);
@@ -613,7 +626,7 @@ id regionAsJSON(MKCoordinateRegion region) {
613
626
 
614
627
  - (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible {
615
628
  NSMutableDictionary* markersFrames = [NSMutableDictionary new];
616
- for (AIRGoogleMapMarker* mrkView in self.markers) {
629
+ for (RNMGoogleMapMarker* mrkView in self.markers) {
617
630
  CGRect frame = [self frameForMarker:mrkView];
618
631
  CGPoint point = [self.projection pointForCoordinate:mrkView.coordinate];
619
632
  NSDictionary* frameDict = @{
@@ -635,9 +648,9 @@ id regionAsJSON(MKCoordinateRegion region) {
635
648
  return markersFrames;
636
649
  }
637
650
 
638
- - (AIRGoogleMapMarker*) markerAtPoint:(CGPoint)point {
639
- AIRGoogleMapMarker* mrk = nil;
640
- for (AIRGoogleMapMarker* mrkView in self.markers) {
651
+ - (RNMGoogleMapMarker*) markerAtPoint:(CGPoint)point {
652
+ RNMGoogleMapMarker* mrk = nil;
653
+ for (RNMGoogleMapMarker* mrkView in self.markers) {
641
654
  CGRect frame = [self frameForMarker:mrkView];
642
655
  if (CGRectContainsPoint(frame, point)) {
643
656
  mrk = mrkView;
@@ -739,9 +752,9 @@ id regionAsJSON(MKCoordinateRegion region) {
739
752
  }
740
753
  if (isTapInsideBubble) {
741
754
  //find bubble's marker
742
- AIRGoogleMapMarker* markerView = nil;
743
- AIRGMSMarker* marker = nil;
744
- for (AIRGoogleMapMarker* mrk in self.markers) {
755
+ RNMGoogleMapMarker* markerView = nil;
756
+ RNMGMSMarker* marker = nil;
757
+ for (RNMGoogleMapMarker* mrk in self.markers) {
745
758
  if ([mrk.calloutView isEqual:bubbleView]) {
746
759
  markerView = mrk;
747
760
  marker = markerView.realMarker;
@@ -751,12 +764,12 @@ id regionAsJSON(MKCoordinateRegion region) {
751
764
 
752
765
  //find real tap target subview
753
766
  UIView* realSubview = [(RCTView*)bubbleView hitTest:tapPointInBubble withEvent:nil];
754
- AIRGoogleMapCalloutSubview* realPressableSubview = nil;
767
+ RNMGoogleMapCalloutSubview* realPressableSubview = nil;
755
768
  if (realSubview) {
756
769
  UIView* tmp = realSubview;
757
770
  while (tmp && tmp != win && tmp != bubbleView) {
758
771
  if ([tmp respondsToSelector:@selector(onPress)]) {
759
- realPressableSubview = (AIRGoogleMapCalloutSubview*) tmp;
772
+ realPressableSubview = (RNMGoogleMapCalloutSubview*) tmp;
760
773
  break;
761
774
  }
762
775
  tmp = tmp.superview;
@@ -768,7 +781,7 @@ id regionAsJSON(MKCoordinateRegion region) {
768
781
  if (isInsideCallout) {
769
782
  [markerView didTapInfoWindowOfMarker:marker subview:realPressableSubview point:tapPointInBubble frame:bubbleFrame];
770
783
  } else {
771
- AIRGoogleMapMarker* markerAtTapPoint = [self markerAtPoint:tapPoint];
784
+ RNMGoogleMapMarker* markerAtTapPoint = [self markerAtPoint:tapPoint];
772
785
  if (markerAtTapPoint != nil) {
773
786
  [self didTapMarker:markerAtTapPoint.realMarker];
774
787
  } else {
@@ -874,7 +887,7 @@ id regionAsJSON(MKCoordinateRegion region) {
874
887
 
875
888
  CLLocationCoordinate2D location =((GMUPoint *) place.geometry).coordinate;
876
889
 
877
- AIRGoogleMapMarker *marker = (AIRGoogleMapMarker *)[[AIRGoogleMapMarkerManager alloc] view];
890
+ RNMGoogleMapMarker *marker = (RNMGoogleMapMarker *)[[RNMGoogleMapMarkerManager alloc] view];
878
891
  if (!marker.bridge) {
879
892
  marker.bridge = _bridge;
880
893
  }
@@ -883,7 +896,7 @@ id regionAsJSON(MKCoordinateRegion region) {
883
896
  marker.title = place.title;
884
897
  marker.subtitle = place.snippet;
885
898
  marker.pinColor = place.style.fillColor;
886
- marker.imageSrc = [AIRGoogleMap GetIconUrl:place parser:parser];
899
+ marker.imageSrc = [RNMGoogleMap GetIconUrl:place parser:parser];
887
900
  marker.layer.backgroundColor = [UIColor clearColor].CGColor;
888
901
  marker.layer.position = CGPointZero;
889
902
 
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGoogleMapCallout.h
3
- // AirMaps
2
+ // RNMGoogleMapCallout.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/6/16.
6
6
  //
@@ -11,7 +11,7 @@
11
11
  #import <UIKit/UIKit.h>
12
12
  #import <React/RCTView.h>
13
13
 
14
- @interface AIRGoogleMapCallout : UIView
14
+ @interface RNMGoogleMapCallout : UIView
15
15
  @property (nonatomic, assign) BOOL tooltip;
16
16
  @property (nonatomic, copy) RCTBubblingEventBlock onPress;
17
17
  @property (nonatomic, assign) BOOL alphaHitTest;
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGoogleMapCallout.m
3
- // AirMaps
2
+ // RNMGoogleMapCallout.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/6/16.
6
6
  //
@@ -8,12 +8,12 @@
8
8
 
9
9
  #ifdef HAVE_GOOGLE_MAPS
10
10
 
11
- #import "AIRGoogleMapCallout.h"
11
+ #import "RNMGoogleMapCallout.h"
12
12
  #import <React/RCTUtils.h>
13
13
  #import <React/RCTView.h>
14
14
  #import <React/RCTBridge.h>
15
15
 
16
- @implementation AIRGoogleMapCallout
16
+ @implementation RNMGoogleMapCallout
17
17
 
18
18
  - (BOOL) isPointInside:(CGPoint)pointInCallout {
19
19
  if (!self.alphaHitTest)
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGoogleMapCalloutManager.h
3
- // AirMaps
2
+ // RNMGoogleMapCalloutManager.h
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/6/16.
6
6
  //
@@ -10,7 +10,7 @@
10
10
 
11
11
  #import <React/RCTViewManager.h>
12
12
 
13
- @interface AIRGoogleMapCalloutManager : RCTViewManager
13
+ @interface RNMGoogleMapCalloutManager : RCTViewManager
14
14
 
15
15
  @end
16
16
 
@@ -1,6 +1,6 @@
1
1
  //
2
- // AIRGoogleMapCalloutManager.m
3
- // AirMaps
2
+ // RNMGoogleMapCalloutManager.m
3
+ // RNMaps
4
4
  //
5
5
  // Created by Gil Birman on 9/6/16.
6
6
  //
@@ -8,16 +8,16 @@
8
8
 
9
9
  #ifdef HAVE_GOOGLE_MAPS
10
10
 
11
- #import "AIRGoogleMapCalloutManager.h"
12
- #import "AIRGoogleMapCallout.h"
11
+ #import "RNMGoogleMapCalloutManager.h"
12
+ #import "RNMGoogleMapCallout.h"
13
13
  #import <React/RCTView.h>
14
14
 
15
- @implementation AIRGoogleMapCalloutManager
16
- RCT_EXPORT_MODULE()
15
+ @implementation RNMGoogleMapCalloutManager
16
+ RCT_EXPORT_MODULE(RNMGoogleMapCallout)
17
17
 
18
18
  - (UIView *)view
19
19
  {
20
- AIRGoogleMapCallout *callout = [AIRGoogleMapCallout new];
20
+ RNMGoogleMapCallout *callout = [RNMGoogleMapCallout new];
21
21
  return callout;
22
22
  }
23
23